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.

37 lines (36 loc) 1.17 kB
import { type RequestHandler } from 'express'; import type { Environment } from 'nunjucks'; import { Services } from '../types/Services'; import { DprConfig } from '../types/DprConfig'; /** * Middleware helper to populate all locals configuration * to enable DPR lib to operate correctly within a service. * * @param {Services} services * @param {string} layoutPath * @param {Environment} env * @param {DprConfig} [config] * @return {*} {RequestHandler} */ export declare const setupResources: (services: Services, layoutPath: string, env: Environment, config?: DprConfig) => RequestHandler; /** * Checks if the get definition endpoint should be run * * @export * @param {{ lastDefinitionsCheck?: number }} session * @param {DprConfig} [config] * @return {*} {boolean} */ export declare function shouldRunDefinitionsCheck(session: { lastDefinitionsCheck?: number; }, config?: DprConfig): boolean; /** * Records the last run into the session * * @export * @param {{ lastDefinitionsCheck?: number }} session */ export declare function recordDefinitionsCheck(session: { lastDefinitionsCheck?: number; }): void; export default setupResources;