diff --git a/README.md b/README.md index 49dfae1..55eaf7c 100644 --- a/README.md +++ b/README.md @@ -645,11 +645,15 @@ const introspection = RulePilot.introspect(rule, constraint, subjects); The following will be returned by the `introspection`: ```json -{ - "5": { - "country": [{ "value": "SE", "operator": "==" }, { "value": ["GB", "FI"], "operator": "in" }] - } -} +[{ + "result": 5, + "subjects": [ + { + "subject": "country", + "values": [{ "value": "SE", "operator": "==" }, { "value": ["GB", "FI"], "operator": "in" }] + } + ] +}] ``` ```typescript @@ -661,11 +665,15 @@ const introspection = RulePilot.introspect(rule, constraint, subjects); The following will be returned by the `introspection`: ```json -{ - "5": { - "country": [{ "value": "SE", "operator": "==" }] - } -} +[{ + "result": 5, + "subjects": [ + { + "subject": "country", + "values": [{ "value": "SE", "operator": "==" }] + } + ] +}] ``` Each object in the `response` criteria which are possible inputs for the rule to evaluate to the result provided. diff --git a/package.json b/package.json index ec3452a..3ced72e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rulepilot", - "version": "1.4.1", + "version": "1.4.2", "description": "Rule parsing engine for JSON rules", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -36,7 +36,7 @@ "@typescript-eslint/parser": "^5.15.0", "@types/jest": "^29.5.1", "@types/node": "^18.16.1", - "axios": "^1.6.0", + "axios": "^1.7.7", "eslint": "^8.55.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-perfectionist": "^2.5.0",