/** * Constructs an array of object from the object map. * * @param {Object} obj ex: {"a": "customerID", "b": "firstName"} * @returns an array of object ex. [{"variable": "a", "value": "serviceLocationID"}, {"variable": "b", "value" "firstName"}] */ export declare const getPropertyMappingList: (obj: Object) => any[]; /** * Constructs a map object where variables are keys and values are the values. * * @param {Array} properties ex. [{"variable": "a", "value": "serviceLocationID"}, {"variable": "b", "value" "firstName"}] * @returns mapped object ex: {"a": "customerID", "b": "firstName"} */ export declare const getPropertyMappingObj: (properties: Object[]) => {}; /** * Maps the keys of mapping to the values of data. * * @param {Object} mapping ex: {"a": "customerID", "b": "firstName"} * @param {Object} data ex: {"customerID": 1001, "firstName": "John"} * @returns flat object ex: {"a": 1001, "b": "John"} */ export declare const mapRuleData: (mapping: Object, data: Object) => {}; /** * Maps the mapping values in the mapping object to the variables in the rule. * * @param {Object} mapping ex: {"a": "customerID", "b": "firstName"} * @param {Object} rule ex: {"or": [{"==": [{"var": "a"}, 400]}, {"==": [{"var": "b"}, John]}]} * @returns jsonLogic object with the correct variable names ex: [{"==": [{"var": "customerID"}, 400]}, {"==": [{"var": "firstName"}, John]}] */ export declare const mapRule: (mapping?: Object, rule?: Object) => any; /** * Evaluates the rule with provided data. * * @param {Object} rule ex: {"or": [{"==": [{"var": "customerID"}, 400]}, {"==": [{"var": "firstName"}, John]}]} * @param {Object} data ex: {"customerID": 1001, "firstName": "John"} * @param {string} objectKey ex: "users" * @param {boolean} dataLazyLoaded ex: "true" * @returns the evaluated rule ex: true */ export declare const evaluateRule: (rule: Object, data: Object, objectKey: string, dataLazyLoaded: boolean) => any; //# sourceMappingURL=RuleUtilities.d.ts.map