UNPKG

@ministryofjustice/hmpps-digital-prison-reporting-frontend

Version:

The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.

29 lines (28 loc) 2.8 kB
import { Response } from 'express'; import { components } from '../types/api'; import type ReportingClient from '../data/reportingClient'; import ReportQuery from '../types/ReportQuery'; import Dict = NodeJS.Dict; import { ListWithWarnings } from '../data/types'; declare class ReportingService { private readonly reportingClient; constructor(reportingClient: ReportingClient); getCount(resourceName: string, token: string, listRequest: ReportQuery): Promise<number>; getList(resourceName: string, token: string, listRequest: ReportQuery): Promise<Array<NodeJS.Dict<string>>>; getListWithWarnings(resourceName: string, token: string, listRequest: ReportQuery): Promise<ListWithWarnings>; getDefinitionSummary(token: string, reportId: string, dataProductDefinitionsPath?: string): Promise<components['schemas']['ReportDefinitionSummary']>; getDefinitions(token: string, dataProductDefinitionsPath?: string): Promise<Array<components['schemas']['ReportDefinitionSummary']>>; getDefinition(token: string, reportId: string, variantId: string, dataProductDefinitionsPath?: string, query?: 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>; getTableExpiryState(token: string, tableIds: string[]): Promise<components['schemas']['ResultTableExpiryState'][]>; } export { ReportingService }; export default ReportingService;