import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { FormattedDataSet } from '@mtna/data-core-ui/public_api'; import { MtnaLogger } from '@mtna/lib-ui'; import { SelectParameters, TabulationParameters } from '../models/index'; import { RdsApiService } from './rds-api.service'; export declare class RdsQueryService { protected apiService: RdsApiService; protected http: HttpClient; protected logger: MtnaLogger; /** base url for the query service */ protected get QUERY_URL(): string; /** url for the selected data product */ protected get DATA_PRODUCT_URL(): string; protected _countCache: Map; protected _selectCache: Map; protected _tabulateCache: Map; constructor(apiService: RdsApiService, http: HttpClient, logger: MtnaLogger); /** * Get record count. Runs a query to count the records of the specified data product. * @remarks This method uses caching, returns a cold observable. * @param refresh forces a cache refresh, will fetch a new value from the API. Defaults to false. * @returns the count of records for the `RdsApiService`'s selected data product */ count(refresh?: boolean): Observable; /** * Returns the select results. This can be in a different shape based on the `format` parameter. * By default it will return a {@link SimplifiedDataSet}, which is the equivalent of using `format=mtna_simple`. * A `format=MTNA` will return a {@link DataSet}. * * Valid format parameters are: amcharts, gcharts, mtna, mtna_simpl, * plotly_area, plotly_bar, plotly_boxplot, plotly_bubble, plotly_hist, plotly_h_bar, plotly_h_hist, plotly_line, * plotly_pie, plotly_scatter, plotly_ts * * @remarks This method uses caching, returns a cold observable. * @param params various select parameters * @param refresh forces a cache refresh, will fetch a new value from the API. Defaults to false. * @returns record level mircodata for the `RdsApiService`'s selected data product */ select(params: SelectParameters, refresh?: boolean): Observable; /** * Returns the tabulation results. This can be in a different shape based on the `format` parameter. * By default it will return a {@link SimplifiedDataSet}, which is the equivalent of using `format=mtna_simple`. * A `format=MTNA` will return a {@link DataSet}. * * Valid format parameters are: amcharts, gcharts, mtna, mtna_simpl, * plotly_area, plotly_bar, plotly_boxplot, plotly_bubble, plotly_hist, plotly_h_bar, plotly_h_hist, plotly_line, * plotly_pie, plotly_scatter, plotly_ts * * @remarks This method uses caching, returns a cold observable. * @param params various tabulation parameters * @param refresh forces a cache refresh, will fetch a new value from the API. Defaults to false. * @returns The result will be an extension of a FormattedDataSet. This is based on the `format` parameter. * By default it will return a {@link SimplifiedDataSet} */ tabulate(params: TabulationParameters, refresh?: boolean): Observable; /** * Combines the ID of the `RdsApiService`'s selected catalog and data product to be used as a cache map key. * @returns map key for a specific catalog and data product */ private _getCatalogDataProductMapKey; }