import { DataSourceInfo, ProviderInfo } from './types';
import sql from 'mssql';
import { DatabaseProviderBase } from '@memberjunction/core';
type StreamCallback = (jsonObject: any) => void;
export declare function sendPostRequest(url: string, payload: any, useCompression: boolean, headers: Record<string, string> | null, streamCallback?: StreamCallback): Promise<any[]>;
export declare function GetReadOnlyDataSource(dataSources: DataSourceInfo[], options?: {
    allowFallbackToReadWrite: boolean;
}): sql.ConnectionPool & {
    query: (sql: string, params?: any) => Promise<any[]>;
};
export declare function GetReadOnlyProvider(providers: Array<ProviderInfo>, options?: {
    allowFallbackToReadWrite: boolean;
}): DatabaseProviderBase;
export declare function GetReadWriteProvider(providers: Array<ProviderInfo>, options?: {
    allowFallbackToReadOnly: boolean;
}): DatabaseProviderBase;
export declare function GetReadWriteDataSource(dataSources: DataSourceInfo[]): sql.ConnectionPool & {
    query: (sql: string, params?: any) => Promise<any[]>;
};
export declare function extendConnectionPoolWithQuery(pool: sql.ConnectionPool): sql.ConnectionPool & {
    query: (sql: string, params?: any) => Promise<any[]>;
};
export {};
//# sourceMappingURL=util.d.ts.map