/** * 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 { Topic, TopicRole } from '../model/Topic'; import { ListOfIds } from '../model/ListOfIds'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'; import { FilterChainTopic } from '../model/FilterChainTopic'; import { PaginatedListTopic } from '../model/PaginatedListTopic'; import { AbstractFilterTopic } from '../model/AbstractFilterTopic'; 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 IccTopicApi { 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 topic * @param topicId */ getTopic(topicId: string): Promise; /** * Keys must be delimited by coma * @summary Get a list of topics by ids * @param body */ getTopics(body: ListOfIds): Promise>; /** * Returns an instance of created topic. * @summary Create a topic with the current user * @param body */ createTopic(body: Topic): Promise; /** * Returns the modified topic. * @summary Modify a topic * @param body */ modifyTopic(body: Topic): Promise; /** * @summary Deletes a topic by id. * * @param topicId the id of the topic to delete * @return a Promise that will resolve in the DocIdentifier of the deleted topic. */ deleteTopic(topicId: string): Promise; /** * Response is a set containing the ID's of deleted topics. * @summary Delete topics. * @param body */ deleteTopics(body: ListOfIds): Promise>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareTopics(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * Returns a list of topics along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary List topics for the current user (HcParty) or the given hcparty in the filter * @param body * @param startDocumentId A Topic document ID * @param limit Number of rows * @param collectTiming if true, include server-side filter timing information in the response */ filterTopicsBy(body: FilterChainTopic, startDocumentId?: string, limit?: number, collectTiming?: false): Promise; filterTopicsBy(body: FilterChainTopic, startDocumentId?: string, limit?: number, collectTiming?: true): Promise; /** * * @summary Get ids of topics matching the provided filter for the current user (HcParty) * @param body * @param collectTiming if true, include server-side filter timing information in the response */ matchTopicsBy(body: AbstractFilterTopic, collectTiming?: false): Promise>; matchTopicsBy(body: AbstractFilterTopic, collectTiming?: true): Promise & TimingInfo>; addParticipant(body: { dataOwnerId: string; topicRole: TopicRole; }, topicId: string): Promise; removeParticipant(body: { dataOwnerId: string; }, topicId: string): Promise; /** * Retrieves the ids of all the topics that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the topics that have conflicts. * @return the ids of the topics with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the topic with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a topic. * @param entityId the id of the topic to retrieve the conflicts for. * @return the conflicting revisions of the topic. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the topic 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 topic. * @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 topics that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the topics 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 topic, in the given group. * @param groupId the id of the group the topic belongs to. * @param entityId the id of the topic to retrieve the conflicts for. * @return the conflicting revisions of the topic. */ 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 topic, in the given group. * @param groupId the id of the group the topic 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 topics with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the topics with the given ids. * @param entityIds the ids of the topics 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 topics with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the topics 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>; }