/// <reference types="fhir" />
import { DecryptedAppData } from './appDataService';
export interface EncryptedDataKey {
    commonKeyId: string;
    encryptedKey: string;
}
export interface Key {
    t: string;
    v: number;
    sym: string;
}
export interface DecryptedRecord {
    id?: string;
    fhirResource?: fhir.DomainResource;
    tags?: string[];
    attachmentKey?: EncryptedDataKey;
    customCreationDate?: Date;
    updatedDate?: Date;
    commonKeyId?: string;
}
export interface QueryParams {
    limit?: number;
    offset?: number;
    start_date?: string;
    end_date?: string;
    tags?: string[];
    exclude_tags?: string[];
}
declare const recordService: {
    updateRecord(ownerId: string, record: DecryptedRecord | DecryptedAppData): Promise<DecryptedRecord | DecryptedAppData>;
    createRecord(ownerId: string, record: DecryptedRecord): Promise<DecryptedRecord>;
    uploadFhirRecord(ownerId: string, record: DecryptedRecord, uploadRequest: Promise<DecryptedRecord>): Promise<DecryptedRecord>;
    uploadRecord(ownerId: string, record: DecryptedRecord | DecryptedAppData, uploadRequest: (userId: string, data: object) => Promise<DecryptedRecord | DecryptedAppData>): Promise<{
        data: any;
        customCreationDate: any;
        id: any;
        tags: string[];
        updatedDate: any;
    } | {
        fhirResource: fhir.DomainResource;
        customCreationDate: any;
        id: any;
        tags: string[];
        updatedDate: any;
    }>;
    downloadRecord(ownerId: string, recordId: string): Promise<DecryptedRecord>;
    searchRecords(ownerId: string, params: QueryParams, countOnly?: boolean): Promise<any>;
    deleteRecord(ownerId: string, recordId: string): any;
    decryptResourceAndTags(record: any, tagKey: Key): Promise<DecryptedRecord>;
};
export default recordService;
