{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amberai/json-schema/amberai-documents-list-schema.json",
  "title": "DocumentsList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amberai-documents-api-openapi.yml#/components/schemas/DocumentsList",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "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
      }
    },
    "nextCursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "totalItems": {
      "type": "integer",
      "description": "Total number of matching records across all pages."
    }
  },
  "required": [
    "items",
    "nextCursor",
    "totalItems"
  ],
  "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"
          }
        }
      ]
    }
  }
}