{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dealboard/json-schema/dealboard-note-schema.json",
  "title": "Note",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dealboard-openapi.json#/components/schemas/Note",
  "type": "object",
  "required": [
    "id",
    "dealId",
    "authorId",
    "kind",
    "contentText",
    "contentJson",
    "systemEventType",
    "systemEventData",
    "createdAt",
    "editedAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "dealId": {
      "type": "string",
      "format": "uuid"
    },
    "authorId": {
      "type": "string",
      "format": "uuid"
    },
    "kind": {
      "type": "string",
      "enum": [
        "manual",
        "system_event"
      ]
    },
    "contentText": {
      "type": [
        "string",
        "null"
      ]
    },
    "contentJson": {
      "description": "Tiptap document JSON for manual notes; null for system events."
    },
    "systemEventType": {
      "type": [
        "string",
        "null"
      ]
    },
    "systemEventData": {},
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "editedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}