interface Filter { [key: string]: any; } /** * Converts the given object 'filter' to a valid format of condition. * * The resulting format will comply with bbn.fn.compareConditions and also with * bbn databases functions and complex filters applied to bbn-vue list components. * * @method filterToConditions * @global * @example * ```javascript * bbn.fn.filterToConditions({num: 3}); * // { * // logic: "AND", * // conditions: [{ * // field: "num", * // operator: "=", * // value: 3 * // }] * // } * ``` * @example * ```javascript * bbn.fn.filterToConditions({num: 3}, '>'); * // { * // logic: "AND", * // conditions: [{ * // field: "num", * // operator: ">", * // value: 3 * // }] * // } * ``` * @memberof bbn.fn * @param {Object} filter * @param {String} operator * @returns {Object} */ export default function filterToConditions(filter: any, operator?: string): Filter; export { Filter, filterToConditions };