/** * API transport — executes queries against the real Lightdash async metrics endpoint. * * Flow: * 1. POST /api/v2/projects/{projectUuid}/query/metric-query * → returns { queryUuid } * 2. Poll GET /api/v2/projects/{projectUuid}/query/{queryUuid} * → returns results when status is 'ready' */ import type { Column, LightdashClientConfig, Transport } from './types'; /** * A function that performs HTTP requests and returns parsed JSON results. * The default implementation uses `Authorization: ApiKey` header. * Supply a custom adapter to use session cookies or other auth mechanisms. */ export type FetchAdapter = (method: string, path: string, body?: unknown, metadata?: Record) => Promise; export declare function mapColumnType(type: string): Column['type']; /** * Creates a transport that executes queries via the Lightdash REST API. * * @param config - Client configuration (projectUuid is required; apiKey/baseUrl * are used by the default fetch adapter but ignored when a custom adapter is provided) * @param adapter - Optional custom fetch adapter. When omitted, uses the default * adapter that authenticates via `Authorization: ApiKey` header. */ export declare function createApiTransport(config: LightdashClientConfig, adapter?: FetchAdapter): Transport;