{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amberai/json-schema/amberai-documents-schema.json",
  "title": "Documents",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amberai-documents-api-openapi.yml#/components/schemas/Documents",
  "type": "object",
  "properties": {
    "subjects": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "subjectKind": {
            "type": "string"
          },
          "subjectKey": {
            "type": "string"
          },
          "establishedAs": {
            "type": "string"
          },
          "subjectLabel": {
            "type": "string"
          }
        },
        "required": [
          "subjectKind",
          "subjectKey",
          "establishedAs",
          "subjectLabel"
        ],
        "additionalProperties": false
      }
    },
    "id": {
      "type": "string"
    },
    "ownerType": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "visibility": {
      "type": "string"
    },
    "documentTypeId": {
      "type": [
        "string",
        "null"
      ]
    },
    "dataValue": {
      "type": [
        "string",
        "null"
      ]
    },
    "fileName": {
      "type": [
        "string",
        "null"
      ]
    },
    "mimeType": {
      "type": [
        "string",
        "null"
      ]
    },
    "fileSizeBytes": {
      "type": [
        "number",
        "null"
      ]
    },
    "channel": {
      "type": "string"
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "supersededByDocumentId": {
      "type": [
        "string",
        "null"
      ]
    },
    "supersededAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "supersededReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "senderRole": {
      "type": [
        "string",
        "null"
      ]
    },
    "issuerName": {
      "type": [
        "string",
        "null"
      ]
    },
    "extent": {
      "anyOf": [
        {
          "$ref": "#/$defs/__schema0"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    },
    "deletedAt": {
      "type": [
        "string",
        "null"
      ]
    },
    "subjectKind": {
      "type": [
        "string",
        "null"
      ]
    },
    "subjectKey": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "subjects",
    "id",
    "ownerType",
    "ownerId",
    "visibility",
    "documentTypeId",
    "dataValue",
    "fileName",
    "mimeType",
    "fileSizeBytes",
    "channel",
    "source",
    "supersededByDocumentId",
    "supersededAt",
    "supersededReason",
    "senderRole",
    "issuerName",
    "extent",
    "createdAt",
    "updatedAt",
    "deletedAt",
    "subjectKind",
    "subjectKey"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}