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.

27 lines (26 loc) 1.55 kB
import type { Response } from 'express'; export declare const FEATURE_FLAG_NAMESPACE = "hmpps-digital-prison-reporting"; export declare const FEATURE_FLAG_KEYS: { readonly SAVE_DEFAULTS: "saveDefaultsEnabled"; readonly STREAMING_DOWNLOAD: "streamingDownloadEnabled"; readonly BAR_CHARTS: "barChartsEnabled"; readonly LINE_CHARTS: "lineChartsEnabled"; readonly DONUT_CHARTS: "donutChartsEnabled"; readonly SCORECARD_CHARTS: "scorecardChartsEnabled"; readonly SCORECARD_GROUP_CHARTS: "scorecardgroupChartsEnabled"; readonly MATRIX_TIMESERIES_CHARTS: "matrixtimeseriesChartsEnabled"; readonly BAR_TIMESERIES_CHARTS: "bartimeseriesChartsEnabled"; readonly LINE_TIMESERIES_CHARTS: "linetimeseriesChartsEnabled"; }; export type FeatureFlagKey = (typeof FEATURE_FLAG_KEYS)[keyof typeof FEATURE_FLAG_KEYS]; export declare const DASHBOARD_VISUALISATION_FEATURE_FLAGS: readonly FeatureFlagKey[]; export declare const FEATURE_FLAGS: readonly FeatureFlagKey[]; export declare const DEFAULT_FEATURE_FLAG_ENTITY_ID = "anonymous"; export interface FeatureFlagEvaluationSubject { entityId: string; context: Record<string, string>; } export declare const createFeatureFlagEvaluationSubject: (entityId?: string) => FeatureFlagEvaluationSubject; export declare const getFeatureFlagEvaluationSubject: (res: Response) => FeatureFlagEvaluationSubject; export declare const getFeatureFlagFallbackState: (flagKey: FeatureFlagKey) => boolean; export declare const isFeatureFlagFailOpen: (flagKey: FeatureFlagKey) => boolean;