{
  "$id": "https://intentschema.org/intents/productivity/notes/note/read/v1.json",
  "fqdn": "org.intentschema.productivity.notes.note.read.v1",
  "title": "Read note",
  "description": "Read a single note by id, including body.",
  "payload": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": [
      "target"
    ],
    "properties": {
      "target": {
        "allOf": [
          {
            "$ref": "https://intentschema.org/common/target/v1.json"
          },
          {
            "required": [
              "external_id"
            ]
          }
        ]
      }
    }
  },
  "result": {
    "type": "object",
    "required": [
      "external_id"
    ],
    "properties": {
      "external_id": {
        "type": "string"
      },
      "object": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string",
            "description": "Note body \u2014 Markdown by convention."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folder": {
            "type": "string",
            "description": "Optional folder/parent path or container id."
          }
        }
      },
      "url": {
        "type": "string",
        "format": "uri"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time"
      }
    }
  },
  "examples": [
    {
      "name": "fetch by id",
      "value": {
        "target": {
          "system": "notion",
          "external_id": "page_abc"
        }
      }
    }
  ]
}
