{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mantic/json-schema/mantic-notification-response-schema.json",
  "title": "NotificationResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mantic-notifications-api-openapi.yml#/components/schemas/NotificationResponse",
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "message": {
      "type": "string",
      "title": "Message"
    },
    "type": {
      "$ref": "#/$defs/NotificationType"
    },
    "read": {
      "type": "boolean",
      "title": "Read"
    },
    "related_entity_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Related Entity Id"
    },
    "related_entity_type": {
      "anyOf": [
        {
          "$ref": "#/$defs/NotificationEntityType"
        },
        {
          "type": "null"
        }
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "message",
    "type",
    "read",
    "created_at"
  ],
  "$defs": {
    "NotificationEntityType": {
      "type": "string",
      "enum": [
        "question",
        "list"
      ],
      "title": "NotificationEntityType"
    },
    "NotificationType": {
      "type": "string",
      "enum": [
        "forecast_complete",
        "forecast_failed",
        "forecast_changed",
        "system",
        "list_generation_started",
        "list_generation_complete"
      ],
      "title": "NotificationType"
    }
  }
}