From eb2be975c1dd61686a7073096f82b1c4e3c64b2e Mon Sep 17 00:00:00 2001 From: ReaperOfVeriod Date: Sun, 25 Oct 2026 04:53:29 +0100 Subject: [PATCH] add administrator notifications contract --- contracts/v1/admin-notifications-response.json | 18 ++++++++++++++++++ fixtures/v1/admin-notifications.response.json | 11 +++++++++++ 2 files changed, 29 insertions(+) create mode 100644 contracts/v1/admin-notifications-response.json create mode 100644 fixtures/v1/admin-notifications.response.json diff --git a/contracts/v1/admin-notifications-response.json b/contracts/v1/admin-notifications-response.json new file mode 100644 index 0000000..ddaa129 --- /dev/null +++ b/contracts/v1/admin-notifications-response.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "required": ["id", "severity", "title", "message", "seen_at", "resolved_at", "created_at"], + "properties": { + "id": { "type": "string", "format": "uuid" }, + "severity": { "type": "string", "enum": ["info", "warning", "error"] }, + "title": { "type": "string" }, + "message": { "type": "string" }, + "seen_at": { "type": ["string", "null"], "format": "date-time" }, + "resolved_at": { "type": ["string", "null"], "format": "date-time" }, + "created_at": { "type": "string", "format": "date-time" } + } + } +} diff --git a/fixtures/v1/admin-notifications.response.json b/fixtures/v1/admin-notifications.response.json new file mode 100644 index 0000000..f028d53 --- /dev/null +++ b/fixtures/v1/admin-notifications.response.json @@ -0,0 +1,11 @@ +[ + { + "id": "00000000-0000-0000-0000-000000000001", + "severity": "warning", + "title": "IP permanently rate-limited", + "message": "A source IP reached the login failure limit and requires review.", + "seen_at": null, + "resolved_at": null, + "created_at": "2026-10-25T12:00:00Z" + } +]