import { z } from 'zod';
import { getFieldsWithFilters } from '../utils/definitionUtils.js';
import { buildFilterValidator } from './filterValidators.js';

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

export { buildFilterSchemaFromFields };
//# sourceMappingURL=buildFilterSchema.js.map
