{
"id": "pub.chive.annotation.listForEprint",
"defs": {
"main": {
"type": "query",
"errors": [],
"output": {
"schema": {
"type": "object",
"required": [
"annotations",
"hasMore"
],
"properties": {
"total": {
"type": "integer",
"description": "Total number of annotations for this eprint"
},
"cursor": {
"type": "string",
"description": "Cursor for next page"
},
"hasMore": {
"type": "boolean",
"description": "Whether more results are available"
},
"annotations": {
"type": "array",
"items": {
"ref": "#annotationView",
"type": "ref"
},
"description": "List of annotations for the eprint"
},
"entityLinks": {
"type": "array",
"items": {
"ref": "#entityLinkView",
"type": "ref"
},
"description": "Included when includeEntityLinks=true"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"eprintUri"
],
"properties": {
"limit": {
"type": "integer",
"default": 50,
"maximum": 100,
"minimum": 1,
"description": "Maximum number of results to return"
},
"cursor": {
"type": "string",
"description": "Pagination cursor for next page"
},
"eprintUri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the eprint"
},
"motivation": {
"type": "string",
"description": "Filter by annotation motivation",
"knownValues": [
"commenting",
"questioning",
"highlighting",
"replying"
]
},
"pageNumber": {
"type": "integer",
"minimum": 1,
"description": "Filter to specific page number"
},
"includeEntityLinks": {
"type": "boolean",
"default": false,
"description": "Include entity link annotations in response"
}
}
},
"description": "List annotations for a specific eprint with optional filtering"
},
"authorRef": {
"type": "object",
"required": [
"did"
],
"properties": {
"did": {
"type": "string",
"format": "did"
},
"avatar": {
"type": "string",
"format": "uri"
},
"handle": {
"type": "string"
},
"displayName": {
"type": "string"
}
}
},
"authorLink": {
"type": "object",
"required": [
"type",
"did",
"displayName"
],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "Author's DID"
},
"type": {
"type": "string",
"const": "author"
},
"orcid": {
"type": "string",
"description": "Author's ORCID (if available)"
},
"handle": {
"type": "string",
"format": "handle",
"description": "Author's handle"
},
"displayName": {
"type": "string",
"description": "Author's display name"
}
},
"description": "Link to an ATProto author"
},
"eprintLink": {
"type": "object",
"required": [
"type",
"uri",
"title"
],
"properties": {
"doi": {
"type": "string",
"description": "DOI if available"
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the eprint"
},
"type": {
"type": "string",
"const": "eprint"
},
"title": {
"type": "string",
"description": "Eprint title"
}
},
"description": "Link to another eprint/preprint"
},
"boundingRect": {
"type": "object",
"required": [
"x1",
"y1",
"x2",
"y2",
"width",
"height",
"pageNumber"
],
"properties": {
"x1": {
"type": "string",
"description": "Left edge coordinate (as string to preserve float precision)"
},
"x2": {
"type": "string",
"description": "Right edge coordinate (as string to preserve float precision)"
},
"y1": {
"type": "string",
"description": "Top edge coordinate (as string to preserve float precision)"
},
"y2": {
"type": "string",
"description": "Bottom edge coordinate (as string to preserve float precision)"
},
"width": {
"type": "string",
"description": "Page width reference (as string to preserve float precision)"
},
"height": {
"type": "string",
"description": "Page height reference (as string to preserve float precision)"
},
"pageNumber": {
"type": "integer",
"minimum": 1,
"description": "1-indexed page number for the bounding rectangle"
}
},
"description": "Bounding rectangle coordinates for highlight positioning. All values stored as strings to preserve floating-point precision since ATProto only supports integer type."
},
"graphNodeLink": {
"type": "object",
"required": [
"type",
"uri",
"label",
"kind"
],
"properties": {
"id": {
"type": "string",
"description": "Node UUID identifier"
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the graph node"
},
"kind": {
"type": "string",
"description": "Node kind: 'type' for classifications, 'object' for instances",
"knownValues": [
"type",
"object"
]
},
"slug": {
"type": "string",
"description": "Human-readable slug (e.g., 'computer-science')"
},
"type": {
"type": "string",
"const": "graphNode"
},
"label": {
"type": "string",
"description": "Display label for the node"
},
"subkind": {
"type": "string",
"description": "Subkind slug (e.g., 'field', 'facet', 'institution', 'contribution-type')"
},
"subkindUri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the subkind type node"
}
},
"description": "Link to a knowledge graph node"
},
"annotationView": {
"type": "object",
"required": [
"uri",
"cid",
"author",
"eprintUri",
"content",
"motivation",
"target",
"replyCount",
"createdAt",
"indexedAt"
],
"properties": {
"cid": {
"type": "string",
"description": "Content identifier"
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "Annotation AT-URI"
},
"body": {
"type": "array",
"items": {
"refs": [
"pub.chive.richtext.defs#textItem",
"pub.chive.richtext.defs#nodeRefItem",
"pub.chive.richtext.defs#wikidataRefItem",
"pub.chive.richtext.defs#fieldRefItem",
"pub.chive.richtext.defs#facetRefItem",
"pub.chive.richtext.defs#eprintRefItem",
"pub.chive.richtext.defs#annotationRefItem",
"pub.chive.richtext.defs#authorRefItem",
"pub.chive.richtext.defs#mentionItem",
"pub.chive.richtext.defs#linkItem",
"pub.chive.richtext.defs#tagItem",
"pub.chive.richtext.defs#latexItem",
"pub.chive.richtext.defs#codeBlockItem",
"pub.chive.richtext.defs#headingItem",
"pub.chive.richtext.defs#listItem",
"pub.chive.richtext.defs#blockquoteItem"
],
"type": "union"
},
"maxLength": 500,
"description": "Rich text body items"
},
"author": {
"ref": "#authorRef",
"type": "ref"
},
"target": {
"ref": "#textSpanTarget",
"type": "ref",
"description": "Target text span for the annotation"
},
"content": {
"type": "string",
"description": "Plain text content of the annotation"
},
"deleted": {
"type": "boolean",
"default": false,
"description": "Whether this annotation has been deleted (tombstone for thread preservation)"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "When the annotation was created"
},
"eprintUri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the annotated eprint"
},
"indexedAt": {
"type": "string",
"format": "datetime",
"description": "When the annotation was indexed"
},
"motivation": {
"type": "string",
"description": "W3C Web Annotation motivation",
"knownValues": [
"commenting",
"highlighting",
"questioning",
"replying",
"assessing",
"bookmarking",
"classifying",
"describing",
"editing",
"moderating",
"tagging"
]
},
"replyCount": {
"type": "integer",
"minimum": 0,
"description": "Number of direct replies"
},
"bodyPlainText": {
"type": "string",
"description": "Plain text body for search/preview"
},
"parentAnnotationUri": {
"type": "string",
"format": "at-uri",
"description": "Parent annotation URI for threaded replies"
}
},
"description": "View of an annotation/comment"
},
"entityLinkView": {
"type": "object",
"required": [
"uri",
"cid",
"creator",
"eprintUri",
"target",
"linkedEntity",
"createdAt",
"indexedAt"
],
"properties": {
"cid": {
"type": "string",
"description": "Content identifier"
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "Entity link AT-URI"
},
"target": {
"ref": "#textSpanTarget",
"type": "ref",
"description": "Target text span linked to the entity"
},
"creator": {
"ref": "#authorRef",
"type": "ref",
"description": "Creator of the entity link"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "When the entity link was created"
},
"eprintUri": {
"type": "string",
"format": "at-uri",
"description": "AT-URI of the eprint containing the linked text"
},
"indexedAt": {
"type": "string",
"format": "datetime",
"description": "When the entity link was indexed"
},
"confidence": {
"type": "integer",
"maximum": 1000,
"minimum": 0,
"description": "Confidence score (0-1000, scaled from 0.0-1.0)"
},
"linkedEntity": {
"refs": [
"#graphNodeLink",
"#externalIdLink",
"#authorLink",
"#eprintLink"
],
"type": "union",
"description": "The linked entity"
}
},
"description": "View of an entity link annotation"
},
"externalIdLink": {
"type": "object",
"required": [
"type",
"system",
"identifier",
"label"
],
"properties": {
"uri": {
"type": "string",
"format": "uri",
"description": "Full URI for the external entity"
},
"type": {
"type": "string",
"const": "externalId"
},
"label": {
"type": "string",
"description": "Display label for the entity"
},
"system": {
"type": "string",
"description": "External identifier system",
"knownValues": [
"wikidata",
"ror",
"orcid",
"isni",
"viaf",
"lcsh",
"fast",
"credit",
"spdx",
"fundref",
"mesh",
"aat",
"gnd",
"anzsrc",
"arxiv",
"doi",
"pmid",
"pmcid"
]
},
"identifier": {
"type": "string",
"description": "Identifier value (e.g., Q42 for Wikidata)"
}
},
"description": "Link to an external identifier (Wikidata, ROR, ORCID, etc.)"
},
"textSpanTarget": {
"type": "object",
"required": [
"source"
],
"properties": {
"page": {
"type": "integer",
"minimum": 0,
"description": "0-indexed page number"
},
"source": {
"type": "string",
"format": "at-uri",
"description": "Eprint AT-URI"
},
"selector": {
"ref": "#textQuoteSelector",
"type": "ref",
"description": "Text quote selector"
},
"refinedBy": {
"ref": "#textPositionSelector",
"type": "ref",
"description": "Position refinement with page info"
}
},
"description": "Target text span for inline annotations (W3C Web Annotation compatible)"
},
"linkedEntityRef": {
"type": "object",
"properties": {
"entity": {
"refs": [
"#graphNodeLink",
"#externalIdLink",
"#authorLink",
"#eprintLink"
],
"type": "union"
}
},
"description": "Union wrapper for linked entity references"
},
"textQuoteSelector": {
"type": "object",
"required": [
"type",
"exact"
],
"properties": {
"type": {
"type": "string",
"const": "TextQuoteSelector"
},
"exact": {
"type": "string",
"maxLength": 1000
},
"prefix": {
"type": "string",
"maxLength": 100
},
"suffix": {
"type": "string",
"maxLength": 100
}
},
"description": "W3C Text Quote Selector"
},
"textPositionSelector": {
"type": "object",
"required": [
"type",
"start",
"end"
],
"properties": {
"end": {
"type": "integer",
"minimum": 0
},
"type": {
"type": "string",
"const": "TextPositionSelector"
},
"start": {
"type": "integer",
"minimum": 0
},
"pageNumber": {
"type": "integer",
"minimum": 0,
"description": "0-indexed page number in PDF"
},
"boundingRect": {
"ref": "#boundingRect",
"type": "ref",
"description": "Bounding rectangle for visual positioning"
}
},
"description": "W3C Text Position Selector with optional page info"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"revision": 1
}