/** * 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 { Place } from '../model/Place'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { ListOfIds } from '../model/ListOfIds'; import { PaginatedListPlace } from '../model/PaginatedListPlace'; import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccPlaceApi { host: string; headers: Array; authenticationProvider: AuthenticationProvider; fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise; constructor(host: string, headers: any, authenticationProvider?: AuthenticationProvider, fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise); setHeaders(h: Array): void; handleError(e: XHR.XHRError): never; /** * * @summary Creates a place * @param body */ createPlace(body?: Place): Promise; /** * @summary Deletes a batch of places. * * @param placeIds a ListOfIds containing the ids of the places to delete. * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted places. */ deletePlaces(placeIds: ListOfIds): Promise>; /** * * @summary Gets a place * @param placeId */ getPlace(placeId: string): Promise; /** * @deprecated use {@link getPlacesWithPagination} instead. * @summary Gets all places */ getPlaces(): Promise>; /** * @summary Gets all places with pagination. * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page. * @param limit the number of elements that the page should contain. * @return a promise that will resolve in a PaginatedListPlace. */ getPlacesWithPagination(startDocumentId?: string, limit?: number): Promise; /** * * @summary Modifies an place * @param body */ modifyPlace(body?: Place): Promise; /** * Retrieves the ids of all the places that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the places that have conflicts. * @return the ids of the places with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the place with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a place. * @param entityId the id of the place to retrieve the conflicts for. * @return the conflicting revisions of the place. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the place 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 place. * @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>; /** * Automatically resolves the conflicting revisions of the places with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the places with the given ids. * @param entityIds the ids of the places 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 places with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the places 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>; }