@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
40 lines (39 loc) • 1.49 kB
TypeScript
import type { Response } from 'express';
import { SetQueryFromFiltersResult } from 'src/dpr/components/_async/async-filters-form/types';
import { ChildReportExecutionData, ExecutionData } from 'src/dpr/types/ExecutionData';
import { AsyncReportUrlData, ReportType, RequestFormData } from 'src/dpr/types/UserReports';
export interface ReportData {
type: ReportType;
reportId: string;
reportName: string;
description: string;
id: string;
name: string;
schedule?: string;
}
export declare class StoreItemBuilder {
readonly res: Response;
executionData: ExecutionData;
childExecutionData: ChildReportExecutionData[];
syncUrl: AsyncReportUrlData | undefined;
queryData: SetQueryFromFiltersResult | undefined;
reportType: ReportType;
constructor(res: Response);
withExecutionData: (executionData: ExecutionData) => this;
withChildExecutionData: (childExecutionData?: ChildReportExecutionData[]) => this;
withSyncUrls: (url?: AsyncReportUrlData) => this;
withQueryData: (queryData: SetQueryFromFiltersResult | undefined) => this;
buildReportMetaData: (reportData: ReportData | RequestFormData) => {
schedule?: string;
type: ReportType;
reportId: string;
reportName: string;
description: string;
id: string;
name: string;
};
buidDefinitionsPath: () => {
dataProductDefinitionsPath: string;
dpdPathFromQuery: boolean;
} | undefined;
}