{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eurobase-dev/json-schema/eurobase-dev-notifications-read-response-schema.json",
  "title": "NotificationsReadResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eurobase-dev-notifications-api-openapi.yml#/components/schemas/NotificationsReadResponse",
  "type": "object",
  "required": [
    "ok",
    "updatedCount",
    "notificationSummary"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "notificationId": {
      "type": [
        "string",
        "null"
      ]
    },
    "updatedCount": {
      "type": "integer"
    },
    "readAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "archivedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "notificationSummary": {
      "$ref": "#/$defs/NotificationSummary"
    },
    "listPatch": {
      "anyOf": [
        {
          "$ref": "#/$defs/NotificationsResponse"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "Notification": {
      "type": "object",
      "required": [
        "id",
        "category",
        "severity",
        "title",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "organizationId": {
          "type": [
            "string",
            "null"
          ]
        },
        "projectId": {
          "type": [
            "string",
            "null"
          ]
        },
        "deploymentId": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "info",
            "warning",
            "critical"
          ]
        },
        "tone": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "success",
            "warning",
            "error",
            "info"
          ]
        },
        "title": {
          "type": "string"
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        },
        "resourceType": {
          "type": [
            "string",
            "null"
          ]
        },
        "resourceId": {
          "type": [
            "string",
            "null"
          ]
        },
        "resourceLabel": {
          "type": [
            "string",
            "null"
          ]
        },
        "resourceState": {
          "type": "string",
          "enum": [
            "available",
            "pending_delete",
            "inaccessible",
            "none"
          ]
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "primaryAction": {
          "anyOf": [
            {
              "type": "object",
              "required": [
                "label",
                "path",
                "enabled",
                "disabledReason"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "disabledReason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "readAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "archivedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "NotificationProjectOption": {
      "type": "object",
      "required": [
        "id",
        "name"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "organizationId": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "NotificationSummary": {
      "type": "object",
      "required": [
        "unreadCount",
        "criticalUnreadCount",
        "updatedAt",
        "cursor"
      ],
      "properties": {
        "organizationId": {
          "type": [
            "string",
            "null"
          ]
        },
        "unreadCount": {
          "type": "integer"
        },
        "criticalUnreadCount": {
          "type": "integer"
        },
        "latestUnreadAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "cursor": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "NotificationsResponse": {
      "type": "object",
      "required": [
        "notifications",
        "unreadCount",
        "scopeUnreadCount",
        "summary",
        "projectOptions"
      ],
      "properties": {
        "notifications": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Notification"
          }
        },
        "unreadCount": {
          "type": "integer"
        },
        "scopeUnreadCount": {
          "type": "integer"
        },
        "summary": {
          "$ref": "#/$defs/NotificationSummary"
        },
        "projectOptions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NotificationProjectOption"
          }
        },
        "filterCounts": {
          "type": "object",
          "required": [
            "inbox",
            "unread",
            "archived",
            "critical"
          ],
          "properties": {
            "inbox": {
              "type": "integer"
            },
            "unread": {
              "type": "integer"
            },
            "archived": {
              "type": "integer"
            },
            "critical": {
              "type": "integer"
            }
          }
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}