{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/defianceinternational-io/json-schema/defianceinternational-io-get-publication-receipt-200-schema.json",
  "title": "getPublicationReceipt.200",
  "description": "The signed manifest and receipt of one released publication revision.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/defianceinternational-io-content-api-openapi.yml#/components/schemas/getPublicationReceipt.200",
  "type": "object",
  "properties": {
    "manifest": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "const": "defiance-publication-manifest-v1"
        },
        "publication": {
          "type": "object",
          "properties": {
            "publicId": {
              "type": "string"
            },
            "slug": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "lifecycleState": {
              "type": "string",
              "const": "released"
            },
            "firstReleasedAt": {
              "type": "string",
              "description": "Instant of the first release, ISO 8601; one signed historical release carries the database driver format."
            }
          },
          "required": [
            "publicId",
            "slug",
            "kind",
            "lifecycleState",
            "firstReleasedAt"
          ],
          "additionalProperties": false
        },
        "revision": {
          "type": "object",
          "properties": {
            "revisionNumber": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "Record sequence of this revision within its paper, counted from 1. It is the number used in addresses, and it is not the edition the paper declares."
            },
            "state": {
              "type": "string",
              "const": "released"
            },
            "title": {
              "type": "string"
            },
            "subtitle": {
              "type": [
                "string",
                "null"
              ]
            },
            "abstract": {
              "type": "string"
            },
            "designation": {
              "type": "string",
              "description": "The kind of paper, in the words of its author. It names the document type and states no review or release state."
            },
            "language": {
              "type": "string"
            },
            "manuscriptSchemaVersion": {
              "type": "string"
            },
            "reviewSummary": {
              "type": [
                "string",
                "null"
              ]
            },
            "releaseNote": {
              "type": [
                "string",
                "null"
              ]
            },
            "publicRevisionLabel": {
              "type": "string",
              "description": "The edition the paper declares for itself, as printed on it. It is set at release and may differ from revisionNumber."
            },
            "releasedAt": {
              "type": "string"
            }
          },
          "required": [
            "revisionNumber",
            "state",
            "title",
            "subtitle",
            "abstract",
            "designation",
            "language",
            "manuscriptSchemaVersion",
            "reviewSummary",
            "releaseNote",
            "publicRevisionLabel",
            "releasedAt"
          ],
          "additionalProperties": false
        },
        "contributors": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "displayName": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "affiliation": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "externalIdentifier": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "displayOrder": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "displayName",
              "role",
              "affiliation",
              "externalIdentifier",
              "displayOrder"
            ],
            "additionalProperties": false
          }
        },
        "blocks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "blockId": {
                "type": "string"
              },
              "ordinal": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "blockType": {
                "type": "string"
              },
              "payload": {
                "description": "Block content as stored. Opaque member: no builder fixes its shape.",
                "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
              },
              "plainText": {
                "type": "string"
              },
              "accessibility": {
                "description": "Block accessibility data as stored. Opaque member: no builder fixes its shape.",
                "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
              }
            },
            "required": [
              "blockId",
              "ordinal",
              "blockType",
              "payload",
              "plainText",
              "accessibility"
            ],
            "additionalProperties": false
          }
        },
        "assets": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "assetKey": {
                "type": "string"
              },
              "mediaType": {
                "type": "string"
              },
              "byteLength": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "contentHash": {
                "type": "string"
              },
              "caption": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "altText": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "provenance": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "license": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "decorative": {
                "type": "boolean"
              }
            },
            "required": [
              "assetKey",
              "mediaType",
              "byteLength",
              "contentHash",
              "caption",
              "altText",
              "provenance",
              "license",
              "decorative"
            ],
            "additionalProperties": false
          }
        },
        "references": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "referenceKey": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "authors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "description": "Any JSON value, served verbatim from stored data.",
                    "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
                  }
                },
                "description": "Reference authors as stored. Each entry is an opaque record: no builder fixes its keys."
              },
              "containerTitle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "year": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "doi": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "locator": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sourceType": {
                "type": "string"
              },
              "accessedAt": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "referenceKey",
              "title",
              "authors",
              "containerTitle",
              "year",
              "doi",
              "url",
              "locator",
              "sourceType",
              "accessedAt"
            ],
            "additionalProperties": false
          }
        },
        "claims": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "claimKey": {
                "type": "string"
              },
              "claimText": {
                "type": "string"
              },
              "claimClass": {
                "type": "string"
              },
              "scope": {
                "description": "Claim scope as stored. Opaque member: no builder fixes its shape.",
                "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
              },
              "evidenceStatus": {
                "type": "string"
              },
              "publicDisposition": {
                "type": "string"
              },
              "reviewRequired": {
                "type": "boolean"
              },
              "evidence": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "referenceKey": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "directness": {
                      "type": "string"
                    },
                    "model": {
                      "description": "Evidence model as stored. Opaque member: no builder fixes its shape.",
                      "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
                    },
                    "resultDirection": {
                      "type": "string"
                    },
                    "limitation": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "reviewerDisposition": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "referenceKey",
                    "directness",
                    "model",
                    "resultDirection",
                    "limitation",
                    "reviewerDisposition"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "claimKey",
              "claimText",
              "claimClass",
              "scope",
              "evidenceStatus",
              "publicDisposition",
              "reviewRequired",
              "evidence"
            ],
            "additionalProperties": false
          }
        },
        "resourceLinks": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "surface": {
                "type": "string"
              },
              "resourceKey": {
                "type": "string"
              },
              "publicPath": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "context": {
                "type": "string"
              },
              "displayOrder": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "surface",
              "resourceKey",
              "publicPath",
              "label",
              "context",
              "displayOrder"
            ],
            "additionalProperties": false
          }
        },
        "artifacts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "mediaType": {
                "type": "string"
              },
              "byteLength": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "sha256": {
                "type": "string"
              }
            },
            "required": [
              "role",
              "filename",
              "mediaType",
              "byteLength",
              "sha256"
            ],
            "additionalProperties": false
          }
        },
        "review": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string"
            },
            "summary": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "status",
            "summary"
          ],
          "additionalProperties": false
        },
        "release": {
          "type": "object",
          "properties": {
            "keyId": {
              "type": "string"
            },
            "previousReleaseHash": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "keyId",
            "previousReleaseHash"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "version",
        "publication",
        "revision",
        "contributors",
        "blocks",
        "assets",
        "references",
        "claims",
        "resourceLinks",
        "artifacts",
        "review",
        "release"
      ],
      "additionalProperties": false,
      "description": "Signed publication manifest, served verbatim. The signature proves release origin and integrity, not scientific validity."
    },
    "receipt": {
      "type": "object",
      "properties": {
        "manifestHash": {
          "type": "string"
        },
        "previousReleaseHash": {
          "type": [
            "string",
            "null"
          ]
        },
        "keyId": {
          "type": "string"
        },
        "signature": {
          "type": "string",
          "description": "Ed25519 signature over the manifest hash, base64."
        },
        "issuedAt": {
          "type": "string"
        },
        "publicKeyUrl": {
          "type": "string",
          "description": "Path of the public verification key for this signature."
        }
      },
      "required": [
        "manifestHash",
        "previousReleaseHash",
        "keyId",
        "signature",
        "issuedAt",
        "publicKeyUrl"
      ],
      "additionalProperties": false,
      "description": "Release receipt: the signed hash chain entry of one revision."
    },
    "researchUseOnly": {
      "type": "string",
      "description": "The boundary statement that the public sender adds, stated once at the top level."
    }
  },
  "required": [
    "manifest",
    "receipt",
    "researchUseOnly"
  ],
  "additionalProperties": false,
  "$defs": {
    "getPublicationReceipt.200.__schema0": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "boolean"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "description": "Any JSON value, served verbatim from stored data.",
            "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "description": "Any JSON value, served verbatim from stored data.",
            "$ref": "#/$defs/getPublicationReceipt.200.__schema0"
          }
        }
      ]
    }
  }
}