/** * 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 { AbstractFilterContact } from '../model/AbstractFilterContact'; import { AbstractFilterService } from '../model/AbstractFilterService'; import { Contact } from '../model/Contact'; import { Content } from '../model/Content'; import { DocIdentifier } from '../model/DocIdentifier'; import { FilterChainContact } from '../model/FilterChainContact'; import { FilterChainService } from '../model/FilterChainService'; import { IcureStub } from '../model/IcureStub'; import { LabelledOccurence } from '../model/LabelledOccurence'; import { ListOfIds } from '../model/ListOfIds'; import { PaginatedListContact } from '../model/PaginatedListContact'; import { PaginatedListService } from '../model/PaginatedListService'; import { Service } from '../model/Service'; import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'; import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'; import { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult'; import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'; 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 IccContactApi { 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); handleError(e: XHR.XHRError): never; /** * Keys must be delimited by coma * @summary Close contacts for Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys */ closeForHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; /** * Creates a contact with the current user and returns an instance of created contact afterward. * @summary Create a contact with the current user * @param body */ createContact(body?: Contact): Promise; /** * Returns the modified contacts. * @summary Create a batch of contacts * @param body */ createContacts(body?: Array): Promise>; /** * @summary Deletes a batch of contacts. * * @param contactIds a ListOfIds containing the ids of the contacts to delete. * @return a Promise that will resolve in an array of the DocIdentifiers of the successfully deleted contacts. */ deleteContacts(contactIds: ListOfIds): Promise>; /** * @summary Deletes a single contact by id. * * @param contactId the id of the contact to delete. */ deleteContact(contactId: string): Promise; /** * Returns a list of contacts along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary List contacts for the current user (HcParty) or the given hcparty in the filter * @param body * @param startDocumentId A Contact document ID * @param limit Number of rows * @param collectTiming if true, include server-side filter timing information in the response */ filterContactsBy(startDocumentId?: string, limit?: number, body?: FilterChainContact, collectTiming?: false): Promise; filterContactsBy(startDocumentId?: string, limit?: number, body?: FilterChainContact, collectTiming?: true): Promise; /** * Returns a list of contacts along with next start keys and Document ID. If the nextStartKey is Null it means that this is the last page. * @summary List services for the current user (HcParty) or the given hcparty in the filter * @param body * @param startDocumentId A Contact document ID * @param limit Number of rows * @param collectTiming if true, include server-side filter timing information in the response */ filterServicesBy(startDocumentId?: string, limit?: number, body?: FilterChainService, collectTiming?: false): Promise; filterServicesBy(startDocumentId?: string, limit?: number, body?: FilterChainService, collectTiming?: true): Promise; /** * * @summary Get a list of contacts found by Healthcare Party and form's id. * @param hcPartyId * @param formId */ findByHCPartyFormId(hcPartyId: string, formId: string): Promise>; /** * * @summary Get a list of contacts found by Healthcare Party and form's ids. * @param body * @param hcPartyId */ findByHCPartyFormIds(hcPartyId: string, body?: ListOfIds): Promise>; /** * Keys must be delimited by coma * @deprecated use {@link findContactIdsByDataOwnerPatientOpeningDate} instead. * @summary Get a list of contacts found by Healthcare Party and secret foreign keys. * @param hcPartyId * @param planOfActionsIds * @param skipClosedContacts @param body */ findByHCPartyPatientSecretFKeysUsingPost(hcPartyId: string, planOfActionsIds?: string, skipClosedContacts?: boolean, body?: Array): Promise>; /** * Keys must be delimited by coma * @deprecated use {@link findContactIdsByDataOwnerPatientOpeningDate} instead. * @summary Get a list of contacts found by Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys * @param planOfActionsIds * @param skipClosedContacts */ findByHCPartyPatientSecretFKeys(hcPartyId: string, secretFKeys: string, planOfActionsIds?: string, skipClosedContacts?: boolean): Promise>; /** * * @summary List contacts found By Healthcare Party and service Id. * @param hcPartyId * @param serviceId */ findByHCPartyServiceId(hcPartyId: string, serviceId: string): Promise>; /** * * @summary List contacts found By externalId. * @param externalId */ findContactsByExternalId(externalId: string): Promise>; /** * @deprecated use {@link findContactIdsByDataOwnerPatientOpeningDate} instead. * @summary Get a list of contacts found by Healthcare Party and Patient foreign keys. * @param body * @param hcPartyId */ findContactsByHCPartyPatientForeignKeys(hcPartyId: string, body?: ListOfIds): Promise>; /** * Retrieves the delegation stub of the Contact which ids are passed as parameter. * @param contactIds the ids of the contact for which the stub should be retrieved */ findContactsDelegationsStubsByIds(contactIds: []): Promise; /** * Keys must be delimited by coma * @deprecated use {@link findContactsDelegationsStubsByIds} instead. * @summary List contacts found By Healthcare Party and secret foreign keys. * @param body * @param hcPartyId */ findContactsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array): Promise>; /** * @deprecated use {@link findContactsDelegationsStubsByIds} instead. * @summary List contacts found By Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys */ findContactsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; /** * Gets a contact based on its id * @summary Get a contact * @param contactId */ getContact(contactId: string): Promise; /** * Gets a service based on its id * @summary Get a service * @param serviceId */ getService(serviceId: string): Promise; /** * Get a list of contact by ids/keys. * @summary Get contacts by batch * @param body */ getContacts(body?: ListOfIds): Promise>; /** * * @summary Get an empty content */ getEmptyContent(): Promise; /** * * @summary Get the list of all used codes frequencies in services * @param codeType * @param minOccurences */ getServiceCodesOccurences(codeType: string, minOccurences: number): Promise>; /** * Returns a list of contacts. * @summary List contacts bu opening date parties with(out) pagination * @param startKey The contact openingDate * @param endKey The contact max openingDate * @param hcpartyid hcpartyid * @param startDocumentId A contact party document ID * @param limit Number of rows */ listContactsByOpeningDate(startDate: number, endDate: number, hcpartyid: string, startKey?: string, startDocumentId?: string, limit?: number): Promise; /** * Returns a list of services * @summary List services with provided ids * @param body */ listServices(body?: ListOfIds): Promise>; /** * Returns a list of services * @summary List services by related association id * @param associationId */ listServicesByAssociationId(associationId: string): Promise>; /** * Returns the list of services linked to the provided health element id * @summary List services linked to a health element * @param healthElementId * @param hcPartyId hcPartyId */ listServicesByHealthElementId(healthElementId: string, hcPartyId: string): Promise>; /** * Returns a list of services * @summary List services linked to provided ids * @param body * @param linkType The type of the link */ listServicesLinkedTo(linkType?: string, body?: ListOfIds): Promise>; /** * * @summary Get ids of contacts matching the provided filter for the current user (HcParty) * @param body * @param collectTiming if true, include server-side filter timing information in the response */ matchContactsBy(body?: AbstractFilterContact, collectTiming?: false): Promise>; matchContactsBy(body?: AbstractFilterContact, collectTiming?: true): Promise & TimingInfo>; /** * * @summary Get ids of services matching the provided filter for the current user * @param body * @param collectTiming add timing information to the response */ matchServicesBy(body?: AbstractFilterService, collectTiming?: false): Promise>; matchServicesBy(body?: AbstractFilterService, collectTiming?: true): Promise & TimingInfo>; /** * Returns the modified contact. * @summary Modify a contact * @param body */ modifyContact(body?: Contact): Promise; /** * Returns the modified contacts. * @summary Modify a batch of contacts * @param body */ modifyContacts(body?: Array): Promise>; /** * @summary List Contact ids by data owner and a set of secret foreign key. The ids will be sorted by Contact openingDate, 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 contact ids since the beginning of time will be returned. * @param endDate a timestamp in epoch milliseconds. If undefined, all the contact ids until the end of time will be returned. * @param descending whether to return the ids ordered in ascending or descending order by Contact openingDate * @return a promise that will resolve in an Array of Contact ids. */ findContactIdsByDataOwnerPatientOpeningDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareContacts(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareContactsMinimal(request: BulkShareOrUpdateMetadataParams): Promise; /** * Retrieves the ids of all the contacts that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the contacts that have conflicts. * @return the ids of the contacts with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the contact with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a contact. * @param entityId the id of the contact to retrieve the conflicts for. * @return the conflicting revisions of the contact. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the contact 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 contact. * @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 contacts that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the contacts 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 contact, in the given group. * @param groupId the id of the group the contact belongs to. * @param entityId the id of the contact to retrieve the conflicts for. * @return the conflicting revisions of the contact. */ 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 contact, in the given group. * @param groupId the id of the group the contact 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 contacts with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the contacts with the given ids. * @param entityIds the ids of the contacts 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 contacts with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the contacts 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>; }