diff --git a/packages/app/schema/nl/__index.json b/packages/app/schema/nl/__index.json index b955224bdd..1aaad8a88f 100644 --- a/packages/app/schema/nl/__index.json +++ b/packages/app/schema/nl/__index.json @@ -32,6 +32,7 @@ "nursing_home", "proto_name", "reproduction", + "self_test_overall", "sewer", "tested_ggd", "tested_ggd_archived", @@ -241,6 +242,9 @@ }, "variants": { "$ref": "variants.json" + }, + "self_test_overall": { + "$ref": "self_test_overall.json" } }, "$defs": { diff --git a/packages/app/schema/nl/self_test_overall.json b/packages/app/schema/nl/self_test_overall.json new file mode 100644 index 0000000000..5d8975c870 --- /dev/null +++ b/packages/app/schema/nl/self_test_overall.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "nl_self_test_overall", + "type": "object", + "properties": { + "values": { + "type": "array", + "items": { + "$ref": "#/definitions/value" + } + }, + "last_value": { + "$ref": "#/definitions/value" + } + }, + "required": ["values", "last_value"], + "additionalProperties": false, + "definitions": { + "value": { + "title": "nl_self_test_overall_value", + "type": "object", + "properties": { + "infected_percentage": { + "type": ["number", "null"] + }, + "date_range_start_unix": { + "type": "integer" + }, + "date_range_end_unix": { + "type": "integer" + }, + "date_of_insertion_unix": { + "type": "integer" + } + }, + "required": ["infected_percentage", "date_range_start_unix", "date_range_end_unix", "date_of_insertion_unix"], + "additionalProperties": false + } + } +} diff --git a/packages/common/src/types/data.ts b/packages/common/src/types/data.ts index 020fa4d12a..a54978a585 100644 --- a/packages/common/src/types/data.ts +++ b/packages/common/src/types/data.ts @@ -280,6 +280,7 @@ export interface Nl { vaccine_coverage_per_age_group_estimated_archived_20220908: NlVaccineCoveragePerAgeGroupEstimatedArchived_20220908Value; vaccine_stock: NlVaccineStock; variants?: NlVariants; + self_test_overall: NlSelfTestOverall; } export interface NlDifference { tested_overall__infected_per_100k_moving_average: DifferenceDecimal; @@ -1134,12 +1135,23 @@ export interface NlVariantsVariantValue { date_of_insertion_unix: number; date_of_report_unix: number; } +export interface NlSelfTestOverall { + values: NlSelfTestOverallValue[]; + last_value: NlSelfTestOverallValue; +} +export interface NlSelfTestOverallValue { + infected_percentage: number | null; + date_range_start_unix: number; + date_range_end_unix: number; + date_of_insertion_unix: number; +} export type TopicalIcon = | 'AfstandSporten' | 'AlcoholVerkoop' | 'Archive' | 'Arrow' + | 'ArrowWithIntensity' | 'Arts' | 'Avondklok' | 'BarChart'