/** * 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 { AbstractFilterDevice } from '../model/AbstractFilterDevice'; import { Device } from '../model/Device'; import { DocIdentifier } from '../model/DocIdentifier'; import { FilterChainDevice } from '../model/FilterChainDevice'; import { IdWithRev } from '../model/IdWithRev'; import { ListOfIds } from '../model/ListOfIds'; import { PaginatedListDevice } from '../model/PaginatedListDevice'; import { TimingInfo } from '../model/TimingInfo'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccDeviceApi { 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; /** * Name, last name, date of birth, and gender are required. After creation of the device and obtaining the ID, you need to create an initial delegation. * @summary Create a device * @param body */ createDevice(body?: Device): Promise; /** * One of Name or Last name+First name, Nihii, and Public key are required. * @summary Create a device * @param body * @param groupId */ createDeviceInGroup(groupId: string, body?: Device): Promise; /** * Returns the id and _rev of created devices * @summary Create devices in bulk * @param body */ createDevices(body?: Array): Promise>; /** * Returns the id and _rev of created devices * @summary Create devices in bulk * @param body */ createDevices1(body?: Array): Promise>; /** * Response contains the id/rev of deleted device. * @summary Delete device. * @param deviceId */ deleteDevice(deviceId: string): Promise; /** * Response is an array containing the id/rev of deleted devices. * @summary Delete devices. * @param body */ deleteDevices(body?: ListOfIds): Promise>; /** * Deleting a device. Response is an array containing the id of deleted device. * @summary Delete a device * @param groupId * @param deviceIds */ deleteDevicesInGroup(groupId: string, deviceIds: string): Promise>; /** * Returns a list of devices along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary Filter devices for the current user (HcParty) * @param body * @param startDocumentId A device document ID * @param limit Number of rows * @param collectTiming if true, include server-side filter timing information in the response */ filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming?: false): Promise; filterDevicesBy(startDocumentId?: string, limit?: number, body?: FilterChainDevice, collectTiming?: true): Promise; /** * It gets device administrative data. * @summary Get Device * @param deviceId */ getDevice(deviceId: string): Promise; /** * (key, value) of the map is as follows: (ID of the owner of the encrypted AES key, encrypted AES keys) * @summary Get the HcParty encrypted AES keys indexed by owner. * @param deviceId */ getDeviceAesExchangeKeysForDelegate(deviceId: string): Promise<{ [delegatorId: string]: { [delegatorPubKeyFingerprint: string]: { [delegatePubKeyFingerprint: string]: string; }; }; }>; /** * It gets device administrative data. * @summary Get devices by id * @param body */ getDevices(body?: ListOfIds): Promise>; /** * General information about the device * @summary Get devices by their IDs * @param body * @param groupId */ getDevicesInGroup(groupId: string, body?: ListOfIds): Promise>; /** * * @summary Get ids of devices matching the provided filter for the current user (HcParty) * @param body * @param collectTiming add timing information to the response */ matchDevicesBy(body?: AbstractFilterDevice, collectTiming?: false): Promise>; matchDevicesBy(body?: AbstractFilterDevice, collectTiming?: true): Promise & TimingInfo>; /** * No particular return value. It's just a message. * @summary Modify a Device. * @param body * @param groupId */ modifyDeviceInGroup(groupId: string, body?: Device): Promise; /** * Returns the updated device * @summary Modify a device * @param body */ updateDevice(body?: Device): Promise; /** * Returns the id and _rev of modified devices * @summary Modify devices in bulk * @param body */ updateDevices(body?: Array): Promise>; /** * Returns the id and _rev of modified devices * @summary Modify devices in bulk * @param body */ updateDevices1(body?: Array): Promise>; /** * Retrieves the ids of all the devices that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the devices that have conflicts. * @return the ids of the devices with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the device with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a device. * @param entityId the id of the device to retrieve the conflicts for. * @return the conflicting revisions of the device. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the device 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 device. * @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 devices that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the devices 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 device, in the given group. * @param groupId the id of the group the device belongs to. * @param entityId the id of the device to retrieve the conflicts for. * @return the conflicting revisions of the device. */ 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 device, in the given group. * @param groupId the id of the group the device 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 devices with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the devices with the given ids. * @param entityIds the ids of the devices 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 devices with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the devices 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>; }