fig-tree-evaluator 2.8.3 → 2.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -883,7 +883,7 @@ Aliases: `get`, `api`
883
883
  #### Properties
884
884
 
885
885
  - `url` (or `endpoint`)<sup>*</sup>: (string) -- url to be queried
886
- - `parameters`: (object) -- key-value pairs for any query parameters for the request
886
+ - `parameters` (or `queryParams`, `queryParameters`, `urlQueries`): (object) -- key-value pairs for any query parameters for the request
887
887
  - `headers`: (object) -- any additional headers (such as authentication) required for the request
888
888
  - `returnProperty` (or `outputProperty`): (string) -- an object path for which property to extract from the returned data. E.g. if the API returns `{name: {first: "Bruce", last: "Banner"}, age: 35}` and you specify `returnProperty: "name.first`, the operator will return `"Bruce"` (Uses the same logic as the [objectProperties](#object_properties) internally)
889
889
 
@@ -946,7 +946,8 @@ The "POST" operator is basically structurally the same as [GET](#get).
946
946
 
947
947
  #### Properties
948
948
 
949
- - `url`/`endpoint`<sup>*</sup>,`parameters`, `headers`, `returnProperty`/`outputProperty` -- same as "GET" operator (although the `parameters` object will be passed to the Post request as body JSON rather than url query parameters)
949
+ - `url`/`endpoint`<sup>*</sup>, `headers`, `returnProperty`/`outputProperty` -- same as "GET" operator.
950
+ - `parameters` (or `bodyJson`, `data`) -- passed to the Post request as body JSON rather than url query parameters (hence the different aliases)
950
951
 
951
952
  e.g.
952
953
  ```js
@@ -1690,7 +1691,7 @@ Please open an issue: https://github.com/CarlosNZ/fig-tree-evaluator/issues
1690
1691
 
1691
1692
  *Trivial upgrades (e.g. documentation, small re-factors, types, etc.) not included*
1692
1693
 
1693
- - **v2.8.3**: Refactor types, better compliance with [ESLint](https://eslint.org/) rules, add more tests
1694
+ - **v2.8.4**: Refactor types, better compliance with [ESLint](https://eslint.org/) rules, add more tests
1694
1695
  - **v2.8.0**:
1695
1696
  - [Shorthand syntax](#shorthand-syntax) (#80)
1696
1697
  - Methods to retrieve [metadata](#metadata) about operators, fragments and functions (#82)
package/build/evaluate.js CHANGED
@@ -41,7 +41,6 @@ const evaluatorFunction = (input, config) => __awaiter(void 0, void 0, void 0, f
41
41
  return (0, helpers_1.replaceAliasNodeValues)(fragmentReplacement, config);
42
42
  expression = Object.assign(Object.assign(Object.assign({}, expression), fragmentReplacement), parameters);
43
43
  delete expression.fragment;
44
- delete expression.parameters;
45
44
  }
46
45
  try {
47
46
  const operator = (0, helpers_1.getOperatorName)(expression.operator, operatorAliases);
@@ -29,7 +29,7 @@ const parameters = [
29
29
  {
30
30
  name: 'parameters',
31
31
  description: 'Query parameters (key-value)',
32
- aliases: [],
32
+ aliases: ['queryParams', 'queryParameters', 'urlQueries'],
33
33
  required: false,
34
34
  type: 'object',
35
35
  },
@@ -27,9 +27,9 @@ const parameters = [
27
27
  type: 'object',
28
28
  },
29
29
  {
30
- name: 'data',
30
+ name: 'parameters',
31
31
  description: 'JSON Body parameters (key-value)',
32
- aliases: [],
32
+ aliases: ['bodyJson', 'data'],
33
33
  required: false,
34
34
  type: 'object',
35
35
  },
@@ -1 +1 @@
1
- export declare const version = "2.8.3";
1
+ export declare const version = "2.8.4";
package/build/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '2.8.3';
4
+ exports.version = '2.8.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fig-tree-evaluator",
3
- "version": "2.8.3",
3
+ "version": "2.8.4",
4
4
  "description": "Module to evaluate JSON-structured expression trees",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",