{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pricklymails-com/json-schema/pricklymails-com-list-notifications-response-schema.json",
  "title": "ListNotificationsResponse",
  "description": "`GET /api/notifications` response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pricklymails-com-notifications-api-openapi.yml#/components/schemas/ListNotificationsResponse",
  "type": "object",
  "required": [
    "notifications",
    "has_more",
    "unseen_count"
  ],
  "properties": {
    "has_more": {
      "type": "boolean",
      "description": "Whether older events follow this page."
    },
    "last_seen_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The caller's stored cursor, or `null` when it has never been advanced."
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "The token to pass back as `cursor` to read the next page, present only when `has_more` is true."
    },
    "notifications": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/NotificationResponse"
      },
      "description": "The page, newest first."
    },
    "unseen_count": {
      "type": "integer",
      "format": "int64",
      "description": "How many events are newer than the caller's cursor."
    }
  },
  "$defs": {
    "NotificationResponse": {
      "type": "object",
      "description": "One notification line.",
      "required": [
        "id",
        "event_type",
        "translation_key",
        "family",
        "severity",
        "params",
        "occurred_at"
      ],
      "properties": {
        "event_type": {
          "type": "string",
          "description": "The event's slug, which doubles as the page's filter value."
        },
        "family": {
          "type": "string",
          "description": "The group the event is filed under, for the family filter."
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The event's UUID, so a client can key a rendered line."
        },
        "occurred_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the event was recorded."
        },
        "params": {
          "type": "object",
          "description": "The values the event's text interpolates: a flat object of strings and whole numbers, empty when the text has\nnone."
        },
        "severity": {
          "type": "string",
          "description": "How loudly the event presents itself, driving its accent."
        },
        "translation_key": {
          "type": "string",
          "description": "The dashboard locale key carrying this event's text.\n\nThe API ships the key and never a rendered sentence, so a reader who switches language reads past events in\ntheir new language rather than in whatever was current when they happened."
        }
      }
    }
  }
}