import { StatusCodes } from 'http-status-codes';
import jsonpatch from 'fast-json-patch';
import { Bundle, Resource } from './../fhir-ts/index.js';
export interface IFhirResponse {
    status: StatusCodes;
    headers?: {
        Location?: string;
        ETag?: string;
        "Last-Modified"?: string;
    };
    body?: any;
}
export declare class FhirRouteError extends Error {
    readonly status: number;
    readonly details?: Record<string, any>;
    constructor(message: string, status?: number, details?: Record<string, any>);
}
export declare function splitUnderBase(pathname: string, basePath: string): string[];
export interface IClassifyOptions {
    basePath: string;
    allowedBasePaths?: string[];
    allowPostSearch?: boolean;
}
export interface IClassifyFhirRequestStrictParams {
    url: URL;
    headers: any;
    methodRaw: string;
    body?: any;
    token?: string;
    opts: IClassifyOptions;
    bundleType?: string;
}
export interface IFhirClient {
    PostResource(resource: string, domainResource: Resource): Promise<IFhirResponse>;
    PutResource(resource: string, domainResource: Resource, versionIdETag: string): Promise<IFhirResponse>;
    PatchResource(resource: string, resourceId: string, domainResource: Partial<Resource> | jsonpatch.Operation[], contentType: string, versionIdETag: string): Promise<IFhirResponse>;
    DeleteResource(resource: string, resourceId: string, versionIdETag: string): Promise<IFhirResponse>;
    GetResource(resource: string, resourceId: string): Promise<IFhirResponse>;
    GetResources(searchUrl: URL): Promise<IFhirResponse>;
    GetHistoryInstanceFhirResource(resource: string, resourceId: string, versionId: string): Promise<IFhirResponse>;
    GetHistoryFhirResource(searchUrl: URL): Promise<IFhirResponse>;
    GetHistoryFhirResources(searchUrl: URL): Promise<IFhirResponse>;
    GetAllFhirResources(searchUrl: URL): Promise<IFhirResponse>;
    GetMetadata(): Promise<IFhirResponse>;
    ProcessBatchOrTransactionResources(bundle: Bundle): Promise<IFhirResponse>;
    GetLatency(params: any): Promise<IFhirResponse>;
    GenericSearchTesting(resource: string, params: any): Promise<IFhirResponse>;
}
//# sourceMappingURL=commonTypes.d.ts.map