"use strict";
const either = require("@validatem/either");
// NOTE: This validator should typically come last in an `either`, since it will catch various types of inputs (sqlExpression, literal values, etc.) that might need to be interpreted differently in specific contexts.
// FIXME: Rename valueExpression -> value?
module.exports = function (operations) {
const isValueExpression = require("./is-value-expression")(operations);
const isObjectType = require("./is-object-type")(operations);
return either([
[ isObjectType("anyOfValues") ],
[ isObjectType("allOfValues") ],
isValueExpression
]);
};