import { components } from 'src/dpr/types/api';
import { Request, Response } from 'express';
import { Services } from '../../types/Services';
import { AsyncSummary, LoadType, ReportType, RequestedReport } from '../../types/UserReports';
import { ExtractedDefinitionData, ExtractedRequestData } from '../../routes/journeys/view-report/async/report/types';
import { Columns } from './report-heading/report-columns/report-columns-form/types';
import { DownloadActionParams, ReportAction } from './report-heading/report-actions/types';
import { Pagination } from './report-page/report-template/report-pagination/types';
import { ReportTemplateData } from '../../utils/TemplateBuilder/SectionedDataHelper/types';
import { DataTable } from '../../utils/DataTableBuilder/types';
import { FilterValue } from '../_filters/types';
import { ChildData } from '../../utils/TemplateBuilder/ParentChildDataBuilder/types';
import ReportQuery from '../../types/ReportQuery';
import { AppliedFilterChip } from '../_filters/filters-applied/utils';
export default class Report {
    readonly services: Services;
    readonly res: Response;
    readonly req: Request;
    readonly definition: components['schemas']['SingleVariantReportDefinition'];
    readonly loadType: LoadType;
    readonly requestData?: RequestedReport | undefined;
    id: string;
    reportId: string;
    tableId: string;
    token: string;
    userId: string;
    variant: components['schemas']['VariantDefinition'];
    specification: components['schemas']['Specification'];
    reportData: Record<string, string>[];
    childData: ChildData[];
    summariesData: AsyncSummary[];
    reportDetails: ExtractedDefinitionData;
    actions: {
        actions: ReportAction[];
        downloadConfig: DownloadActionParams | undefined;
        bookmarkConfig: {
            bookmarkActionEndpoint: string;
            showBookmark: boolean;
            linkText: string;
            linkType: string;
        };
        feedbackFormHref: string | undefined;
    };
    columns: Columns;
    count: number;
    pagination: Pagination;
    totals: string;
    dataTable: DataTable | ReportTemplateData;
    filterData: FilterValue[];
    savedDefaultsConfig: {
        hasDefaults: boolean | undefined;
        saveDefaultsEnabled: boolean;
    };
    reportQuery: ReportQuery;
    appliedFilters: AppliedFilterChip[];
    extractedRequestData: ExtractedRequestData | undefined;
    constructor(services: Services, res: Response, req: Request, definition: components['schemas']['SingleVariantReportDefinition'], loadType: LoadType, requestData?: RequestedReport | undefined);
    build: () => Promise<{
        renderData: {
            totals: string;
            dataTable: DataTable | ReportTemplateData;
            executionId?: string | undefined;
            requestedTimestamp?: string | undefined;
            querySummary?: NodeJS.Dict<string>[];
            queryData?: NodeJS.Dict<string | string[]> | undefined;
            requestUrl?: import("../../types/UserReports").AsyncReportUrlItemData | undefined;
            defaultQuery?: string | undefined;
            dataProductDefinitionsPath?: string | undefined;
            pagination: Pagination;
            reportName: string;
            name: string;
            description: string | undefined;
            classification: string | undefined;
            printable: boolean;
            specification: components["schemas"]["Specification"];
            template: string;
            fields: components["schemas"]["FieldDefinition"][];
            actions: ReportAction[];
            downloadConfig: DownloadActionParams | undefined;
            bookmarkConfig: {
                bookmarkActionEndpoint: string;
                showBookmark: boolean;
                linkText: string;
                linkType: string;
            };
            feedbackFormHref: string | undefined;
            loadType: LoadType;
            csrfToken: string;
            type: ReportType;
            tableId?: string;
            id: string;
            reportId: string;
            count: number;
            hasDefaults: boolean | undefined;
            saveDefaultsEnabled: boolean;
            columns: Columns;
            filterData: FilterValue[];
            appliedFilters: AppliedFilterChip[];
        };
    }>;
    /**
     * Gets all the report data
     *
     */
    getData: () => Promise<void>;
    /**
     * Gets the report data
     */
    getReportData: () => Promise<void>;
    private getAysncData;
    private getSyncData;
    /**
     * Gets the summaries data for summary tables
     * NOTE: Only available for Async
     *
     * @return {*}
     */
    getSummariesData: () => Promise<void>;
    /**
     * Gets the child date for a parent child report
     * NOTE: Only available for Async
     *
     */
    setChildData: () => Promise<void>;
    getChildData: (childVariants: components["schemas"]["ChildVariantDefinition"][], services: Services, token: string, req: Request, res: Response, requestData?: RequestedReport) => Promise<ChildData[]>;
    /**
     * Builds the report table
     *
     */
    buildTable: () => void;
    /**
     * Gets the relevant report details from the report definition
     *
     */
    buildReportDetails: () => void;
    /**
     * Gets the reports meta data required to load a report
     *
     * @return {*}
     */
    buildReportMeta: () => {
        loadType: LoadType;
        csrfToken: string;
        type: ReportType;
        tableId?: string;
        id: string;
        reportId: string;
    };
    /**
     * Extracts the relevant data from the requested report data
     *
     * @param {RequestedReport} requestData
     * @return {*}  {ExtractedRequestData}
     */
    extractDataFromRequest: (requestData: RequestedReport) => ExtractedRequestData;
    /**
     * Builds the report actions:
     * - download config
     * - bookmark config
     * - general actions
     */
    buildActions: () => void;
    /**
     * Build thee filters
     *
     */
    buildFilters: () => Promise<void>;
    buildSavedDefaultsConfig: () => Promise<void>;
    /**
     * Builds the applied filters buttons
     *
     */
    buildAppliedFilters: () => void;
    /**
     * Build columns
     *
     */
    buildColumns: () => void;
    /**
     * Builds the pagination config for a report
     */
    buildPagination: () => void;
    /**
     * Gets the row count
     *
     * @return {*}
     */
    getCount: () => Promise<void>;
    /**
     * Builds the report query
     *
     */
    buildReportQuery: () => void;
}
