{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/folio/main/json-schema/folio-kb-schema.json",
  "title": "Kb",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-mod-agreements-openapi.yml#/components/schemas/Kb",
  "type": "object",
  "required": [
    "name",
    "trustedSourceTI"
  ],
  "properties": {
    "activationEnabled": {
      "description": "If activation is supported, is recording activation in this remote KB enabled. Not currently used",
      "type": "boolean"
    },
    "activationSupported": {
      "description": "Does this remote KB support content activation. Not currently used",
      "type": "boolean"
    },
    "active": {
      "description": "If harvesting is supported, is harvesting from this remote KB activated",
      "type": "boolean"
    },
    "credentials": {
      "description": "Credentials used to authenticate with the remote KB. Not currently used",
      "type": "string"
    },
    "cursor": {
      "description": "Marks progress through a harvest. May be a timestamp, a transaction id, or another service-specific value depending on `type`",
      "type": "string"
    },
    "fullPrefix": {
      "type": "string"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "lastCheck": {
      "type": "integer"
    },
    "listPrefix": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "principal": {
      "description": "Identity/username used to authenticate with the remote KB. Not currently used",
      "type": "string"
    },
    "readonly": {
      "description": "Marks the KB as protected/read-only, Used to prevent deletion the \"LOCAL\" source representing the local KB.",
      "type": "boolean"
    },
    "rectype": {
      "description": "The kind of record this KB primarily deals in",
      "type": "integer",
      "enum": [
        1,
        2
      ],
      "x-enum-varnames": [
        "PACKAGE",
        "TITLE"
      ]
    },
    "supportsHarvesting": {
      "description": "Does this remote KB support harvesting",
      "type": "boolean"
    },
    "syncStatus": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/$defs/Refdata"
        }
      ]
    },
    "trustedSourceTI": {
      "description": "Marks the KB as a trusted source of title instance metadata",
      "type": "boolean"
    },
    "type": {
      "description": "Name of the Spring bean that implements this KB's adapter",
      "type": "string"
    },
    "uri": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "Refdata": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    }
  }
}