{"version":"1","schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"description":"The record this receipt is bound to, together with `kind` and `key`; present when a door serves the receipt beside a record, absent for a sidecar that has no record id.","type":"string","minLength":1},"kind":{"description":"The corpus kind of the record this receipt is bound to; present and absent together with `id` and `key`.","type":"string","minLength":1},"key":{"description":"The record's key within its kind; present and absent together with `id` and `kind`.","type":"string","minLength":1},"register":{"type":"string","minLength":1,"description":"The name of the register the file came from."},"publisher":{"type":"string","minLength":1,"description":"The organization that publishes the register."},"homeUrl":{"description":"The register's home page.","type":"string","format":"uri"},"sourceUrl":{"type":"string","format":"uri","description":"The exact URL the file was fetched from."},"fileName":{"type":"string","minLength":1,"description":"The name of the published file the hash covers."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The sha256 hash of the exact bytes named by `fileName`."},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The size of the file, in bytes."},"publishedAt":{"anyOf":[{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]},{"type":"null"}],"description":"The date the publisher states it released the file; `null` when the publisher states no date."},"fetchedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"The date and time the file was fetched."},"terms":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"The publisher's reuse terms, quoted verbatim."},"url":{"description":"A page where the publisher states those terms.","type":"string","format":"uri"},"readOn":{"description":"The date the terms were read.","anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}]}},"required":["text"],"additionalProperties":false,"description":"The publisher's reuse terms."},"retained":{"type":"boolean","description":"Whether the fetched bytes are kept, content-addressed, by the store. `false` is a valid value: some publishers’ terms forbid storing the bytes, and the hash still names them."},"retainedAt":{"description":"The date and time the bytes were stored; present only when `retained` is `true`.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"staleAfter":{"description":"The date and time after which the register's own refresh schedule calls this receipt due for a new fetch.","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"supersedingPending":{"description":"Whether a newer fetch is already underway and will supersede this receipt.","type":"boolean"},"verify":{"description":"The check a reader can run to recompute the hash; present together, never alone.","type":"object","properties":{"method":{"type":"string","const":"sha256 of the published file","description":"Names the check a reader can run; present only when `verify` is given, and present together with `command`."},"command":{"type":"string","minLength":1,"description":"A command a reader can run to recompute the hash, for example `curl -sL <sourceUrl> | sha256sum`."}},"required":["method","command"],"additionalProperties":false},"download":{"description":"A URL to the retained bytes, or `null` when no download is offered.","anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["register","publisher","sourceUrl","fileName","sha256","bytes","publishedAt","fetchedAt","terms","retained"],"additionalProperties":false,"$id":"https://pansofica.com/standard/receipt.v1.schema.json","title":"Receipt Specification v1","description":"A small, machine-readable record of one fact: this file, named by its hash, was fetched from this source, at this time, under these reuse terms. See https://pansofica.com/standard for the full specification. `id`, `kind` and `key` are present together or all absent (expressed below as `dependentRequired`).","dependentRequired":{"id":["kind","key"],"kind":["id","key"],"key":["id","kind"]}},"document":"https://pansofica.com/standard"}