                                  (keyword (.toString (.getCapability %))))
                       (.getPermissions opts))
    :quality (.getQuality opts)
-   :repair-level ((clojure.set/map-invert repair-level) (.getRepairLevel opts))
+   :repair-level ((clojure.set/map-invert doc-repair-level) (.getRepairLevel opts))
    :resolve-buffer-size (.getResolveBufferSize opts)
    :resolve-entities (.getResolveEntities opts)
    :temporal-collection (.getTemporalCollection opts)})

;;;; Helpers for sessions and requests
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(def transaction-modes
  "Mapping of keywords for valid Session transaction modes (per
  https://docs.marklogic.com/javadoc/xcc/com/marklogic/xcc/Session.TransactionMode.html)."
  {:auto Session$TransactionMode/AUTO
   :query Session$TransactionMode/QUERY
   :update Session$TransactionMode/UPDATE
   :update-auto-commit Session$TransactionMode/UPDATE_AUTO_COMMIT})

(def valid-request-options
  "Set of valid request options for Request objects. Can also be
  passed to Sessions as :default-request-options. See

    :resolve-entities
    :temporal-collection})

(defn content-creation-options
  "Creates a ContentCreateOptions object (to pass to a ContentFactory
  newContent call) out of the given options map. See
