{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "https://schema.twindev.org/ais/AuditableItemStream",
	"title": "AuditableItemStream",
	"description": "Interface describing an auditable item stream.",
	"type": "object",
	"properties": {
		"id": {
			"type": "string",
			"description": "The id of the stream."
		},
		"dateCreated": {
			"type": "string",
			"description": "The date/time of when the stream was created."
		},
		"dateModified": {
			"type": "string",
			"description": "The date/time of when the stream was modified."
		},
		"organizationIdentity": {
			"type": "string",
			"description": "The identity of the organization which controls the stream."
		},
		"userIdentity": {
			"type": "string",
			"description": "The identity of the user who created the stream."
		},
		"proofId": {
			"type": "string",
			"description": "The id of the immutable proof for the stream."
		},
		"numberOfItems": {
			"type": "number",
			"description": "How many entries are in the stream."
		},
		"entries": {
			"type": "object",
			"properties": {
				"type": {
					"const": "ItemList"
				},
				"itemListElement": {
					"type": "array",
					"items": {
						"$ref": "https://schema.twindev.org/ais/AuditableItemStreamEntry"
					}
				}
			},
			"required": ["type", "itemListElement"],
			"description": "Entries in the stream."
		},
		"verification": {
			"$ref": "https://schema.twindev.org/immutable-proof/ImmutableProofVerification",
			"description": "The verification of the stream."
		}
	},
	"required": ["id", "dateCreated"],
	"allOf": [
		{
			"$ref": "https://schema.twindev.org/ais/AuditableItemStreamBase"
		}
	]
}
