{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "FileNode.schema.json", "title": "FileNode", "description": "A FileNode as `FileNode/get` answers it: draft-ietf-jmap-filenode-14 §3.1's properties and the vendor properties of connected applications and Photos. It answers the properties asked for, `id` always; other extensions add further vendor properties.", "type": "object", "properties": { "id": { "$ref": "Common.schema.json#/$defs/Id" }, "parentId": { "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "nodeType": { "enum": ["file", "directory", "symlink"] }, "blobId": { "description": "A file's content; null for a folder.", "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "target": { "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "size": { "anyOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "name": { "type": "string", "description": "The node's name.", "minLength": 1 }, "type": { "description": "A file's media type; null for a folder.", "type": ["string", "null"] }, "created": { "$ref": "Common.schema.json#/$defs/UTCDate" }, "modified": { "$ref": "Common.schema.json#/$defs/UTCDate" }, "accessed": { "anyOf": [ { "$ref": "Common.schema.json#/$defs/UTCDate" }, { "type": "null" } ] }, "changed": { "description": "When the node's record was last written.", "$ref": "Common.schema.json#/$defs/UTCDate" }, "executable": { "type": "boolean" }, "isSubscribed": { "type": "boolean" }, "myRights": { "type": "object", "properties": { "mayRead": { "type": "boolean" }, "mayAddChildren": { "type": "boolean" }, "mayRename": { "type": "boolean" }, "mayDelete": { "type": "boolean" }, "mayModifyContent": { "type": "boolean" }, "mayShare": { "type": "boolean" } }, "required": [ "mayRead", "mayAddChildren", "mayRename", "mayDelete", "mayModifyContent", "mayShare" ], "additionalProperties": false }, "shareWith": { "description": "By share rule, the rights it grants, or null.", "anyOf": [ { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "boolean" } } }, { "type": "null" } ] }, "role": { "type": ["string", "null"] }, "annotations": { "description": "What sources wrote of the content the file holds now, by source id, or null.", "anyOf": [ { "type": "object", "propertyNames": { "$ref": "Common.schema.json#/$defs/SourceId" }, "additionalProperties": { "$ref": "FileAnnotation.schema.json" } }, { "type": "null" } ] }, "photo": { "description": "A read picture's metadata, or null.", "anyOf": [ { "$ref": "#/$defs/Photo" }, { "type": "null" } ] }, "album": { "description": "An album folder's value, or null.", "anyOf": [ { "$ref": "#/$defs/Album" }, { "type": "null" } ] }, "notPicture": { "type": "boolean", "description": "The content was read and is no picture (server-set)." }, "unreadable": { "description": "Why reading the content was given up (server-set), or null.", "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ] } }, "required": ["id"], "$defs": { "Photo": { "type": "object", "properties": { "taken": { "description": "When taken, on the camera's clock.", "$ref": "Common.schema.json#/$defs/LocalDate" }, "takenOffset": { "description": "The camera's UTC offset, ±hh:mm, or null.", "anyOf": [ { "type": "string", "pattern": "^[+-](?:0\\d|1[0-4]):[0-5]\\d$" }, { "type": "null" } ] }, "width": { "anyOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ] }, "height": { "anyOf": [ { "type": "integer", "minimum": 1 }, { "type": "null" } ] }, "orientation": { "type": "integer", "minimum": 1, "maximum": 8, "description": "The EXIF orientation, 1–8." }, "camera": { "description": "What the camera says of itself, or null.", "type": ["object", "null"] }, "exposure": { "description": "The exposure the file states, or null.", "type": ["object", "null"] }, "location": { "description": "Where taken, or null (also when the caller's share of the album keeps no location).", "anyOf": [ { "type": "object", "properties": { "latitude": { "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "minimum": -180, "maximum": 180 }, "altitude": { "description": "Metres, or null.", "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": ["latitude", "longitude"], "additionalProperties": false }, { "type": "null" } ] }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "keywords": { "type": "array", "items": { "type": "string" } }, "rating": { "type": "integer", "minimum": -1, "maximum": 5, "description": "XMP rating: −1 rejected, 0 none, 1–5 stars." }, "thumbnailBlobId": { "description": "A small rendition, or null.", "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "displayBlobId": { "description": "A screen-sized rendition, or null.", "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "edits": { "anyOf": [ { "type": "object", "properties": { "crop": { "anyOf": [ { "type": "object", "properties": { "left": { "type": "number", "minimum": 0, "maximum": 1 }, "top": { "type": "number", "minimum": 0, "maximum": 1 }, "right": { "type": "number", "minimum": 0, "maximum": 1 }, "bottom": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["left", "top", "right", "bottom"], "additionalProperties": false, "description": "Fractions of the picture as displayed; left of right, above bottom." }, { "type": "null" } ] }, "angle": { "type": "number", "minimum": -45, "maximum": 45, "description": "Degrees of straightening, applied before the crop." } }, "required": ["crop", "angle"], "additionalProperties": false }, { "type": "null" } ] }, "renderedBlobId": { "description": "The rendition showing the edits, or null.", "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "sidecarId": { "description": "The XMP sidecar beside it, or null.", "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "originId": { "description": "The library picture an album copy came from, or null.", "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "analysed": { "type": "string", "description": "The content the analysis is of." }, "fileOrientation": { "description": "The orientation the file's own bytes state, or null.", "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 8, "description": "The EXIF orientation, 1–8." }, { "type": "null" } ] }, "renderedFrom": { "description": "The orientation and edits the renditions show, or null.", "anyOf": [ { "type": "object", "properties": { "orientation": { "type": "integer", "minimum": 1, "maximum": 8, "description": "The EXIF orientation, 1–8." }, "edits": { "anyOf": [ { "type": "object", "properties": { "crop": { "anyOf": [ { "type": "object", "properties": { "left": { "type": "number", "minimum": 0, "maximum": 1 }, "top": { "type": "number", "minimum": 0, "maximum": 1 }, "right": { "type": "number", "minimum": 0, "maximum": 1 }, "bottom": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["left", "top", "right", "bottom"], "additionalProperties": false, "description": "Fractions of the picture as displayed; left of right, above bottom." }, { "type": "null" } ] }, "angle": { "type": "number", "minimum": -45, "maximum": 45, "description": "Degrees of straightening, applied before the crop." } }, "required": ["crop", "angle"], "additionalProperties": false }, { "type": "null" } ] } }, "required": ["orientation", "edits"], "additionalProperties": false }, { "type": "null" } ] }, "faces": { "type": "array", "maxItems": 500, "items": { "$ref": "PhotoFaceRegion.schema.json" } } }, "required": [ "taken", "takenOffset", "width", "height", "orientation", "camera", "exposure", "location", "title", "description", "keywords", "rating", "thumbnailBlobId", "displayBlobId", "edits", "renderedBlobId", "sidecarId", "originId", "analysed", "fileOrientation", "renderedFrom", "faces" ], "additionalProperties": false, "description": "A read picture's metadata, of the content the file holds now." }, "PhotoUpdate": { "type": "object", "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "keywords": { "type": "array", "items": { "type": "string", "pattern": "\\S" } }, "rating": { "type": "integer", "minimum": -1, "maximum": 5, "description": "XMP rating: −1 rejected, 0 none, 1–5 stars." }, "taken": { "description": "When taken, on the camera's clock.", "$ref": "Common.schema.json#/$defs/LocalDate" }, "takenOffset": { "description": "The camera's UTC offset, ±hh:mm, or null.", "anyOf": [ { "type": "string", "pattern": "^[+-](?:0\\d|1[0-4]):[0-5]\\d$" }, { "type": "null" } ] }, "location": { "anyOf": [ { "type": "object", "properties": { "latitude": { "type": "number", "minimum": -90, "maximum": 90 }, "longitude": { "type": "number", "minimum": -180, "maximum": 180 }, "altitude": { "description": "Metres, or null.", "anyOf": [ { "type": "number" }, { "type": "null" } ] } }, "required": ["latitude", "longitude"], "additionalProperties": false }, { "type": "null" } ] }, "orientation": { "type": "integer", "minimum": 1, "maximum": 8, "description": "The EXIF orientation, 1–8." }, "edits": { "anyOf": [ { "type": "object", "properties": { "crop": { "anyOf": [ { "type": "object", "properties": { "left": { "type": "number", "minimum": 0, "maximum": 1 }, "top": { "type": "number", "minimum": 0, "maximum": 1 }, "right": { "type": "number", "minimum": 0, "maximum": 1 }, "bottom": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": ["left", "top", "right", "bottom"], "additionalProperties": false, "description": "Fractions of the picture as displayed; left of right, above bottom." }, { "type": "null" } ] }, "angle": { "type": "number", "minimum": -45, "maximum": 45, "description": "Degrees of straightening, applied before the crop." } }, "required": ["crop", "angle"], "additionalProperties": false }, { "type": "null" } ] }, "faces": { "type": "array", "maxItems": 500, "items": { "$ref": "PersonFace.schema.json" } } }, "description": "`photo` as `FileNode/set` takes it (whole, or member by member as `photo/`): these members are written; a server-set member is accepted only stated as it is." }, "Album": { "type": "object", "properties": { "coverId": { "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "locationKeep": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "The share rules that keep location (to a reader who may not share the album, only the rules it is reached through)." }, "faceNamesKeep": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "The share rules that keep the names of the people in the pictures, read as locationKeep is." } }, "required": ["coverId", "locationKeep", "faceNamesKeep"], "additionalProperties": false, "description": "An album folder's own value." }, "AlbumUpdate": { "type": "object", "properties": { "coverId": { "anyOf": [ { "$ref": "Common.schema.json#/$defs/Id" }, { "type": "null" } ] }, "locationKeep": { "type": "array", "items": { "type": "string", "minLength": 1 } }, "faceNamesKeep": { "type": "array", "items": { "type": "string", "minLength": 1 } } }, "required": [], "additionalProperties": false, "description": "`album` as `FileNode/set` takes it; `locationKeep` and `faceNamesKeep` only by who may share the album." } } }