'use strict';

var z = require('zod');
var definitionUtils = require('../utils/definitionUtils.js');
var filterValidators = require('./filterValidators.js');

const buildFilterSchemaFromFields = (fields) => {
    const shape = {};
    definitionUtils.getFieldsWithFilters(fields).forEach((field) => {
        shape[field.name] = filterValidators.buildFilterValidator(field);
    });
    return z.z.object(shape);
};

exports.buildFilterSchemaFromFields = buildFilterSchemaFromFields;
//# sourceMappingURL=buildFilterSchema.js.map
