import { OnModuleInit } from '@nestjs/common';
import { IAnalyticsQuery, AnalyticsQueryOpts, ResultRow } from './analytics-query.protocol.js';

/**
 * CubeAnalyticsBackend — cube.js backend for the analytics query port.
 *
 * Connects to a running cube.js instance via @cubejs-client/core and
 * translates IAnalyticsQuery calls into cube.js query objects.
 *
 * @cubejs-client/core is an optional peer dependency; lazy-imported so
 * the module loads even if the package isn't installed. Consumers who
 * use the cube backend must install it separately:
 *   bun add @cubejs-client/core
 *
 * Provided by AnalyticsModule.forRoot({ backend: 'cube' }).
 */

declare class CubeAnalyticsBackend implements IAnalyticsQuery, OnModuleInit {
    private readonly apiUrl;
    private readonly apiSecret;
    private readonly logger;
    private cubejsApi;
    constructor(apiUrl: string, apiSecret: string);
    onModuleInit(): Promise<void>;
    execute(cube: string, measures: string[], dimensions: string[], where?: Record<string, any>, opts?: AnalyticsQueryOpts): Promise<ResultRow[]>;
}

export { CubeAnalyticsBackend };
