/// <reference types="fhir" />
import Attachment from '../lib/models/fhir/Attachment';
import { FetchResponse, Params, Record } from './types';
declare type IAttachment = {
    isImage?: boolean;
    hasPreview?: boolean;
    hasThumb?: boolean;
    id?: string;
};
export declare const getCleanAttachmentsFromResource: (resource: any) => any[];
export declare const setAttachmentsToResource: (resourceWithoutAttachments: fhir.DomainResource, attachments: Attachment[]) => fhir.DomainResource;
export declare const cleanResource: (fhirResource: fhir.DomainResource) => fhir.DomainResource;
export declare const attachBlobs: ({ encryptedFiles, ownerId, oldAttachments, newAttachments, resource, }: {
    encryptedFiles: Uint8Array[];
    ownerId: string;
    oldAttachments: File[];
    newAttachments: IAttachment[];
    resource: fhir.DomainResource;
}) => Promise<fhir.DomainResource[]>;
export declare const prepareSearchParameters: (params: Params) => {
    limit?: number;
    offset?: number;
    start_date?: string;
    end_date?: string;
    tags?: string[];
    exclude_tags?: string[];
    exclude_flags?: string[];
    annotations?: string[];
    resourceType?: string;
    partner?: string;
};
declare const fhirService: {
    setFhirVersion(fhirVersion: string): void;
    getFhirVersion(): string;
    createResource(ownerId: string, fhirResource: fhir.DomainResource, date?: Date, annotations?: string[]): Promise<Record>;
    handleAttachments(ownerId: string, resource: fhir.DomainResource): Promise<(fhir.DomainResource | {
        commonKeyId: string;
        encryptedKey: any;
    } | any[])[]>;
    updateResource(ownerId: string, fhirResource: fhir.DomainResource, date: Date, annotations?: string[]): Promise<Record>;
    updateAttachments(ownerId: string, resource: fhir.DomainResource, annotations: string[]): Promise<(fhir.DomainResource | {
        commonKeyId: string;
        encryptedKey: any;
    } | any[])[]>;
    fetchResource(ownerId: string, resourceId: string): Promise<Record>;
    deleteResource(ownerId: string, resourceId: string): Promise<void>;
    countResources(ownerId: string, params?: Params): Promise<number>;
    fetchResources(ownerId: string, params?: Params): Promise<FetchResponse<Record>>;
    downloadResource(ownerId: string, resourceId: string, options?: {
        imageSize: string;
    }): Promise<Record>;
};
export default fhirService;
