@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
159 lines (158 loc) • 6.46 kB
TypeScript
import { z } from 'zod';
export declare const BucketOptionsSchema: z.ZodObject<{
useRagColour: z.ZodDefault<z.ZodBoolean>;
buckets: z.ZodDefault<z.ZodArray<z.ZodObject<{
min: z.ZodOptional<z.ZodNumber>;
max: z.ZodOptional<z.ZodNumber>;
hexColour: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
baseColour: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare enum UnitType {
NUMBER = "NUMBER",
PERCENTAGE = "PERCENTAGE"
}
export declare const DashboardVisualisationUnitType: z.ZodEnum<typeof UnitType>;
export declare enum AggregateType {
SUM = "sum"
}
export declare const DashboardVisualisationAggregateType: z.ZodEnum<typeof AggregateType>;
export declare const DashboardVisualisationMeasureSchema: z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodEnum<typeof UnitType>>;
aggregate: z.ZodOptional<z.ZodEnum<typeof AggregateType>>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export declare const DashboardColumns: z.ZodObject<{
keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
optional: z.ZodDefault<z.ZodBoolean>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
measures: z.ZodArray<z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodEnum<typeof UnitType>>;
aggregate: z.ZodOptional<z.ZodEnum<typeof AggregateType>>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
equals: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>>;
expectNulls: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
export declare const DashboardVisualisationSchema: z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<{
list: "list";
doughnut: "doughnut";
bar: "bar";
"bar-timeseries": "bar-timeseries";
line: "line";
scorecard: "scorecard";
"scorecard-group": "scorecard-group";
"matrix-timeseries": "matrix-timeseries";
"line-timeseries": "line-timeseries";
}>;
display: z.ZodString;
description: z.ZodOptional<z.ZodString>;
options: z.ZodOptional<z.ZodObject<{
showLatest: z.ZodDefault<z.ZodBoolean>;
columnsAsList: z.ZodOptional<z.ZodBoolean>;
useRagColour: z.ZodDefault<z.ZodBoolean>;
buckets: z.ZodDefault<z.ZodArray<z.ZodObject<{
min: z.ZodOptional<z.ZodNumber>;
max: z.ZodOptional<z.ZodNumber>;
hexColour: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
baseColour: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
columns: z.ZodObject<{
keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
optional: z.ZodDefault<z.ZodBoolean>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
measures: z.ZodArray<z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodEnum<typeof UnitType>>;
aggregate: z.ZodOptional<z.ZodEnum<typeof AggregateType>>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
equals: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>>;
expectNulls: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>;
declare const DashboardVisualisationSchemas: {
DashboardVisualisationSchema: z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<{
list: "list";
doughnut: "doughnut";
bar: "bar";
"bar-timeseries": "bar-timeseries";
line: "line";
scorecard: "scorecard";
"scorecard-group": "scorecard-group";
"matrix-timeseries": "matrix-timeseries";
"line-timeseries": "line-timeseries";
}>;
display: z.ZodString;
description: z.ZodOptional<z.ZodString>;
options: z.ZodOptional<z.ZodObject<{
showLatest: z.ZodDefault<z.ZodBoolean>;
columnsAsList: z.ZodOptional<z.ZodBoolean>;
useRagColour: z.ZodDefault<z.ZodBoolean>;
buckets: z.ZodDefault<z.ZodArray<z.ZodObject<{
min: z.ZodOptional<z.ZodNumber>;
max: z.ZodOptional<z.ZodNumber>;
hexColour: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
baseColour: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
columns: z.ZodObject<{
keys: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
optional: z.ZodDefault<z.ZodBoolean>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
measures: z.ZodArray<z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodEnum<typeof UnitType>>;
aggregate: z.ZodOptional<z.ZodEnum<typeof AggregateType>>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>;
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
equals: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>>;
expectNulls: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
}, z.core.$strip>;
DashboardVisualisationMeasureSchema: z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
unit: z.ZodOptional<z.ZodEnum<typeof UnitType>>;
aggregate: z.ZodOptional<z.ZodEnum<typeof AggregateType>>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
DashboardVisualisationKeySchema: z.ZodObject<{
id: z.ZodString;
display: z.ZodOptional<z.ZodString>;
optional: z.ZodDefault<z.ZodBoolean>;
type: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
DashboardVisualisationUnitType: z.ZodEnum<typeof UnitType>;
DashboardVisualisationAggregateType: z.ZodEnum<typeof AggregateType>;
};
export default DashboardVisualisationSchemas;