import { IncomingMessage, ServerResponse } from 'http'; type CliSessionResponse = { sessionId: string; state: string; authorizeUrl: string; expiresAt: string; }; type Project = { name: string; slug: string; orgId: string; }; type Org = { slug: string; orgId: string; name: string; }; type CliExchangeResponse = { token: string; email: string; firstName: string; lastName: string; projects?: Project[]; organizations?: Org[]; memberships?: unknown[]; downloadApiKey?: string; }; type CallbackPayload = { sessionId: string; state: string; exchangeCode: string; }; type AuthFilePayload = { token: string; user: { email: string; firstName: string; lastName: string; }; projects: Project[]; organizations: Org[]; memberships: unknown[]; downloadApiKey: string; serverUrl: string; }; export declare const getBaseUrl: () => string; export declare const getClientName: () => string; export declare const openBrowser: (url: string) => Promise; export declare const writeAuthFile: ({ payload, serverUrl, }: { payload: CliExchangeResponse; serverUrl: string; }) => Promise; export declare const respondJson: (res: ServerResponse, statusCode: number, body: Record) => void; export declare const readJsonBody: (req: IncomingMessage) => Promise; export declare const createLoginSession: ({ baseUrl, clientName, callbackUrl, }: { baseUrl: string; clientName: string; callbackUrl: string; }) => Promise; export declare const exchangeSession: ({ baseUrl, payload, }: { baseUrl: string; payload: CallbackPayload; }) => Promise; export declare const waitForExchangeWithTimeout: (exchangePromise: Promise) => Promise; export declare const startCallbackServer: ({ baseUrl, }: { baseUrl: string; }) => Promise<{ callbackUrl: string; waitForExchange: () => Promise; close: () => Promise; }>; declare const login: () => Promise; export default login;