import { Response } from 'express';
import { ReportQuery } from '../types/ReportQuery.js';
import { RestClient } from './restClient.js';
import { components } from '../types/api.d.js';
import { ApiConfig, ListWithWarnings } from './types.d.js';

import Dict = NodeJS.Dict;

declare class ReportingClient {
    restClient: RestClient;
    constructor(config: ApiConfig);
    getCount(resourceName: string, token: string, countRequest: ReportQuery): Promise<number>;
    getList(resourceName: string, token: string, listRequest: ReportQuery): Promise<Array<Dict<string>>>;
    getListWithWarnings(resourceName: string, token: string, listRequest: ReportQuery): Promise<ListWithWarnings>;
    getDefinitionSummary(token: string, reportId: string, definitionsPath?: string): Promise<components['schemas']['ReportDefinitionSummary']>;
    getDefinitions(token: string, definitionsPath?: string): Promise<Array<components['schemas']['ReportDefinitionSummary']>>;
    getDefinition(token: string, reportId: string, variantId: string, definitionsPath?: string, queryData?: Dict<string | string[]>): Promise<components['schemas']['SingleVariantReportDefinition']>;
    requestAsyncReport(token: string, reportId: string, variantId: string, query: Record<string, string | boolean | number>): Promise<Dict<string>>;
    cancelAsyncRequest(token: string, reportId: string, variantId: string, executionId: string, dataProductDefinitionsPath?: string): Promise<Dict<string>>;
    downloadAsyncReport(token: string, reportId: string, variantId: string, tableId: string, query: Record<string, string | string[]>, res: Response): Promise<void>;
    downloadSyncReport(token: string, resourceName: string, query: Record<string, string | string[]>, res: Response): Promise<void>;
    getAsyncReport(token: string, reportId: string, variantId: string, tableId: string, query: Record<string, string | string[]>): Promise<Array<Record<string, string>>>;
    getAsyncSummaryReport(token: string, reportId: string, variantId: string, tableId: string, summaryId: string, query: Dict<string | number>): Promise<Array<Record<string, string>>>;
    getAsyncReportStatus(token: string, reportId: string, variantId: string, executionId: string, dataProductDefinitionsPath?: string, tableId?: string): Promise<components['schemas']['StatementExecutionStatus']>;
    getAsyncCount(token: string, tableId: string, dataProductDefinitionsPath?: string): Promise<number>;
    getAsyncInteractiveCount(token: string, tableId: string, reportId: string, id: string, filters: ReportQuery): Promise<number>;
    /**
     * Gets the expiry state for tables
     *
     * @param {string} token
     * @param {string[]} tableIds
     * @return {*}
     * @memberof ReportingClient
     */
    getTableExpiryState(token: string, tableIds: string[]): Promise<components['schemas']['ResultTableExpiryState'][]>;
    logInfo(title: string, args?: Dict<string>): void;
}

export { ReportingClient, ReportingClient as default };
