/** * 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 { AbstractFilterCode } from '../model/AbstractFilterCode'; import { Code } from '../model/Code'; import { FilterChainCode } from '../model/FilterChainCode'; import { PaginatedListCode } from '../model/PaginatedListCode'; import { Unit } from '../model/Unit'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; 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 IccCodeApi { 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; /** * Create a code entity. Fields Type, Code and Version are required. * @summary Create a code * @param body */ createCode(body?: Code): Promise; /** * Create a batch of code entities. Fields Type, Code and Version are required for each code. * @summary Create a batch of codes * @param body */ createCodes(body?: Array): Promise>; /** * Returns a list of codes along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary Filter codes * @param body * @param startKey The start key for pagination, depends on the filters used * @param startDocumentId A patient document ID * @param limit Number of rows * @param skip Skip rows * @param sort Sort key * @param desc Descending * @param collectTiming if true, include server-side filter timing information in the response */ filterCodesBy(startKey?: string, startDocumentId?: string, limit?: number, skip?: number, sort?: string, desc?: boolean, body?: FilterChainCode, collectTiming?: false): Promise; filterCodesBy(startKey?: string, startDocumentId?: string, limit?: number, skip?: number, sort?: string, desc?: boolean, body?: FilterChainCode, collectTiming?: true): Promise; /** * Returns a list of code types matched with given input. * @summary Get list of code types by region and type. * @param region Code region * @param type Code type */ findCodeTypes(region?: string, type?: string): Promise>; /** * Returns a list of codes matched with given input. * @summary Gets list of codes by code, type and version * @param region Code region * @param type Code type * @param code Code code * @param version Code version */ findCodes(region?: string, type?: string, code?: string, version?: string): Promise>; /** * Returns a list of codes matched with given input. * @summary Gets paginated list of codes by code, type and version. * @param region * @param type * @param code * @param version * @param startKey The start key for pagination * @param startDocumentId A code document ID * @param limit Number of rows */ findPaginatedCodes(region?: string, type?: string, code?: string, version?: string, startKey?: string, startDocumentId?: string, limit?: number): Promise; /** * Returns a list of codes matched with given input. If several types are provided, pagination is not supported * @summary Get paginated list of codes by code, type and version. * @param region * @param types * @param language * @param label * @param version * @param startKey The start key for pagination: a JSON representation of an array containing all the necessary components to form the Complex Key's startKey * @param startDocumentId A code document ID * @param limit Number of rows */ findPaginatedCodesByLabel(region?: string, types?: string, language?: string, label?: string, version?: string, startKey?: string, startDocumentId?: string, limit?: number): Promise; /** * Returns a list of codes matched with given input. * @summary Gets paginated list of codes by link and link type. * @param linkType * @param linkedId * @param startKey The start key for pagination: a JSON representation of an array containing all the necessary components to form the Complex Key's startKey * @param startDocumentId A code document ID * @param limit Number of rows */ findPaginatedCodesWithLink(linkType: string, linkedId?: string, startKey?: string, startDocumentId?: string, limit?: number): Promise; /** * Returns a list of tag types matched with given input. * @summary Gets list of tag types by region and type. * @param region Code region * @param type Code type */ findTagTypes(region?: string, type?: string): Promise>; /** * Get a code based on its id * @summary Get a code by id * @param codeId Code id */ getCode(codeId: string): Promise; /** * Get a code based on (type, code, version) as query strings. (type, code, version) is unique. * @summary Get a code * @param type Code type * @param code Code code * @param version Code version */ getCodeWithParts(type: string, code: string, version: string): Promise; /** * Get a list of codes by ids/keys. * @summary Gets a list of codes by ids * @param codeIds */ getCodes(codeIds: string[]): Promise>; /** * Import codes from the resources XML file depending on the passed pathVariable * @summary Import codes * @param codeType */ importCodes(codeType: string): Promise; /** * * @summary Get ids of code matching the provided filter for the current user (HcParty) * @param body * @param collectTiming add timing information to the response * */ matchCodesBy(body?: AbstractFilterCode, collectTiming?: false): Promise>; matchCodesBy(body?: AbstractFilterCode, collectTiming?: true): Promise & TimingInfo>; /** * Modification of (type, code, version) is not allowed. * @summary Modify a code * @param body */ modifyCode(body?: Code): Promise; /** * Modification of (type, code, version) is not allowed. * @summary Modify a batch of codes * @param body */ modifyCodes(body?: Array): Promise>; modifyCodesInGroup(groupId: string, codes?: Array): Promise>; createCodesInGroup(groupId: string, codes?: Array): Promise>; /** * Get a list of codes by ids/keys. * @summary Gets a list of codes by ids * @param codeIds */ getCodesInGroup(groupId: string, codeIds: 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 */ matchCodesByInGroup(groupId: string, body?: AbstractFilterCode, collectTiming?: false): Promise>; matchCodesByInGroup(groupId: string, body?: AbstractFilterCode, collectTiming?: true): Promise & TimingInfo>; /** * Retrieves the ids of all the codes that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the codes that have conflicts. * @return the ids of the codes with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the code with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a code. * @param entityId the id of the code to retrieve the conflicts for. * @return the conflicting revisions of the code. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the code 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 code. * @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 codes with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the codes with the given ids. * @param entityIds the ids of the codes 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 codes with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the codes 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>; }