{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/documents/Document",
	"title": "Document",
	"description": "Interface describing a document.",
	"type": "object",
	"properties": {
		"@context": {
			"type": "array",
			"prefixItems": [
				{
					"const": "https://schema.org"
				},
				{
					"const": "https://schema.twindev.org/documents/"
				},
				{
					"const": "https://schema.twindev.org/common/"
				}
			],
			"items": {
				"$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
			},
			"minItems": 3,
			"description": "JSON-LD Context."
		},
		"type": {
			"const": "Document",
			"description": "JSON-LD Type."
		},
		"id": {
			"type": "string",
			"description": "The full id of the document."
		},
		"documentId": {
			"type": "string",
			"description": "The id of the document."
		},
		"documentIdFormat": {
			"type": "string",
			"description": "The format of the document id."
		},
		"documentCode": {
			"$ref": "https://schema.twindev.org/unece/UneceDocumentCodeList",
			"description": "The code for the document type."
		},
		"documentRevision": {
			"type": "number",
			"description": "The revision of the document as a 0 based index."
		},
		"annotationObject": {
			"$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
			"description": "Additional annotation information for the document."
		},
		"blobStorageId": {
			"type": "string",
			"description": "The blob storage id for the document."
		},
		"integrity": {
			"type": "string",
			"description": "The integrity of the blob data."
		},
		"blobStorageEntry": {
			"$ref": "https://schema.twindev.org/blob-storage/BlobStorageEntry",
			"description": "The additional JSON-LD for blob storage if it was requested."
		},
		"extractedData": {
			"description": "The data extracted from the document using data extraction services."
		},
		"attestationId": {
			"type": "string",
			"description": "The attestation for the document if one was created."
		},
		"attestationInformation": {
			"$ref": "https://schema.twindev.org/attestation/AttestationInformation",
			"description": "The additional JSON-LD for attestation storage if it was requested."
		},
		"dateCreated": {
			"type": "string",
			"description": "The date/time of when the document was created."
		},
		"dateModified": {
			"type": "string",
			"description": "The date/time of when the document was modified."
		},
		"dateDeleted": {
			"type": "string",
			"description": "The date/time of when the document was deleted, as we never actually remove items."
		},
		"organizationIdentity": {
			"type": "string",
			"description": "The organization which added the document to the graph."
		},
		"userIdentity": {
			"type": "string",
			"description": "The user who added the document to the graph."
		}
	},
	"required": [
		"@context",
		"type",
		"id",
		"documentId",
		"documentCode",
		"documentRevision",
		"blobStorageId",
		"integrity",
		"dateCreated"
	]
}
