{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "AnnotationView.schema.json", "title": "AnnotationView", "description": "A saved query a source contributes (`AnnotationView/get`), listed by the web apps beside their own places. What it lists is what the index answers now. At most 50 per source.", "type": "object", "properties": { "id": { "$ref": "Common.schema.json#/$defs/Id" }, "key": { "type": "string", "description": "The source's own key for the view, 1–200 characters, unique per source; immutable.", "minLength": 1, "maxLength": 200 }, "source": { "$ref": "Common.schema.json#/$defs/Source" }, "title": { "$ref": "Common.schema.json#/$defs/LocalizedText" }, "description": { "description": "A description in one or more languages, each 1–200 characters, or null.", "anyOf": [ { "type": "object", "description": "Language tag to text, `x-default` required.", "required": ["x-default"], "patternProperties": { "^(?:x-default|[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*)$": { "type": "string", "minLength": 1, "maxLength": 200 } }, "additionalProperties": false }, { "type": "null" } ] }, "in": { "enum": ["files", "photos"], "description": "The web app that lists it." }, "filter": { "description": "A filter as `FileNode/query` takes it, naming no account; null: every node.", "anyOf": [ { "$ref": "FileNodeFilterCondition.schema.json#/$defs/Filter" }, { "type": "null" } ] }, "sort": { "description": "Comparators as `FileNode/query` takes them, or null.", "anyOf": [ { "type": "array", "items": { "$ref": "FileNodeComparator.schema.json" } }, { "type": "null" } ] }, "layout": { "enum": ["list", "grid"] }, "columns": { "type": "array", "maxItems": 4, "items": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]{0,63}$" }, "description": "Up to 4 of the source's `shown` fields, for the list layout." } }, "required": [ "id", "key", "source", "title", "description", "in", "filter", "sort", "layout", "columns" ], "additionalProperties": false, "$defs": { "Create": { "type": "object", "properties": { "key": { "type": "string", "description": "The source's own key for the view, 1–200 characters, unique per source; immutable.", "minLength": 1, "maxLength": 200 }, "title": { "$ref": "Common.schema.json#/$defs/LocalizedText" }, "description": { "description": "A description in one or more languages, each 1–200 characters, or null.", "anyOf": [ { "type": "object", "description": "Language tag to text, `x-default` required.", "required": ["x-default"], "patternProperties": { "^(?:x-default|[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*)$": { "type": "string", "minLength": 1, "maxLength": 200 } }, "additionalProperties": false }, { "type": "null" } ], "default": null }, "in": { "enum": ["files", "photos"], "description": "The web app that lists it." }, "filter": { "description": "A filter as `FileNode/query` takes it, naming no account; null: every node.", "anyOf": [ { "$ref": "FileNodeFilterCondition.schema.json#/$defs/Filter" }, { "type": "null" } ] }, "sort": { "description": "Comparators as `FileNode/query` takes them, or null.", "anyOf": [ { "type": "array", "items": { "$ref": "FileNodeComparator.schema.json" } }, { "type": "null" } ] }, "layout": { "enum": ["list", "grid"], "default": "grid" }, "columns": { "type": "array", "maxItems": 4, "items": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]{0,63}$" }, "description": "Up to 4 of the source's `shown` fields, for the list layout.", "default": [] } }, "required": ["key", "title", "in"], "additionalProperties": false, "description": "A create of `AnnotationView/set`. A key the source used already is that view, answered as created; a key of a view the person removed is refused (`removed`)." }, "Update": { "type": "object", "properties": { "key": { "type": "string", "description": "The source's own key for the view, 1–200 characters, unique per source; immutable.", "minLength": 1, "maxLength": 200 }, "title": { "$ref": "Common.schema.json#/$defs/LocalizedText" }, "description": { "description": "A description in one or more languages, each 1–200 characters, or null.", "anyOf": [ { "type": "object", "description": "Language tag to text, `x-default` required.", "required": ["x-default"], "patternProperties": { "^(?:x-default|[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*)$": { "type": "string", "minLength": 1, "maxLength": 200 } }, "additionalProperties": false }, { "type": "null" } ] }, "in": { "enum": ["files", "photos"], "description": "The web app that lists it." }, "filter": { "description": "A filter as `FileNode/query` takes it, naming no account; null: every node.", "anyOf": [ { "$ref": "FileNodeFilterCondition.schema.json#/$defs/Filter" }, { "type": "null" } ] }, "sort": { "description": "Comparators as `FileNode/query` takes them, or null.", "anyOf": [ { "type": "array", "items": { "$ref": "FileNodeComparator.schema.json" } }, { "type": "null" } ] }, "layout": { "enum": ["list", "grid"] }, "columns": { "type": "array", "maxItems": 4, "items": { "type": "string", "pattern": "^[a-z][a-zA-Z0-9]{0,63}$" }, "description": "Up to 4 of the source's `shown` fields, for the list layout." } }, "required": [], "additionalProperties": false, "description": "An update of `AnnotationView/set`, of the source's own view; `key` may only be stated as it is." } } }