/// <reference types="node" />
import { IncomingMessage } from 'http';
import 'reflect-metadata';
import { Subject } from 'rxjs';
import sql from 'mssql';
import { DataSourceInfo, UserPayload } from './types.js';
import { SQLServerDataProvider } from '@memberjunction/sqlserver-dataprovider';
export declare const getUserPayload: (bearerToken: string, sessionId: string, dataSources: DataSourceInfo[], requestDomain?: string, requestApiKey?: string) => Promise<UserPayload>;
export declare const contextFunction: ({ setupComplete$, dataSource, dataSources }: {
    setupComplete$: Subject<unknown>;
    dataSource: sql.ConnectionPool;
    dataSources: DataSourceInfo[];
}) => ({ req }: {
    req: IncomingMessage;
}) => Promise<{
    dataSource: sql.ConnectionPool;
    dataSources: DataSourceInfo[];
    userPayload: UserPayload;
    providers: {
        provider: SQLServerDataProvider;
        type: "Read-Write" | "Read-Only";
    }[];
}>;
//# sourceMappingURL=context.d.ts.map