/** * 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 { Agenda } from '../model/Agenda'; import { DocIdentifier } from '../model/DocIdentifier'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { ListOfIds } from '../model/ListOfIds'; import { PaginatedListAgenda } from '../model/PaginatedListAgenda'; import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccAgendaApi { 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 agenda * @param body */ createAgenda(body?: Agenda): Promise; /** * @summary Delete a batch of agendas by id. * * @param agendaIds a ListOfIds containing the ids of the agendas to delete. * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted agendas. */ deleteAgendas(agendaIds: ListOfIds): Promise>; /** * @summary Deletes a single agenda by id. * * @param agendaId the id of the agenda to delete. * @return a Promise that will resolve in the DocIdentifier of the deleted agenda. */ deleteAgenda(agendaId: string): Promise; /** * * @summary Gets an agenda * @param agendaId */ getAgenda(agendaId: string): Promise; /** * @deprecated use {@link getAgendasWithPagination} instead. * * @summary Gets all agendas */ getAgendas(): Promise>; /** * @summary gets all agendas with pagination. * * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page. * @param limit the size of the page * @return a promise that will resolve in a PaginatedListAgenda. */ getAgendasWithPagination(startDocumentId?: string, limit?: number): Promise; /** * * @summary Gets all agendas for user * @param userId */ getAgendasForUser(userId: string): Promise; /** * * @summary Gets readable agendas for user * @param userId */ getReadableAgendasForUser(userId: string): Promise>; /** * * @summary Modifies an agenda * @param body */ modifyAgenda(body?: Agenda): Promise; /** * Retrieves the ids of all the agendas that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the agendas that have conflicts. * @return the ids of the agendas with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the agenda with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of an agenda. * @param entityId the id of the agenda to retrieve the conflicts for. * @return the conflicting revisions of the agenda. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the agenda 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 agenda. * @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 agendas with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the agendas with the given ids. * @param entityIds the ids of the agendas 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 agendas with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the agendas 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>; }