{
  "lexicon": 1,
  "id": "dev.jisaku.mosimo.public",
  "defs": {
    "source": {
      "type": "object",
      "description": "Provenance of a converted public-information post: what was retrieved from where, and who converted it under which rule. A claim by the converter, not an authentication result for the issuing institution.",
      "required": ["document", "retrievedFrom", "retrievedAt", "converter", "conversion"],
      "properties": {
        "document": {
          "type": "ref",
          "ref": "#sourceRef",
          "description": "Direct source of the text and structured fields."
        },
        "containers": {
          "type": "array",
          "description": "Distribution containers from outermost to innermost. Distinct from the author of the content.",
          "items": { "type": "ref", "ref": "#sourceRef" }
        },
        "retrievedFrom": {
          "type": "string",
          "format": "uri",
          "description": "URL actually used for retrieval."
        },
        "retrievedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Retrieval time. UTC with an uppercase Z suffix."
        },
        "converter": {
          "type": "string",
          "description": "Identifier of the converter, such as a DID. Correspondence with the signing key is established by the post signature and attestation chain, not by this field alone."
        },
        "conversion": {
          "type": "ref",
          "ref": "#conversion"
        },
        "originalDigest": {
          "type": "ref",
          "ref": "#digest",
          "description": "Digest over the full byte sequence of the retrieved original document, computed before any re-serialization."
        },
        "links": {
          "type": "array",
          "description": "Related links: stored original, attachments, web references. Presence of a link does not require retrieval or delivery of its target.",
          "items": { "type": "ref", "ref": "#link" }
        },
        "feed": {
          "type": "ref",
          "ref": "#feedRef",
          "description": "Declares a feed re-post: the (feed, origin, type) the importer's key attestation must cover (attest.importer §1.2)."
        }
      }
    },
    "feedRef": {
      "type": "object",
      "required": ["id", "type"],
      "properties": {
        "id": { "type": "string", "maxLength": 317, "description": "Feed ID: the NSID of the feed definition, authority in lowercase." },
        "origin": { "type": "string", "format": "uri", "maxLength": 256, "description": "Issuer of the original as an absolute URI (e.g. a WMO Register of Alerting Authorities OID), only for feeds whose definition uses it." },
        "type": { "type": "string", "maxLength": 128, "description": "Information type defined by the feed definition." }
      }
    },
    "sourceRef": {
      "type": "object",
      "description": "Reference to a document in its original format.",
      "required": ["format", "senderId", "messageId"],
      "properties": {
        "format": {
          "type": "string",
          "description": "Format and version of the original, for example cap-1.2, edxl-de-1.0, jma-xml-1.3."
        },
        "senderId": {
          "type": "string",
          "description": "Sender identifier in the original format."
        },
        "messageId": {
          "type": "string",
          "description": "Message or post identifier in the original format."
        },
        "sentAt": {
          "type": "string",
          "format": "datetime",
          "description": "Original issue or send time converted to UTC. The original string representation is kept in the format-specific extension."
        },
        "revision": {
          "type": "string",
          "description": "Revision or serial number carried by the original format. Comparison rules are format-specific."
        },
        "part": {
          "type": "string",
          "description": "Selected part within the document, such as a language or content position. Not a substitute for the original message identifier."
        }
      }
    },
    "conversion": {
      "type": "object",
      "required": ["rule", "revision"],
      "properties": {
        "rule": { "type": "string", "description": "Name of the conversion rule." },
        "revision": { "type": "string", "description": "Revision of the conversion rule." }
      }
    },
    "digest": {
      "type": "object",
      "required": ["algorithm", "value"],
      "properties": {
        "algorithm": { "type": "string", "description": "Hash algorithm name, for example sha-256." },
        "value": { "type": "bytes", "description": "Raw digest bytes." }
      }
    },
    "link": {
      "type": "object",
      "required": ["url"],
      "properties": {
        "url": { "type": "string", "format": "uri" },
        "mediaType": { "type": "string" }
      }
    }
  }
}
