/** * 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 { AccessLog } from '../model/AccessLog'; import { DocIdentifier } from '../model/DocIdentifier'; import { PaginatedListAccessLog } from '../model/PaginatedListAccessLog'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'; import { ListOfIds } from '../model/ListOfIds'; import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'; import { AbstractFilterAccessLog } from '../model/AbstractFilterAccessLog'; 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 IccAccesslogApi { 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 Create an access log * @param body */ createAccessLog(body?: AccessLog): Promise; /** * @summary Deletes a batch of access logs. * * @param accessLogIds a ListOfIds containing the ids of the access logs to delete. * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted access logs. */ deleteAccessLogs(accessLogIds: ListOfIds): Promise>; /** * @summary Deletes a single access log by id. * * @param accessLogId the id of the access log. */ deleteAccessLog(accessLogId: string): Promise; /** * @deprecated use {@link findAccessLogIdsByDataOwnerPatientDate} instead. * @summary List access logs found by Healthcare Party and secret foreign keyelementIds. * @param body * @param hcPartyId */ findAccessLogsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array): Promise>; /** * @summary List AccessLog ids by data owner and a set of secret foreign key. The ids will be sorted by AccessLog date, in ascending or descending * order according to the specified parameter value. * * @param dataOwnerId the data owner id. * @param secretFKeys an array of secret foreign keys. * @param startDate a timestamp in epoch milliseconds. If undefined, all the access log ids since the beginning of time will be returned. * @param endDate a timestamp in epoch milliseconds. If undefined, all the access log ids until the end of time will be returned. * @param descending whether to return the ids ordered in ascending or descending order by AccessLog date * @return a promise that will resolve in an Array of AccessLog ids. */ findAccessLogIdsByDataOwnerPatientDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise; /** * @deprecated use {@link findAccessLogIdsByDataOwnerPatientDate} instead * @summary List access logs found by Healthcare Party and secret foreign keyelementIds. * @param hcPartyId * @param secretFKeys */ findAccessLogsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; /** * * @summary Get paginated list of Access Logs * @param userId A User ID * @param accessType The type of access (COMPUTER or USER) * @param startDate The start search epoch * @param startKey The start key for pagination * @param startDocumentId A patient document ID * @param limit Number of rows * @param descending Descending order */ findByUserAfterDate(userId: string, accessType?: string, startDate?: number, startKey?: string, startDocumentId?: string, limit?: number, descending?: boolean): Promise; /** * @summary Get an access log * @param accessLogId */ getAccessLog(accessLogId: string): Promise; /** * @summary Get a batch of Access Logs by their ids. * @param ids an array of ids. */ getAccessLogs(ids: ListOfIds): Promise; /** * * @summary Get paginated list of Access Logs * @param fromEpoch * @param toEpoch * @param startKey * @param startDocumentId * @param limit * @param descending */ listAccessLogs(fromEpoch?: number, toEpoch?: number, startKey?: number, startDocumentId?: string, limit?: number, descending?: boolean): Promise; /** * * @summary Get paginated list of Access Logs for a group * @param groupId * @param fromEpoch * @param toEpoch * @param startKey * @param startDocumentId * @param limit */ listAccessLogsInGroup(groupId: string, fromEpoch?: number, toEpoch?: number, startKey?: number, startDocumentId?: string, limit?: number): Promise; /** * * @summary Modifies an access log * @param body */ modifyAccessLog(body?: AccessLog): Promise; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareAccessLogs(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * * @summary Get ids of access logs matching the provided filter. * @param body an AbstractFilterAccessLog. * @param collectTiming if true, include server-side filter timing information in the response */ matchAccessLogsBy(body: AbstractFilterAccessLog, collectTiming?: false): Promise>; matchAccessLogsBy(body: AbstractFilterAccessLog, collectTiming?: true): Promise & TimingInfo>; /** * * @summary Get ids of access logs matching the provided filter in a specific group. * @param groupId the id of the group where to perform the search. * @param body an AbstractFilterAccessLog. * @param collectTiming if true, include server-side filter timing information in the response */ matchAccessLogsInGroupBy(groupId: string, body: AbstractFilterAccessLog, collectTiming?: false): Promise>; matchAccessLogsInGroupBy(groupId: string, body: AbstractFilterAccessLog, collectTiming?: true): Promise & TimingInfo>; /** * Retrieves the ids of all the access logs that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the access logs that have conflicts. * @return the ids of the access logs with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the access log with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of an access log. * @param entityId the id of the access log to retrieve the conflicts for. * @return the conflicting revisions of the access log. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the access log 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 access log. * @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 access logs that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the access logs 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 access log, in the given group. * @param groupId the id of the group the access log belongs to. * @param entityId the id of the access log to retrieve the conflicts for. * @return the conflicting revisions of the access log. */ 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 access log, in the given group. * @param groupId the id of the group the access log 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 access logs with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the access logs with the given ids. * @param entityIds the ids of the access logs 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 access logs with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the access logs 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>; }