import { ISTSLogger } from '@nsshunt/stsutils';
import { Bundle, Resource } from './../fhir-ts/index.js';
import { SocketIoClient } from '@nsshunt/stssocketioutils';
import { ServerToClientEvents, ClientToServerEvents, ISocketIoBaseParams } from './wsevents.js';
import { Socket } from 'socket.io-client';
import { IAgentManager } from '@nsshunt/stsutils';
import { IFhirResponse, IFhirClient } from './commonTypes.js';
import jsonpatch from 'fast-json-patch';
export interface IFhirSocketClientOptions {
    socketClientName: string;
    fhirServerEndpoint: string;
    fhirServerPort: string;
    fhirapiroot: string;
    socketIoCustomPath: string;
    timeout: number;
    joinRooms: string[];
    logger?: ISTSLogger;
    agentManager?: IAgentManager;
    baseUrl: string;
    authToken: string;
    GetAccessToken: () => Promise<string>;
}
export declare abstract class FhirSocketClient extends SocketIoClient<ServerToClientEvents, ClientToServerEvents> implements IFhirClient {
    protected id: string;
    protected options: IFhirSocketClientOptions;
    protected accessToken: string;
    constructor(clientName: string, options: IFhirSocketClientOptions);
    protected SocketConnect(socket: Socket<ServerToClientEvents, ClientToServerEvents>): void;
    protected SocketError(error: Error): void;
    protected SocketConnectError(error: Error): void;
    protected SocketDisconnect(reason: string): void;
    protected SetupSocketEvents(socket: Socket<ServerToClientEvents, ClientToServerEvents>): void;
    protected SetupWSSClient: () => Promise<void>;
    WaitForSocketConnected: () => Promise<boolean>;
    WithAccessToken: (accessToken: string) => this;
    protected GetBaseParams: (resource: string) => ISocketIoBaseParams;
    protected EmitCommand: (command: string, params: any) => Promise<IFhirResponse>;
    abstract PostResource(resource: string, domainResource: Resource): Promise<IFhirResponse>;
    abstract PutResource(resource: string, domainResource: Resource, versionIdETag: string): Promise<IFhirResponse>;
    abstract PatchResource(resource: string, resourceId: string, domainResource: Partial<Resource> | jsonpatch.Operation[], contentType: string, versionIdETag: string): Promise<IFhirResponse>;
    abstract DeleteResource(resource: string, resourceId: string, versionIdETag: string): Promise<IFhirResponse>;
    abstract GetResource(resource: string, resourceId: string): Promise<IFhirResponse>;
    abstract GetResources(searchUrl: URL): Promise<IFhirResponse>;
    abstract GetHistoryInstanceFhirResource(resource: string, resourceId: string, versionId: string): Promise<IFhirResponse>;
    abstract GetHistoryFhirResource(searchUrl: URL): Promise<IFhirResponse>;
    abstract GetHistoryFhirResources(searchUrl: URL): Promise<IFhirResponse>;
    abstract GetAllFhirResources(searchUrl: URL): Promise<IFhirResponse>;
    abstract GetMetadata(): Promise<IFhirResponse>;
    abstract ProcessBatchOrTransactionResources(bundle: Bundle): Promise<IFhirResponse>;
    abstract GetLatency(params: any): Promise<IFhirResponse>;
    abstract GenericSearchTesting(resource: string, params: any): Promise<IFhirResponse>;
}
//# sourceMappingURL=fhirSocketClient.d.ts.map