{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/caliuapp-com/json-schema/caliuapp-com-note-schema.json",
  "title": "Note",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/caliuapp-com-openapi.json#/components/schemas/Note",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "content": {
      "type": "string"
    },
    "isPinned": {
      "type": "boolean"
    },
    "isEncrypted": {
      "type": "boolean"
    },
    "encryptionHint": {
      "type": [
        "string",
        "null"
      ]
    },
    "wordCount": {
      "type": "number"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "deletedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "archivedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "sharedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "sortOrder": {
      "type": [
        "number",
        "null"
      ]
    },
    "rev": {
      "type": "number",
      "description": "Content revision: one more for every accepted content change. Send it back as `base_rev` on `PUT /notes/{id}`."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ]
      }
    },
    "role": {
      "type": "string",
      "enum": [
        "editor",
        "viewer"
      ],
      "description": "The requester's role, on notes shared with them (get and search)."
    },
    "ownerId": {
      "type": "string",
      "description": "The owner, on notes shared with the requester."
    }
  },
  "required": [
    "id",
    "title",
    "content",
    "isPinned",
    "isEncrypted",
    "encryptionHint",
    "wordCount",
    "createdAt",
    "updatedAt",
    "deletedAt",
    "archivedAt",
    "sharedAt",
    "sortOrder"
  ]
}