@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
57 lines (54 loc) • 1.87 kB
TypeScript
import { Request, Response } from 'express';
import { Services } from '../../types/Services.d.js';
import { MyReportsOptions, DprMyReport, ListType, DprMyReportHeading, DprMyReportItem, MyReportsListTotals } from './types.js';
/**
* Initialises the "My Reports" component data
*
* @param {Request} req
* @param {Response} res
* @param {Services} services
* @return {*} {DprMyReport}
*/
declare const initMyReports: (req: Request, res: Response, services: Services, options?: MyReportsOptions | undefined) => Promise<DprMyReport | undefined>;
/**
* Init Requested Reports list
*
* @param {Request} req
* @param {Response} res
* @return {*}
*/
declare const initRequested: (req: Request, res: Response, options?: MyReportsOptions | undefined) => Promise<{
title: string;
listType: ListType;
csrfToken: string;
headings: DprMyReportHeading[];
items: DprMyReportItem[];
totals: MyReportsListTotals;
}>;
/**
* Init Viewed reports list
*
* @param {Request} req
* @param {Response} res
* @return {*}
*/
declare const initViewed: (req: Request, res: Response, options?: MyReportsOptions | undefined) => Promise<{
title: string;
listType: ListType;
csrfToken: string;
headings: DprMyReportHeading[];
items: DprMyReportItem[];
totals: MyReportsListTotals;
}>;
declare const initSubscribed: (req: Request, res: Response, options?: MyReportsOptions | undefined) => Promise<{
title: string;
listType: ListType;
csrfToken: string;
headings: DprMyReportHeading[];
items: DprMyReportItem[];
totals: MyReportsListTotals;
}>;
declare const _default: {
initMyReports: (req: Request, res: Response, services: Services, options?: MyReportsOptions | undefined) => Promise<DprMyReport | undefined>;
};
export { _default as default, initMyReports, initRequested, initSubscribed, initViewed };