/** * 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 { Receipt } from '../model/Receipt'; 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 { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'; import { ConflictResolutionResult } from '../model/ConflictResolutionResult'; import { ConflictResolutionStrategy } from '../model/ConflictResolutionStrategy'; import { MergeResult } from '../model/MergeResult'; export declare class IccReceiptApi { 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 receipt * @param body */ createReceipt(body?: Receipt): Promise; /** * @summary Deletes a batch of receipts. * * @param receiptIds a ListOfIds containing the ids of the receipts to delete. * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted receipts. */ deleteReceipts(receiptIds: ListOfIds): Promise>; /** * @summary Deletes a single receipt by id. * * @param receiptId the id of the receipt to delete. * @return a Promise that will resolve in the DocIdentifier of the deleted receipt. */ deleteReceipt(receiptId: string): Promise; /** * * @summary Gets a receipt * @param receiptId */ getReceipt(receiptId: string): Promise; /** * * @summary Get an attachment * @param receiptId * @param attachmentId * @param enckeys */ getReceiptAttachment(receiptId: string, attachmentId: string, enckeys?: null): Promise; /** * * @summary Gets a receipt * @param ref */ listByReference(ref: string): Promise>; /** * Lists the receipts created within the provided date interval, based on the `created` timestamp of the receipt. * Both bounds are inclusive and optional: an undefined bound leaves that side of the interval open. * @summary List the receipts created within a date interval * @param startDate the start of the interval as a unix epoch in ms (inclusive), no lower bound if undefined. * @param endDate the end of the interval as a unix epoch in ms (inclusive), no upper bound if undefined. * @param descending whether to sort the result from the most recently created receipt to the oldest. * @return the receipts created within the provided interval. */ listReceiptsBetweenDates(startDate?: number, endDate?: number, descending?: boolean): Promise>; /** * * @summary Updates a receipt * @param body */ modifyReceipt(body?: Receipt): Promise; /** * @deprecated use setReceiptAttachmentForBlobType instead */ setReceiptAttachment(receiptId: string, receiptRev: string, blobType: string, enckeys?: null, body?: ArrayBuffer): Promise; /** * @summary Creates a receipt's attachment * @param receiptId id of a receipt * @param receiptRev rev of the receipt * @param blobType receipt blob type * @param body content of the attachment, already encrypted */ setReceiptAttachmentForBlobType(receiptId: string, receiptRev: string, blobType: string, body: ArrayBuffer): Promise; /** * @summary Creates a receipt's data attachment with compression metadata * @param receiptId id of a receipt * @param blobType receipt blob type * @param rev revision of the receipt * @param body content of the attachment * @param compressionAlgorithm the compression algorithm used on the client side, if any * @param triedCompressionAlgorithmsVersion a version string for the compression algorithms tried * @param realDataSize the real size of the data after decryption and decompression */ setReceiptDataAttachment(receiptId: string, blobType: string, rev: string, body: ArrayBuffer, compressionAlgorithm?: string, triedCompressionAlgorithmsVersion?: string, realDataSize?: number): Promise; /** * @summary Get a receipt's attachment by blob type * @param receiptId id of the receipt * @param blobType the blob type of the attachment to retrieve */ getReceiptAttachmentByBlobType(receiptId: string, blobType: string): Promise; /** * @internal this method is for internal use only and may be changed without notice */ bulkShareReceipt(request: BulkShareOrUpdateMetadataParams): Promise[]>; /** * Retrieves the ids of all the receipts that currently have conflicting revisions and therefore need to * be resolved. * @summary List the ids of the receipts that have conflicts. * @return the ids of the receipts with unresolved conflicts. */ getConflictingEntitiesIds(): Promise>; /** * Retrieves all the conflicting revisions of the receipt with the given id (the current revision is not * included). The returned entities are still encrypted. * @summary Get the conflicting revisions of a receipt. * @param entityId the id of the receipt to retrieve the conflicts for. * @return the conflicting revisions of the receipt. */ getConflictsForEntity(entityId: string): Promise>; /** * Resolves a conflict by declaring which revision of the receipt 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 receipt. * @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 receipts with the given ids, according to the provided * {@link ConflictResolutionStrategy}. * @summary Automatically solve the conflicts of the receipts with the given ids. * @param entityIds the ids of the receipts 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 receipts with the given ids, in the given group. * @param groupId the id of the group to look into. * @param entityIds the ids of the receipts 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>; }