/** * 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 { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { PaginatedListInsurance } from '../model/PaginatedListInsurance'; import { Insurance } from '../model/Insurance'; import { AbstractFilterInsurance } from '../model/AbstractFilterInsurance'; 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 IccInsuranceApi { 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 an insurance * @param body */ createInsurance(body?: Insurance): Promise; /** * * @summary Deletes an insurance * @param insuranceId */ deleteInsurance(insuranceId: string): Promise; /** * * @summary Gets an insurance * @param insuranceId */ getInsurance(insuranceId: string): Promise; /** * * @summary Gets insurances by id * @param body */ getInsurances(body?: ListOfIds): Promise>; /** * * @summary Gets an insurance * @param insuranceCode */ listInsurancesByCode(insuranceCode: string): Promise>; /** * * @summary Gets an insurance * @param insuranceName */ listInsurancesByName(insuranceName: string): Promise>; /** * * @summary Modifies an insurance * @param body */ modifyInsurance(body?: Insurance): Promise; getAllInsurances(startDocumentId?: string, limit?: number): Promise; modifyInsurancesInGroup(groupId: string, insurances?: Array): Promise>; createInsurancesInGroup(groupId: string, insurances?: Array): Promise>; /** * Get a list of insurances by ids/keys. * @summary Gets a list of insurances by ids * @param insuranceIds */ getInsurancesInGroup(groupId: string, insuranceIds: string[]): Promise>; /** * * @summary Get ids of code matching the provided filter for the current user (HcParty) * @param body * @param collectTiming if true, include server-side filter timing information in the response */ matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming?: false): Promise>; matchInsurancesByInGroup(groupId: string, body?: AbstractFilterInsurance, collectTiming?: true): Promise & TimingInfo>; /** * Retrieves the ids of all the insurances that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the insurances that have conflicts. * @return the ids of the insurances with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the insurance with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of an insurance. * @param entityId the id of the insurance to retrieve the conflicts for. * @return the conflicting revisions of the insurance. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the insurance 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 insurance. * @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 insurances that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the insurances 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 an insurance, in the given group. * @param groupId the id of the group the insurance belongs to. * @param entityId the id of the insurance to retrieve the conflicts for. * @return the conflicting revisions of the insurance. */ 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 insurance, in the given group. * @param groupId the id of the group the insurance 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 insurances with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the insurances with the given ids. * @param entityIds the ids of the insurances 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 insurances with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the insurances 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>; }