/** * 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 { Form } from '../model/Form'; import { FormTemplate } from '../model/FormTemplate'; import { IcureStub } from '../model/IcureStub'; import { ListOfIds } from '../model/ListOfIds'; import { IdWithRev } from '../model/IdWithRev'; 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 { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccFormApi { 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; /** * Returns an instance of created form. * @summary Create a form with the current user * @param body */ createForm(body?: Form): Promise
; /** * Returns an instance of created form template. * @summary Create a form template with the current user * @param body */ createFormTemplate(body?: FormTemplate): Promise; /** * Returns the created forms. * @summary Create a batch of forms * @param body */ createForms(body?: Array): Promise>; /** * * @summary Delete a form template * @param formTemplateId */ deleteFormTemplate(formTemplateId: string): Promise; /** * @summary Delete forms by batch. * * @param formIds a ListOfIds containing the ids of the Forms to delete. * @return a Promise that will resolve in an array of DocIdentifiers related to the successfully deleted Forms. */ deleteForms(formIds: ListOfIds): Promise>; /** * @summary Deletes a single form by id. * * @param formId the id of the document to delete. * @return a Promise that will resolve in the DocIdentifier of the form. */ deleteForm(formId: string): Promise; /** * * @summary Gets all form templates for current user * @param loadLayout * @param raw */ findFormTemplates(loadLayout?: boolean, raw?: boolean): Promise>; /** * * @summary Gets all form templates * @param specialityCode * @param loadLayout */ findFormTemplatesBySpeciality(specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise>; /** * Keys must be delimited by coma * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead. * @summary List forms found By Healthcare Party and secret foreign keys. * @param hcPartyId * @param healthElementId * @param planOfActionId * @param formTemplateId * @param body */ findFormsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, healthElementId?: string, planOfActionId?: string, formTemplateId?: string, body?: Array): Promise>; /** * Keys must be delimited by commas. * @deprecated use {@link findFormIdsByDataOwnerPatientOpeningDate} instead. * @summary List forms found By Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys * @param healthElementId * @param planOfActionId * @param formTemplateId */ findFormsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string, healthElementId?: string, planOfActionId?: string, formTemplateId?: string): Promise>; /** * @summary List Form ids by data owner and a set of secret foreign key. The ids will be sorted by Form 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 form ids since the beginning of time will be returned. * @param endDate a timestamp in epoch milliseconds. If undefined, all the form ids until the end of time will be returned. * @param descending whether to return the ids ordered in ascending or descending order by Form openingDate * @return a promise that will resolve in an Array of Form ids. */ findFormIdsByDataOwnerPatientOpeningDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise; /** * Keys must be delimited by coma * @deprecated use {@link findFormsDelegationsStubsByIds} instead. * @summary List form stubs found By Healthcare Party and secret foreign keys. * @param body * @param hcPartyId */ findFormsDelegationsStubsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array): Promise>; /** * @deprecated use {@link findFormsDelegationsStubsByIds} instead. * @summary List form stubs found By Healthcare Party and secret foreign keys. * @param hcPartyId * @param secretFKeys */ findFormsDelegationsStubsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; /** * @summary List form stubs by form ids. */ findFormsDelegationsStubsByIds(formIds: string[]): Promise>; /** * Keys must be delimited by coma * @summary Get a list of forms by ids * @param formId * @param hcPartyId */ getChildrenForms(formId: string, hcPartyId: string): Promise>; /** * * @summary Gets a form * @param formId */ getForm(formId: string): Promise; /** * * @summary Gets the most recent form with the given logicalUuid * @param logicalUuid */ getFormByLogicalUuid(logicalUuid: string): Promise; /** * * @summary Gets the most recent form with the given uniqueId * @param uniqueId */ getFormByUniqueId(uniqueId: string): Promise; /** * * @summary Gets a form template by guid * @param formTemplateId * @param raw */ getFormTemplate(formTemplateId: string, raw?: boolean): Promise; /** * @deprecated This method behavior is not intuitive. * If there is any form template with author=currentUser and guid={@link formTemplateGuid} returns them, regardless of * {@link specialityCode}. * Else returns all form templates with specialty.code={@link specialityCode} and guid={@link formTemplateGuid} * regardless of the currentUser. */ getFormTemplatesByGuid(formTemplateGuid: string, specialityCode: string, raw?: boolean): Promise>; /** * Keys must be delimited by coma * @summary Get a list of forms by ids * @param body */ getForms(body?: ListOfIds): Promise>; /** * * @summary Gets all forms with given logicalUuid * @param logicalUuid */ getFormsByLogicalUuid(logicalUuid: string): Promise>; /** * * @summary Gets all forms by uniqueId * @param uniqueId */ getFormsByUniqueId(uniqueId: string): Promise>; /** * Returns the modified form. * @summary Modify a form * @param body */ modifyForm(body?: Form): Promise; /** * Returns the modified forms. * @summary Modify a batch of forms * @param body */ modifyForms(body?: Array): Promise>; /** * * @summary Update a form template's layout * @param attachment * @param formTemplateId */ setTemplateAttachmentMulti(attachment: ArrayBuffer, formTemplateId: string): Promise; /** * Returns an instance of created form template. * @summary Modify a form template with the current user * @param body * @param formTemplateId */ updateFormTemplate(formTemplateId: string, body?: FormTemplate): Promise; /** * Returns a list of form templates for the specified user in a group. * @summary Get form templates by user in a group * @param groupId the id of the group * @param userId the id of the user * @param loadLayout whether to load the layout of the form templates * @param raw whether to use raw mapping for the form templates */ getFormTemplatesByUserInGroup(groupId: string, userId: string, loadLayout?: boolean, raw?: boolean): Promise>; /** * Returns a list of form templates for the specified specialty in a group. * @summary Get form templates by specialty in a group * @param groupId the id of the group * @param specialityCode the specialty code to filter templates by * @param loadLayout whether to load the layout of the form templates * @param raw whether to use raw mapping for the form templates */ getFormTemplatesBySpecialtyInGroup(groupId: string, specialityCode: string, loadLayout?: boolean, raw?: boolean): Promise>; /** * Returns an instance of created form template. * @summary Create a form template in a group * @param groupId the id of the group * @param body the form template to create */ createFormTemplateInGroup(groupId: string, body?: FormTemplate): Promise; /** * @summary Delete a form template in a group * @param groupId the id of the group * @param formTemplateId the id of the form template to delete * @param rev the revision of the form template to delete */ deleteFormTemplateInGroup(groupId: string, formTemplateId: string, rev: string): Promise; /** * Returns an instance of modified form template. * @summary Modify a form template in a group * @param groupId the id of the group * @param formTemplateId the id of the form template to modify * @param body the form template with updated data */ updateFormTemplateInGroup(groupId: string, formTemplateId: string, body?: FormTemplate): Promise; /** * @summary Update a form template's layout in a group using multipart upload * @param groupId the id of the group * @param attachment the layout data * @param formTemplateId the id of the form template */ setTemplateAttachmentMultiInGroup(groupId: string, attachment: ArrayBuffer, formTemplateId: string): Promise; /** * @summary Update a form template's layout in a group * @param groupId the id of the group * @param formTemplateId the id of the form template * @param payload the layout data as binary */ setTemplateAttachmentInGroup(groupId: string, formTemplateId: string, payload: ArrayBuffer): Promise; /** * @summary Create a batch of form templates in a group * @param groupId the id of the group * @param formTemplates the form templates to create */ createFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise; /** * @summary Modify a batch of form templates in a group * @param groupId the id of the group * @param formTemplates the form templates to modify */ modifyFormTemplatesInGroup(groupId: string, formTemplates: FormTemplate[]): Promise; /** * @summary Get form templates in a group by their ids * @param groupId the id of the group * @param formTemplateIds the list of form template ids * @param raw whether to use raw mapping for the form templates */ getFormTemplatesInGroup(groupId: string, formTemplateIds: string[], raw?: boolean): Promise; /** * @summary Get a form template in a group * @param groupId the id of the group * @param formTemplateId the id of the form template * @param raw whether to use raw mapping for the form template */ getFormTemplateInGroup(groupId: string, formTemplateId: string, raw?: boolean): Promise; /** * @summary Delete a batch of form templates in a group * @param groupId the id of the group * @param formTemplateIdsAndRevs the list of form template ids and revisions */ deleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise; /** * @summary Undelete a batch of form templates in a group * @param groupId the id of the group * @param formTemplateIdsAndRevs the list of form template ids and revisions */ undeleteFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise; /** * @summary Purge a batch of form templates in a group * @param groupId the id of the group * @param formTemplateIdsAndRevs the list of form template ids and revisions */ purgeFormTemplatesInGroup(groupId: string, formTemplateIdsAndRevs: IdWithRev[]): Promise; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareForms(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareFormsMinimal(request: BulkShareOrUpdateMetadataParams): Promise; /** * Retrieves the ids of all the forms that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the forms that have conflicts. * @return the ids of the forms with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the form with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a form. * @param entityId the id of the form to retrieve the conflicts for. * @return the conflicting revisions of the form. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the form 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 form. * @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 forms that have conflicts, in the given group. * @param groupId the id of the group to look into. * @return the ids of the forms 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 form, in the given group. * @param groupId the id of the group the form belongs to. * @param entityId the id of the form to retrieve the conflicts for. * @return the conflicting revisions of the form. */ 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 form, in the given group. * @param groupId the id of the group the form 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 forms with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the forms with the given ids. * @param entityIds the ids of the forms 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 forms with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the forms 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>; }