/** * 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 { CalendarItem } from '../model/CalendarItem'; import { DocIdentifier } from '../model/DocIdentifier'; import { ListOfIds } from '../model/ListOfIds'; 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 { PaginatedListCalendarItem } from '../model/PaginatedListCalendarItem'; import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccCalendarItemApi { 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 Creates a calendarItem * @param body */ createCalendarItem(body?: CalendarItem): Promise; /** * @summary Deletes a calendarItem by id. * * @summary Deletes an calendarItem * @param calendarItemId the id of calendarItem to delete. * @return a Promise that will resolve in the DocIdentifier of the deleted calendarItem. */ deleteCalendarItem(calendarItemId: string): Promise; /** * @summary Deletes a batch of calendarItems by id. * * @summary Deletes calendarItems * @param body a ListOfIds containing the ids of the calendarItems to delete. * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted calendarItems. */ deleteCalendarItems(body?: ListOfIds): Promise>; /** * @deprecated use {@link findCalendarItemIdsByDataOwnerPatientStartTime} instead. * @summary Find CalendarItems by hcparty and patient * @param body * @param hcPartyId */ findCalendarItemsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array): Promise>; /** * @deprecated use {@link findCalendarItemIdsByDataOwnerPatientStartTime} instead. * @summary Find CalendarItems by hcparty and patient * @param hcPartyId * @param secretFKeys */ findCalendarItemsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise>; /** * @deprecated use {@link findCalendarItemsByRecurrenceIdWithPagination} instead. * * @summary Find CalendarItems by recurrenceId * @param recurrenceId */ findCalendarItemsByRecurrenceId(recurrenceId: string): Promise>; /** * * @summary Find CalendarItems by recurrenceId * @param recurrenceId the recurrence id. * @param startKey the startKey provided by the previous page or undefined for the first page. * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page. * @param limit the number of elements that the page should contain. * @return a promise that will resolve in a PaginatedListAccessLog. */ findCalendarItemsByRecurrenceIdWithPagination(recurrenceId: string, startKey?: string, startDocumentId?: string, limit?: number): Promise; /** * * @summary Gets a calendarItem * @param calendarItemId */ getCalendarItem(calendarItemId: string): Promise; /** * @deprecated use {@link getCalendarItemsWithPagination} instead * * @summary Gets all calendarItems */ getCalendarItems(): Promise>; /** * @summary gets all Calendar Items with pagination. * * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page. * @param limit the size of the page * @return a promise that will resolve in a PaginatedListCalendarItem. */ getCalendarItemsWithPagination(startDocumentId?: string, limit?: number): Promise; /** * * @summary Get CalendarItems by Period and HcPartyId * @param startDate * @param endDate * @param hcPartyId */ getCalendarItemsByPeriodAndHcPartyId(startDate: number, endDate: number, hcPartyId: string): Promise>; /** * * @summary Get calendarItems by id * @param body */ getCalendarItemsWithIds(body?: ListOfIds): Promise>; /** * * @summary Get CalendarItems by Period and AgendaId * @param startDate * @param endDate * @param agendaId */ getCalendarsByPeriodAndAgendaId(startDate: number, endDate: number, agendaId: string): Promise>; /** * * @summary Modifies an calendarItem * @param body */ modifyCalendarItem(body?: CalendarItem): Promise; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareCalendarItems(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareCalendarItemsMinimal(request: BulkShareOrUpdateMetadataParams): Promise; /** * @summary List CalendarItem ids by data owner and a set of secret foreign key. The ids will be sorted by CalendarItem startTime, 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 calendar item ids since the beginning of time will be returned. * @param endDate a timestamp in epoch milliseconds. If undefined, all the calendar item ids until the end of time will be returned. * @param descending whether to return the ids ordered in ascending or descending order by CalendarItem startTime * @return a promise that will resolve in an Array of CalendarItem ids. */ findCalendarItemIdsByDataOwnerPatientStartTime(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise; /** * Retrieves the ids of all the calendar items that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the calendar items that have conflicts. * @return the ids of the calendar items with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the calendar item with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a calendar item. * @param entityId the id of the calendar item to retrieve the conflicts for. * @return the conflicting revisions of the calendar item. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the calendar item 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 calendar item. * @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 calendar items with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the calendar items with the given ids. * @param entityIds the ids of the calendar items 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 calendar items with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the calendar items 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>; }