@kumologica/sdk 3.2.0-beta1 → 3.2.0-beta10

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.
@@ -32485,7 +32485,7 @@ RED.editor = (function () {
32485
32485
  RED.editor.registerTypeEditor("_buffer", definition);
32486
32486
 
32487
32487
  })();
32488
- ;(function() {
32488
+ ;(function () {
32489
32489
  var template =
32490
32490
  '<script type="text/x-kumologica" data-template-name="_expression">' +
32491
32491
  '<div id="node-input-expression-panels">' +
@@ -32518,7 +32518,7 @@ RED.editor = (function () {
32518
32518
  var expressionTestCache = {};
32519
32519
 
32520
32520
  var definition = {
32521
- show: function(options) {
32521
+ show: function (options) {
32522
32522
  var expressionTestCacheId = options.parent || '_';
32523
32523
  var value = options.value;
32524
32524
  var onComplete = options.complete;
@@ -32536,7 +32536,7 @@ RED.editor = (function () {
32536
32536
  {
32537
32537
  id: 'node-dialog-cancel',
32538
32538
  text: 'Cancel',
32539
- click: function() {
32539
+ click: function () {
32540
32540
  RED.tray.close();
32541
32541
  }
32542
32542
  },
@@ -32544,21 +32544,21 @@ RED.editor = (function () {
32544
32544
  id: 'node-dialog-ok',
32545
32545
  text: 'Done',
32546
32546
  class: 'primary',
32547
- click: function() {
32547
+ click: function () {
32548
32548
  $('#node-input-expression-help').text('');
32549
- RED.tray.close(undefined, ()=> {
32549
+ RED.tray.close(undefined, () => {
32550
32550
  onComplete(expressionEditor.getValue());
32551
32551
  });
32552
32552
  }
32553
32553
  }
32554
32554
  ],
32555
- resize: function(dimensions) {
32555
+ resize: function (dimensions) {
32556
32556
  var height = $('#dialog-form').height();
32557
32557
  if (panels) {
32558
32558
  panels.resize(height);
32559
32559
  }
32560
32560
  },
32561
- open: function(tray) {
32561
+ open: function (tray) {
32562
32562
  var trayBody = tray.find('.editor-tray-body');
32563
32563
  trayBody.addClass('node-input-expression-editor');
32564
32564
  var dialogForm = RED.editor.buildEditForm(
@@ -32568,14 +32568,14 @@ RED.editor = (function () {
32568
32568
  'editor'
32569
32569
  );
32570
32570
  var funcSelect = $('#node-input-expression-func');
32571
- Object.keys(jsonata.functions).forEach(function(f) {
32571
+ Object.keys(jsonata.functions).forEach(function (f) {
32572
32572
  funcSelect.append(
32573
32573
  $('<option></option>')
32574
32574
  .val(f)
32575
32575
  .text(f)
32576
32576
  );
32577
32577
  });
32578
- funcSelect.change(function(e) {
32578
+ funcSelect.change(function (e) {
32579
32579
  var f = $(this).val();
32580
32580
  var args = RED._('jsonata:' + f + '.args', { defaultValue: '' });
32581
32581
  var title = '<h5>' + f + '(' + args + ')</h5>';
@@ -32600,7 +32600,7 @@ RED.editor = (function () {
32600
32600
  var currentFunctionMarker = null;
32601
32601
 
32602
32602
  expressionEditor.getSession().setValue(value || '', -1);
32603
- expressionEditor.on('changeSelection', function() {
32603
+ expressionEditor.on('changeSelection', function () {
32604
32604
  var c = expressionEditor.getCursorPosition();
32605
32605
  var token = expressionEditor
32606
32606
  .getSession()
@@ -32675,7 +32675,7 @@ RED.editor = (function () {
32675
32675
  });
32676
32676
 
32677
32677
  dialogForm.i18n();
32678
- $('#node-input-expression-func-insert').click(function(e) {
32678
+ $('#node-input-expression-func-insert').click(function (e) {
32679
32679
  e.preventDefault();
32680
32680
  var pos = expressionEditor.getCursorPosition();
32681
32681
  var f = funcSelect.val();
@@ -32683,7 +32683,7 @@ RED.editor = (function () {
32683
32683
  expressionEditor.insertSnippet(snippet);
32684
32684
  expressionEditor.focus();
32685
32685
  });
32686
- $('#node-input-expression-reformat').click(function(evt) {
32686
+ $('#node-input-expression-reformat').click(function (evt) {
32687
32687
  evt.preventDefault();
32688
32688
  var v = expressionEditor.getValue() || '';
32689
32689
  try {
@@ -32696,7 +32696,7 @@ RED.editor = (function () {
32696
32696
 
32697
32697
  var tabs = RED.tabs.create({
32698
32698
  element: $('#node-input-expression-tabs'),
32699
- onchange: function(tab) {
32699
+ onchange: function (tab) {
32700
32700
  $('.node-input-expression-tab-content').hide();
32701
32701
  tab.content.show();
32702
32702
  trayOptions.resize();
@@ -32722,12 +32722,12 @@ RED.editor = (function () {
32722
32722
  lineNumbers: false
32723
32723
  });
32724
32724
  var changeTimer;
32725
- $('.node-input-expression-legacy').click(function(e) {
32725
+ $('.node-input-expression-legacy').click(function (e) {
32726
32726
  e.preventDefault();
32727
32727
  RED.sidebar.info.set(RED._('expressionEditor.compatModeDesc'));
32728
32728
  RED.sidebar.info.show();
32729
32729
  });
32730
- var testExpression = function() {
32730
+ var testExpression = function () {
32731
32731
  var value = testDataEditor.getValue();
32732
32732
  var parsedData;
32733
32733
  var currentExpression = expressionEditor.getValue();
@@ -32739,11 +32739,11 @@ RED.editor = (function () {
32739
32739
  $('.node-input-expression-legacy').toggle(legacyMode);
32740
32740
  try {
32741
32741
  expr = jsonata(currentExpression);
32742
- expr.assign('flowContext', function(val) {
32742
+ expr.assign('flowContext', function (val) {
32743
32743
  usesContext = true;
32744
32744
  return null;
32745
32745
  });
32746
- expr.assign('globalContext', function(val) {
32746
+ expr.assign('globalContext', function (val) {
32747
32747
  usesContext = true;
32748
32748
  return null;
32749
32749
  });
@@ -32794,14 +32794,14 @@ RED.editor = (function () {
32794
32794
  }
32795
32795
  };
32796
32796
 
32797
- testDataEditor.getSession().on('change', function() {
32797
+ testDataEditor.getSession().on('change', function () {
32798
32798
  clearTimeout(changeTimer);
32799
32799
  changeTimer = setTimeout(testExpression, 200);
32800
32800
  expressionTestCache[
32801
32801
  expressionTestCacheId
32802
32802
  ] = testDataEditor.getValue();
32803
32803
  });
32804
- expressionEditor.getSession().on('change', function() {
32804
+ expressionEditor.getSession().on('change', function () {
32805
32805
  clearTimeout(changeTimer);
32806
32806
  changeTimer = setTimeout(testExpression, 200);
32807
32807
  });
@@ -32815,7 +32815,7 @@ RED.editor = (function () {
32815
32815
  });
32816
32816
  panels = RED.panels.create({
32817
32817
  id: 'node-input-expression-panels',
32818
- resize: function(p1Height, p2Height) {
32818
+ resize: function (p1Height, p2Height) {
32819
32819
  var p1 = $('#node-input-expression-panel-expr');
32820
32820
  p1Height -= $(p1.children()[0]).outerHeight(true);
32821
32821
  var editorRow = $(p1.children()[1]);
@@ -32843,7 +32843,7 @@ RED.editor = (function () {
32843
32843
  }
32844
32844
  });
32845
32845
 
32846
- $('#node-input-example-reformat').click(function(evt) {
32846
+ $('#node-input-example-reformat').click(function (evt) {
32847
32847
  evt.preventDefault();
32848
32848
  var v = testDataEditor.getValue() || '';
32849
32849
  try {
@@ -32856,14 +32856,14 @@ RED.editor = (function () {
32856
32856
 
32857
32857
  testExpression();
32858
32858
  },
32859
- close: function() {
32859
+ close: function () {
32860
32860
  if (options.onclose) {
32861
32861
  options.onclose();
32862
32862
  }
32863
32863
  expressionEditor.destroy();
32864
32864
  testDataEditor.destroy();
32865
32865
  },
32866
- show: function() {}
32866
+ show: function () { }
32867
32867
  };
32868
32868
  RED.tray.show(trayOptions);
32869
32869
  }
@@ -32875,241 +32875,269 @@ RED.editor = (function () {
32875
32875
  const jsonataFns =
32876
32876
  {
32877
32877
  "$string": {
32878
- "args": "arg",
32879
- "desc": "Casts the *arg* parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function"
32878
+ "args": "arg",
32879
+ "desc": "Casts the *arg* parameter to a string using the following casting rules:\n\n - Strings are unchanged\n - Functions are converted to an empty string\n - Numeric infinity and NaN throw an error because they cannot be represented as a JSON number\n - All other values are converted to a JSON string using the `JSON.stringify` function"
32880
32880
  },
32881
32881
  "$length": {
32882
- "args": "str",
32883
- "desc": "Returns the number of characters in the string `str`. An error is thrown if `str` is not a string."
32882
+ "args": "str",
32883
+ "desc": "Returns the number of characters in the string `str`. An error is thrown if `str` is not a string."
32884
32884
  },
32885
32885
  "$substring": {
32886
- "args": "str, start[, length]",
32887
- "desc": "Returns a string containing the characters in the first parameter `str` starting at position `start` (zero-offset). If `length` is specified, then the substring will contain maximum `length` characters. If `start` is negative then it indicates the number of characters from the end of `str`."
32886
+ "args": "str, start[, length]",
32887
+ "desc": "Returns a string containing the characters in the first parameter `str` starting at position `start` (zero-offset). If `length` is specified, then the substring will contain maximum `length` characters. If `start` is negative then it indicates the number of characters from the end of `str`."
32888
32888
  },
32889
32889
  "$substringBefore": {
32890
- "args": "str, chars",
32891
- "desc": "Returns the substring before the first occurrence of the character sequence `chars` in `str`. If `str` does not contain `chars`, then it returns `str`."
32890
+ "args": "str, chars",
32891
+ "desc": "Returns the substring before the first occurrence of the character sequence `chars` in `str`. If `str` does not contain `chars`, then it returns `str`."
32892
32892
  },
32893
32893
  "$substringAfter": {
32894
- "args": "str, chars",
32895
- "desc": "Returns the substring after the first occurrence of the character sequence `chars` in `str`. If `str` does not contain `chars`, then it returns `str`."
32894
+ "args": "str, chars",
32895
+ "desc": "Returns the substring after the first occurrence of the character sequence `chars` in `str`. If `str` does not contain `chars`, then it returns `str`."
32896
32896
  },
32897
32897
  "$uppercase": {
32898
- "args": "str",
32899
- "desc": "Returns a string with all the characters of `str` converted to uppercase."
32898
+ "args": "str",
32899
+ "desc": "Returns a string with all the characters of `str` converted to uppercase."
32900
32900
  },
32901
32901
  "$lowercase": {
32902
- "args": "str",
32903
- "desc": "Returns a string with all the characters of `str` converted to lowercase."
32902
+ "args": "str",
32903
+ "desc": "Returns a string with all the characters of `str` converted to lowercase."
32904
32904
  },
32905
32905
  "$trim": {
32906
- "args": "str",
32907
- "desc": "Normalizes and trims all whitespace characters in `str` by applying the following steps:\n\n - All tabs, carriage returns, and line feeds are replaced with spaces.\n- Contiguous sequences of spaces are reduced to a single space.\n- Trailing and leading spaces are removed.\n\n If `str` is not specified (i.e. this function is invoked with no arguments), then the context value is used as the value of `str`. An error is thrown if `str` is not a string."
32906
+ "args": "str",
32907
+ "desc": "Normalizes and trims all whitespace characters in `str` by applying the following steps:\n\n - All tabs, carriage returns, and line feeds are replaced with spaces.\n- Contiguous sequences of spaces are reduced to a single space.\n- Trailing and leading spaces are removed.\n\n If `str` is not specified (i.e. this function is invoked with no arguments), then the context value is used as the value of `str`. An error is thrown if `str` is not a string."
32908
32908
  },
32909
32909
  "$contains": {
32910
- "args": "str, pattern",
32911
- "desc": "Returns `true` if `str` is matched by `pattern`, otherwise it returns `false`. If `str` is not specified (i.e. this function is invoked with one argument), then the context value is used as the value of `str`. The `pattern` parameter can either be a string or a regular expression."
32910
+ "args": "str, pattern",
32911
+ "desc": "Returns `true` if `str` is matched by `pattern`, otherwise it returns `false`. If `str` is not specified (i.e. this function is invoked with one argument), then the context value is used as the value of `str`. The `pattern` parameter can either be a string or a regular expression."
32912
32912
  },
32913
32913
  "$split": {
32914
- "args": "str[, separator][, limit]",
32915
- "desc": "Splits the `str` parameter into an array of substrings. It is an error if `str` is not a string. The optional `separator` parameter specifies the characters within the `str` about which it should be split as either a string or regular expression. If `separator` is not specified, then the empty string is assumed, and `str` will be split into an array of single characters. It is an error if `separator` is not a string. The optional `limit` parameter is a number that specifies the maximum number of substrings to include in the resultant array. Any additional substrings are discarded. If `limit` is not specified, then `str` is fully split with no limit to the size of the resultant array. It is an error if `limit` is not a non-negative number."
32914
+ "args": "str[, separator][, limit]",
32915
+ "desc": "Splits the `str` parameter into an array of substrings. It is an error if `str` is not a string. The optional `separator` parameter specifies the characters within the `str` about which it should be split as either a string or regular expression. If `separator` is not specified, then the empty string is assumed, and `str` will be split into an array of single characters. It is an error if `separator` is not a string. The optional `limit` parameter is a number that specifies the maximum number of substrings to include in the resultant array. Any additional substrings are discarded. If `limit` is not specified, then `str` is fully split with no limit to the size of the resultant array. It is an error if `limit` is not a non-negative number."
32916
32916
  },
32917
32917
  "$join": {
32918
- "args": "array[, separator]",
32919
- "desc": "Joins an array of component strings into a single concatenated string with each component string separated by the optional `separator` parameter. It is an error if the input `array` contains an item which isn't a string. If `separator` is not specified, then it is assumed to be the empty string, i.e. no `separator` between the component strings. It is an error if `separator` is not a string."
32918
+ "args": "array[, separator]",
32919
+ "desc": "Joins an array of component strings into a single concatenated string with each component string separated by the optional `separator` parameter. It is an error if the input `array` contains an item which isn't a string. If `separator` is not specified, then it is assumed to be the empty string, i.e. no `separator` between the component strings. It is an error if `separator` is not a string."
32920
32920
  },
32921
32921
  "$match": {
32922
- "args": "str, pattern [, limit]",
32923
- "desc": "Applies the `str` string to the `pattern` regular expression and returns an array of objects, with each object containing information about each occurrence of a match within `str`."
32922
+ "args": "str, pattern [, limit]",
32923
+ "desc": "Applies the `str` string to the `pattern` regular expression and returns an array of objects, with each object containing information about each occurrence of a match within `str`."
32924
32924
  },
32925
32925
  "$replace": {
32926
- "args": "str, pattern, replacement [, limit]",
32927
- "desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
32926
+ "args": "str, pattern, replacement [, limit]",
32927
+ "desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
32928
32928
  },
32929
32929
  "$now": {
32930
- "args":"",
32931
- "desc":"Generates a timestamp in ISO 8601 compatible format and returns it as a string."
32930
+ "args": "",
32931
+ "desc": "Generates a timestamp in ISO 8601 compatible format and returns it as a string."
32932
32932
  },
32933
32933
  "$base64encode": {
32934
- "args":"string",
32935
- "desc":"Converts an ASCII string to a base 64 representation. Each character in the string is treated as a byte of binary data. This requires that all characters in the string are in the 0x00 to 0xFF range, which includes all characters in URI encoded strings. Unicode characters outside of that range are not supported."
32934
+ "args": "string",
32935
+ "desc": "Converts an ASCII string to a base 64 representation. Each character in the string is treated as a byte of binary data. This requires that all characters in the string are in the 0x00 to 0xFF range, which includes all characters in URI encoded strings. Unicode characters outside of that range are not supported."
32936
32936
  },
32937
32937
  "$base64decode": {
32938
- "args":"string",
32939
- "desc":"Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
32938
+ "args": "string",
32939
+ "desc": "Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
32940
32940
  },
32941
32941
  "$number": {
32942
- "args": "arg",
32943
- "desc": "Casts the `arg` parameter to a number using the following casting rules:\n\n - Numbers are unchanged\n - Strings that contain a sequence of characters that represent a legal JSON number are converted to that number\n - All other values cause an error to be thrown."
32942
+ "args": "arg",
32943
+ "desc": "Casts the `arg` parameter to a number using the following casting rules:\n\n - Numbers are unchanged\n - Strings that contain a sequence of characters that represent a legal JSON number are converted to that number\n - All other values cause an error to be thrown."
32944
32944
  },
32945
32945
  "$abs": {
32946
- "args":"number",
32947
- "desc":"Returns the absolute value of the `number` parameter."
32946
+ "args": "number",
32947
+ "desc": "Returns the absolute value of the `number` parameter."
32948
32948
  },
32949
32949
  "$floor": {
32950
- "args":"number",
32951
- "desc":"Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
32950
+ "args": "number",
32951
+ "desc": "Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
32952
32952
  },
32953
32953
  "$ceil": {
32954
- "args":"number",
32955
- "desc":"Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
32954
+ "args": "number",
32955
+ "desc": "Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
32956
32956
  },
32957
32957
  "$round": {
32958
- "args":"number [, precision]",
32959
- "desc":"Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
32958
+ "args": "number [, precision]",
32959
+ "desc": "Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
32960
32960
  },
32961
32961
  "$power": {
32962
- "args":"base, exponent",
32963
- "desc":"Returns the value of `base` raised to the power of `exponent`."
32962
+ "args": "base, exponent",
32963
+ "desc": "Returns the value of `base` raised to the power of `exponent`."
32964
32964
  },
32965
32965
  "$sqrt": {
32966
- "args":"number",
32967
- "desc":"Returns the square root of the value of the `number` parameter."
32966
+ "args": "number",
32967
+ "desc": "Returns the square root of the value of the `number` parameter."
32968
32968
  },
32969
32969
  "$random": {
32970
- "args":"",
32971
- "desc":"Returns a pseudo random number greater than or equal to zero and less than one."
32970
+ "args": "",
32971
+ "desc": "Returns a pseudo random number greater than or equal to zero and less than one."
32972
32972
  },
32973
32973
  "$millis": {
32974
- "args":"",
32975
- "desc":"Returns the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. All invocations of `$millis()` within an evaluation of an expression will all return the same value."
32974
+ "args": "",
32975
+ "desc": "Returns the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. All invocations of `$millis()` within an evaluation of an expression will all return the same value."
32976
32976
  },
32977
32977
  "$sum": {
32978
- "args": "array",
32979
- "desc": "Returns the arithmetic sum of an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32978
+ "args": "array",
32979
+ "desc": "Returns the arithmetic sum of an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32980
32980
  },
32981
32981
  "$max": {
32982
- "args": "array",
32983
- "desc": "Returns the maximum number in an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32982
+ "args": "array",
32983
+ "desc": "Returns the maximum number in an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32984
32984
  },
32985
32985
  "$min": {
32986
- "args": "array",
32987
- "desc": "Returns the minimum number in an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32986
+ "args": "array",
32987
+ "desc": "Returns the minimum number in an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32988
32988
  },
32989
32989
  "$average": {
32990
- "args": "array",
32991
- "desc": "Returns the mean value of an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32990
+ "args": "array",
32991
+ "desc": "Returns the mean value of an `array` of numbers. It is an error if the input `array` contains an item which isn't a number."
32992
32992
  },
32993
32993
  "$boolean": {
32994
- "args": "arg",
32995
- "desc": "Casts the argument to a Boolean using the following rules:\n\n - `Boolean` : unchanged\n - `string`: empty : `false`\n - `string`: non-empty : `true`\n - `number`: `0` : `false`\n - `number`: non-zero : `true`\n - `null` : `false`\n - `array`: empty : `false`\n - `array`: contains a member that casts to `true` : `true`\n - `array`: all members cast to `false` : `false`\n - `object`: empty : `false`\n - `object`: non-empty : `true`\n - `function` : `false`"
32994
+ "args": "arg",
32995
+ "desc": "Casts the argument to a Boolean using the following rules:\n\n - `Boolean` : unchanged\n - `string`: empty : `false`\n - `string`: non-empty : `true`\n - `number`: `0` : `false`\n - `number`: non-zero : `true`\n - `null` : `false`\n - `array`: empty : `false`\n - `array`: contains a member that casts to `true` : `true`\n - `array`: all members cast to `false` : `false`\n - `object`: empty : `false`\n - `object`: non-empty : `true`\n - `function` : `false`"
32996
32996
  },
32997
32997
  "$not": {
32998
- "args": "arg",
32999
- "desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
32998
+ "args": "arg",
32999
+ "desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
33000
33000
  },
33001
33001
  "$exists": {
33002
- "args": "arg",
33003
- "desc": "Returns Boolean `true` if the `arg` expression evaluates to a value, or `false` if the expression does not match anything (e.g. a path to a non-existent field reference)."
33002
+ "args": "arg",
33003
+ "desc": "Returns Boolean `true` if the `arg` expression evaluates to a value, or `false` if the expression does not match anything (e.g. a path to a non-existent field reference)."
33004
33004
  },
33005
33005
  "$count": {
33006
- "args": "array",
33007
- "desc": "Returns the number of items in the array"
33006
+ "args": "array",
33007
+ "desc": "Returns the number of items in the array"
33008
33008
  },
33009
33009
  "$append": {
33010
- "args": "array, array",
33011
- "desc": "Appends two arrays"
33010
+ "args": "array, array",
33011
+ "desc": "Appends two arrays"
33012
33012
  },
33013
33013
  "$sort": {
33014
- "args":"array [, function]",
33015
- "desc":"Returns an array containing all the values in the `array` parameter, but sorted into order.\n\nIf a comparator `function` is supplied, then it must be a function that takes two parameters:\n\n`function(left, right)`\n\nThis function gets invoked by the sorting algorithm to compare two values left and right. If the value of left should be placed after the value of right in the desired sort order, then the function must return Boolean `true` to indicate a swap. Otherwise it must return `false`."
33014
+ "args": "array [, function]",
33015
+ "desc": "Returns an array containing all the values in the `array` parameter, but sorted into order.\n\nIf a comparator `function` is supplied, then it must be a function that takes two parameters:\n\n`function(left, right)`\n\nThis function gets invoked by the sorting algorithm to compare two values left and right. If the value of left should be placed after the value of right in the desired sort order, then the function must return Boolean `true` to indicate a swap. Otherwise it must return `false`."
33016
33016
  },
33017
33017
  "$reverse": {
33018
- "args":"array",
33019
- "desc":"Returns an array containing all the values from the `array` parameter, but in reverse order."
33018
+ "args": "array",
33019
+ "desc": "Returns an array containing all the values from the `array` parameter, but in reverse order."
33020
33020
  },
33021
33021
  "$shuffle": {
33022
- "args":"array",
33023
- "desc":"Returns an array containing all the values from the `array` parameter, but shuffled into random order."
33022
+ "args": "array",
33023
+ "desc": "Returns an array containing all the values from the `array` parameter, but shuffled into random order."
33024
33024
  },
33025
33025
  "$zip": {
33026
- "args":"array, ...",
33027
- "desc":"Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
33026
+ "args": "array, ...",
33027
+ "desc": "Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
33028
33028
  },
33029
33029
  "$keys": {
33030
- "args": "object",
33031
- "desc": "Returns an array containing the keys in the object. If the argument is an array of objects, then the array returned contains a de-duplicated list of all the keys in all of the objects."
33030
+ "args": "object",
33031
+ "desc": "Returns an array containing the keys in the object. If the argument is an array of objects, then the array returned contains a de-duplicated list of all the keys in all of the objects."
33032
33032
  },
33033
33033
  "$lookup": {
33034
- "args": "object, key",
33035
- "desc": "Returns the value associated with key in object. If the first argument is an array of objects, then all of the objects in the array are searched, and the values associated with all occurrences of key are returned."
33034
+ "args": "object, key",
33035
+ "desc": "Returns the value associated with key in object. If the first argument is an array of objects, then all of the objects in the array are searched, and the values associated with all occurrences of key are returned."
33036
33036
  },
33037
33037
  "$spread": {
33038
- "args": "object",
33039
- "desc": "Splits an object containing key/value pairs into an array of objects, each of which has a single key/value pair from the input object. If the parameter is an array of objects, then the resultant array contains an object for every key/value pair in every object in the supplied array."
33038
+ "args": "object",
33039
+ "desc": "Splits an object containing key/value pairs into an array of objects, each of which has a single key/value pair from the input object. If the parameter is an array of objects, then the resultant array contains an object for every key/value pair in every object in the supplied array."
33040
33040
  },
33041
33041
  "$merge": {
33042
- "args": "array&lt;object&gt;",
33043
- "desc": "Merges an array of `objects` into a single `object` containing all the key/value pairs from each of the objects in the input array. If any of the input objects contain the same key, then the returned `object` will contain the value of the last one in the array. It is an error if the input array contains an item that is not an object."
33042
+ "args": "array&lt;object&gt;",
33043
+ "desc": "Merges an array of `objects` into a single `object` containing all the key/value pairs from each of the objects in the input array. If any of the input objects contain the same key, then the returned `object` will contain the value of the last one in the array. It is an error if the input array contains an item that is not an object."
33044
33044
  },
33045
33045
  "$sift": {
33046
- "args":"object, function",
33047
- "desc":"Returns an object that contains only the key/value pairs from the `object` parameter that satisfy the predicate `function` passed in as the second parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, key [, object]])`"
33046
+ "args": "object, function",
33047
+ "desc": "Returns an object that contains only the key/value pairs from the `object` parameter that satisfy the predicate `function` passed in as the second parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, key [, object]])`"
33048
33048
  },
33049
33049
  "$each": {
33050
- "args":"object, function",
33051
- "desc":"Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
33050
+ "args": "object, function",
33051
+ "desc": "Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
33052
33052
  },
33053
33053
  "$map": {
33054
- "args":"array, function",
33055
- "desc":"Returns an array containing the results of applying the `function` parameter to each value in the `array` parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
33054
+ "args": "array, function",
33055
+ "desc": "Returns an array containing the results of applying the `function` parameter to each value in the `array` parameter.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
33056
33056
  },
33057
33057
  "$filter": {
33058
- "args":"array, function",
33059
- "desc":"Returns an array containing only the values in the `array` parameter that satisfy the `function` predicate.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
33058
+ "args": "array, function",
33059
+ "desc": "Returns an array containing only the values in the `array` parameter that satisfy the `function` predicate.\n\nThe `function` that is supplied as the second parameter must have the following signature:\n\n`function(value [, index [, array]])`"
33060
33060
  },
33061
33061
  "$reduce": {
33062
- "args":"array, function [, init]",
33063
- "desc":"Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`.\n\nThe optional `init` parameter is used as the initial value in the aggregation."
33062
+ "args": "array, function [, init]",
33063
+ "desc": "Returns an aggregated value derived from applying the `function` parameter successively to each value in `array` in combination with the result of the previous application of the function.\n\nThe function must accept two arguments, and behaves like an infix operator between each value within the `array`.\n\nThe optional `init` parameter is used as the initial value in the aggregation."
33064
33064
  },
33065
33065
  "$flowContext": {
33066
- "args": "string[, string]",
33067
- "desc": "Retrieves a flow context property.\n\nThis is a kumologica-core defined function."
33066
+ "args": "string[, string]",
33067
+ "desc": "Retrieves a flow context property.\n\nThis is a kumologica-core defined function."
33068
33068
  },
33069
33069
  "$globalContext": {
33070
- "args": "string[, string]",
33071
- "desc": "Retrieves a global context property.\n\nThis is a kumologica-core defined function."
33070
+ "args": "string[, string]",
33071
+ "desc": "Retrieves a global context property.\n\nThis is a kumologica-core defined function."
33072
33072
  },
33073
33073
  "$pad": {
33074
- "args": "string, width [, char]",
33075
- "desc": "Returns a copy of the `string` with extra padding, if necessary, so that its total number of characters is at least the absolute value of the `width` parameter.\n\nIf `width` is a positive number, then the string is padded to the right; if negative, it is padded to the left.\n\nThe optional `char` argument specifies the padding character(s) to use. If not specified, it defaults to the space character."
33074
+ "args": "string, width [, char]",
33075
+ "desc": "Returns a copy of the `string` with extra padding, if necessary, so that its total number of characters is at least the absolute value of the `width` parameter.\n\nIf `width` is a positive number, then the string is padded to the right; if negative, it is padded to the left.\n\nThe optional `char` argument specifies the padding character(s) to use. If not specified, it defaults to the space character."
33076
33076
  },
33077
33077
  "$fromMillis": {
33078
- "args": "number",
33079
- "desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format."
33078
+ "args": "number",
33079
+ "desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format."
33080
33080
  },
33081
33081
  "$formatNumber": {
33082
- "args": "number, picture [, options]",
33083
- "desc": "Casts the `number` to a string and formats it to a decimal representation as specified by the `picture` string.\n\n The behaviour of this function is consistent with the XPath/XQuery function fn:format-number as defined in the XPath F&O 3.1 specification. The picture string parameter defines how the number is formatted and has the same syntax as fn:format-number.\n\nThe optional third argument `options` is used to override the default locale specific formatting characters such as the decimal separator. If supplied, this argument must be an object containing name/value pairs specified in the decimal format section of the XPath F&O 3.1 specification."
33082
+ "args": "number, picture [, options]",
33083
+ "desc": "Casts the `number` to a string and formats it to a decimal representation as specified by the `picture` string.\n\n The behaviour of this function is consistent with the XPath/XQuery function fn:format-number as defined in the XPath F&O 3.1 specification. The picture string parameter defines how the number is formatted and has the same syntax as fn:format-number.\n\nThe optional third argument `options` is used to override the default locale specific formatting characters such as the decimal separator. If supplied, this argument must be an object containing name/value pairs specified in the decimal format section of the XPath F&O 3.1 specification."
33084
33084
  },
33085
33085
  "$formatBase": {
33086
- "args": "number [, radix]",
33087
- "desc": "Casts the `number` to a string and formats it to an integer represented in the number base specified by the `radix` argument. If `radix` is not specified, then it defaults to base 10. `radix` can be between 2 and 36, otherwise an error is thrown."
33086
+ "args": "number [, radix]",
33087
+ "desc": "Casts the `number` to a string and formats it to an integer represented in the number base specified by the `radix` argument. If `radix` is not specified, then it defaults to base 10. `radix` can be between 2 and 36, otherwise an error is thrown."
33088
33088
  },
33089
33089
  "$toMillis": {
33090
- "args": "timestamp",
33091
- "desc": "Convert a `timestamp` string in the ISO 8601 format to the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. An error is thrown if the string is not in the correct format."
33090
+ "args": "timestamp",
33091
+ "desc": "Convert a `timestamp` string in the ISO 8601 format to the number of milliseconds since the Unix Epoch (1 January, 1970 UTC) as a number. An error is thrown if the string is not in the correct format."
33092
33092
  },
33093
33093
  "$env": {
33094
- "args": "arg",
33095
- "desc": "Returns the value of an environment variable.\n\nThis is a kumologica-core defined function."
33094
+ "args": "arg",
33095
+ "desc": "Returns the value of an environment variable.\n\nThis is a kumologica-core defined function."
33096
33096
  },
33097
33097
  "$eval": {
33098
- "args": "expr [, context]",
33099
- "desc": "Parses and evaluates the string `expr` which contains literal JSON or a JSONata expression using the current context as the context for evaluation."
33098
+ "args": "expr [, context]",
33099
+ "desc": "Parses and evaluates the string `expr` which contains literal JSON or a JSONata expression using the current context as the context for evaluation."
33100
33100
  },
33101
33101
  "$formatInteger": {
33102
- "args": "number, picture",
33103
- "desc": "Casts the `number` to a string and formats it to an integer representation as specified by the `picture` string. The picture string parameter defines how the number is formatted and has the same syntax as `fn:format-integer` from the XPath F&O 3.1 specification."
33102
+ "args": "number, picture",
33103
+ "desc": "Casts the `number` to a string and formats it to an integer representation as specified by the `picture` string. The picture string parameter defines how the number is formatted and has the same syntax as `fn:format-integer` from the XPath F&O 3.1 specification."
33104
33104
  },
33105
33105
  "$parseInteger": {
33106
- "args": "string, picture",
33107
- "desc": "Parses the contents of the `string` parameter to an integer (as a JSON number) using the format specified by the `picture` string. The `picture` string parameter has the same format as `$formatInteger`."
33106
+ "args": "string, picture",
33107
+ "desc": "Parses the contents of the `string` parameter to an integer (as a JSON number) using the format specified by the `picture` string. The `picture` string parameter has the same format as `$formatInteger`."
33108
33108
 
33109
33109
  },
33110
33110
  "$single": {
33111
- "args": "array, function",
33112
- "desc": "Returns the one and only one value in the array parameter that satisfy the function predicate"
33111
+ "args": "array, function",
33112
+ "desc": "Returns the one and only one value in the array parameter that satisfy the function predicate"
33113
+ },
33114
+ "$maskjson": {
33115
+ "args": "object, object",
33116
+ "desc": "Returns masked phone,email,password,phone or card number for a given input JSON content passed as first argument. The masking rule can be passed as the second argument object"
33117
+ },
33118
+ "$maskphone": {
33119
+ "args": "string, object",
33120
+ "desc": "Returns masked phone number for a given input phone number passed as first argument. The masking rule can be passed as the second argument object"
33121
+ },
33122
+ "$maskemail": {
33123
+ "args": "string, object",
33124
+ "desc": "Returns masked email for a given input email id passed as first argument. The masking rule can be passed as the second argument object"
33125
+ },
33126
+ "$maskcard": {
33127
+ "args": "string, object",
33128
+ "desc": "Returns masked card number for a given input credit or debit card number passed as first argument. The masking rule can be passed as the second argument object"
33129
+ },
33130
+ "$maskpassword": {
33131
+ "args": "string, object",
33132
+ "desc": "Returns masked password for a given field as password passed as first argument. The masking rule can be passed as the second argument object"
33133
+ },
33134
+ "$queryparam": {
33135
+ "args": "string",
33136
+ "desc": "Returns the value for the given query parameter key"
33137
+ },
33138
+ "$uriparam": {
33139
+ "args": "string",
33140
+ "desc": "Returns the value for the given path parameter key"
33113
33141
  }
33114
33142
  }
33115
33143
  ;