{
  "components": {
    "schemas": {
      "JsonNode": {
        "properties": {
          "array": {
            "type": "boolean"
          },
          "bigDecimal": {
            "type": "boolean"
          },
          "bigInteger": {
            "type": "boolean"
          },
          "binary": {
            "type": "boolean"
          },
          "boolean": {
            "type": "boolean"
          },
          "containerNode": {
            "type": "boolean"
          },
          "double": {
            "type": "boolean"
          },
          "empty": {
            "type": "boolean"
          },
          "float": {
            "type": "boolean"
          },
          "floatingPointNumber": {
            "type": "boolean"
          },
          "int": {
            "type": "boolean"
          },
          "integralNumber": {
            "type": "boolean"
          },
          "long": {
            "type": "boolean"
          },
          "missingNode": {
            "type": "boolean"
          },
          "nodeType": {
            "$ref": "#/components/schemas/JsonNodeType"
          },
          "null": {
            "type": "boolean"
          },
          "number": {
            "type": "boolean"
          },
          "object": {
            "type": "boolean"
          },
          "pojo": {
            "type": "boolean"
          },
          "short": {
            "type": "boolean"
          },
          "textual": {
            "type": "boolean"
          },
          "valueNode": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "JsonNodeType": {
        "enum": [
          "ARRAY",
          "BINARY",
          "BOOLEAN",
          "MISSING",
          "NULL",
          "NUMBER",
          "OBJECT",
          "POJO",
          "STRING"
        ],
        "type": "string"
      },
      "UUID": {
        "format": "uuid",
        "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}",
        "type": "string"
      }
    },
    "securitySchemes": {
      "keycloak-bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Access token issued by the Keycloak realm `startupos`. Send it as `Authorization: Bearer <token>`. A missing, expired or invalid token returns 401; a valid token without the required role returns 403."
      },
      "stream-token": {
        "type": "apiKey",
        "in": "query",
        "name": "token",
        "description": "Short-lived, enrolment-scoped stream token minted by the matching authenticated `stream-token` operation. Used because a cross-origin video element cannot send an Authorization header."
      },
      "livekit-signature": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "JWT signed by the LiveKit server, sent without a `Bearer ` prefix and verified by the service. Only the LiveKit server calls this operation."
      }
    }
  },
  "info": {
    "title": "StartupOS notification service",
    "version": "a54687de",
    "description": "Generated at build time from the service's JAX-RS resources (SmallRye OpenAPI) and annotated by the overlay in docs-site/openapi/overlays. Every operation requires a Keycloak access token unless the operation says otherwise. Health and metrics endpoints are internal and are not documented."
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/v1/notifications": {
      "get": {
        "operationId": "NotificationResource_getNotifications",
        "parameters": [
          {
            "in": "query",
            "name": "read",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Get notifications"
      }
    },
    "/api/v1/notifications/preferences": {
      "get": {
        "operationId": "NotificationResource_getPreferences",
        "parameters": [
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Get preferences"
      },
      "put": {
        "operationId": "NotificationResource_updatePreferences",
        "parameters": [
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Update preferences"
      }
    },
    "/api/v1/notifications/read-all": {
      "put": {
        "operationId": "NotificationResource_markAllRead",
        "parameters": [
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Mark all read"
      }
    },
    "/api/v1/notifications/reminders": {
      "post": {
        "operationId": "NotificationResource_scheduleReminder",
        "parameters": [
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "additionalProperties": {},
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Schedule reminder"
      }
    },
    "/api/v1/notifications/stream": {
      "get": {
        "operationId": "NotificationResource_stream",
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/JsonNode"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Stream"
      }
    },
    "/api/v1/notifications/unread-count": {
      "get": {
        "operationId": "NotificationResource_getUnreadCount",
        "parameters": [
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Get unread count"
      }
    },
    "/api/v1/notifications/{notificationId}/read": {
      "put": {
        "operationId": "NotificationResource_markRead",
        "parameters": [
          {
            "in": "path",
            "name": "notificationId",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/UUID"
            }
          },
          {
            "in": "header",
            "name": "X-User-Id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "tags": [
          "Notifications"
        ],
        "summary": "Mark read"
      }
    }
  },
  "security": [
    {
      "keycloak-bearer": []
    }
  ],
  "tags": [
    {
      "name": "Notifications",
      "description": "A user's notifications and notification preferences."
    }
  ]
}
