@kumologica/sdk 3.2.0-beta2 → 3.2.0-beta20

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.
@@ -166,7 +166,14 @@ var runtime=function(e){"use strict";var t,r=Object.prototype,n=r.hasOwnProperty
166
166
  '$uppercase':{ args:[ 'str' ]},
167
167
  '$zip':{ args:[ 'array1' ]},
168
168
  '$vars': {args:['string']},
169
- '$single': {args:['array','function']}
169
+ '$single': {args:['array','function']},
170
+ '$maskjson':{ args:[ 'object','object' ]},
171
+ '$maskemail':{ args:[ 'string','object' ]},
172
+ '$maskcard':{ args:[ 'string','object' ]},
173
+ '$maskphone':{ args:[ 'string','object' ]},
174
+ '$maskpassword':{ args:[ 'string','object' ]},
175
+ '$queryparam': { args:[ 'string']},
176
+ '$uriparam': { args:[ 'string']}
170
177
  }
171
178
  jsonata.getFunctionSnippet = function(fn) {
172
179
  var snippetText = "";
@@ -1,4 +1,4 @@
1
- (function() {
1
+ (function () {
2
2
  var template =
3
3
  '<script type="text/x-kumologica" data-template-name="_expression">' +
4
4
  '<div id="node-input-expression-panels">' +
@@ -31,7 +31,7 @@
31
31
  var expressionTestCache = {};
32
32
 
33
33
  var definition = {
34
- show: function(options) {
34
+ show: function (options) {
35
35
  var expressionTestCacheId = options.parent || '_';
36
36
  var value = options.value;
37
37
  var onComplete = options.complete;
@@ -49,7 +49,7 @@
49
49
  {
50
50
  id: 'node-dialog-cancel',
51
51
  text: 'Cancel',
52
- click: function() {
52
+ click: function () {
53
53
  RED.tray.close();
54
54
  }
55
55
  },
@@ -57,21 +57,21 @@
57
57
  id: 'node-dialog-ok',
58
58
  text: 'Done',
59
59
  class: 'primary',
60
- click: function() {
60
+ click: function () {
61
61
  $('#node-input-expression-help').text('');
62
- RED.tray.close(undefined, ()=> {
62
+ RED.tray.close(undefined, () => {
63
63
  onComplete(expressionEditor.getValue());
64
64
  });
65
65
  }
66
66
  }
67
67
  ],
68
- resize: function(dimensions) {
68
+ resize: function (dimensions) {
69
69
  var height = $('#dialog-form').height();
70
70
  if (panels) {
71
71
  panels.resize(height);
72
72
  }
73
73
  },
74
- open: function(tray) {
74
+ open: function (tray) {
75
75
  var trayBody = tray.find('.editor-tray-body');
76
76
  trayBody.addClass('node-input-expression-editor');
77
77
  var dialogForm = RED.editor.buildEditForm(
@@ -81,14 +81,14 @@
81
81
  'editor'
82
82
  );
83
83
  var funcSelect = $('#node-input-expression-func');
84
- Object.keys(jsonata.functions).forEach(function(f) {
84
+ Object.keys(jsonata.functions).forEach(function (f) {
85
85
  funcSelect.append(
86
86
  $('<option></option>')
87
87
  .val(f)
88
88
  .text(f)
89
89
  );
90
90
  });
91
- funcSelect.change(function(e) {
91
+ funcSelect.change(function (e) {
92
92
  var f = $(this).val();
93
93
  var args = RED._('jsonata:' + f + '.args', { defaultValue: '' });
94
94
  var title = '<h5>' + f + '(' + args + ')</h5>';
@@ -113,7 +113,7 @@
113
113
  var currentFunctionMarker = null;
114
114
 
115
115
  expressionEditor.getSession().setValue(value || '', -1);
116
- expressionEditor.on('changeSelection', function() {
116
+ expressionEditor.on('changeSelection', function () {
117
117
  var c = expressionEditor.getCursorPosition();
118
118
  var token = expressionEditor
119
119
  .getSession()
@@ -188,7 +188,7 @@
188
188
  });
189
189
 
190
190
  dialogForm.i18n();
191
- $('#node-input-expression-func-insert').click(function(e) {
191
+ $('#node-input-expression-func-insert').click(function (e) {
192
192
  e.preventDefault();
193
193
  var pos = expressionEditor.getCursorPosition();
194
194
  var f = funcSelect.val();
@@ -196,7 +196,7 @@
196
196
  expressionEditor.insertSnippet(snippet);
197
197
  expressionEditor.focus();
198
198
  });
199
- $('#node-input-expression-reformat').click(function(evt) {
199
+ $('#node-input-expression-reformat').click(function (evt) {
200
200
  evt.preventDefault();
201
201
  var v = expressionEditor.getValue() || '';
202
202
  try {
@@ -209,7 +209,7 @@
209
209
 
210
210
  var tabs = RED.tabs.create({
211
211
  element: $('#node-input-expression-tabs'),
212
- onchange: function(tab) {
212
+ onchange: function (tab) {
213
213
  $('.node-input-expression-tab-content').hide();
214
214
  tab.content.show();
215
215
  trayOptions.resize();
@@ -235,12 +235,12 @@
235
235
  lineNumbers: false
236
236
  });
237
237
  var changeTimer;
238
- $('.node-input-expression-legacy').click(function(e) {
238
+ $('.node-input-expression-legacy').click(function (e) {
239
239
  e.preventDefault();
240
240
  RED.sidebar.info.set(RED._('expressionEditor.compatModeDesc'));
241
241
  RED.sidebar.info.show();
242
242
  });
243
- var testExpression = function() {
243
+ var testExpression = function () {
244
244
  var value = testDataEditor.getValue();
245
245
  var parsedData;
246
246
  var currentExpression = expressionEditor.getValue();
@@ -252,11 +252,11 @@
252
252
  $('.node-input-expression-legacy').toggle(legacyMode);
253
253
  try {
254
254
  expr = jsonata(currentExpression);
255
- expr.assign('flowContext', function(val) {
255
+ expr.assign('flowContext', function (val) {
256
256
  usesContext = true;
257
257
  return null;
258
258
  });
259
- expr.assign('globalContext', function(val) {
259
+ expr.assign('globalContext', function (val) {
260
260
  usesContext = true;
261
261
  return null;
262
262
  });
@@ -307,14 +307,14 @@
307
307
  }
308
308
  };
309
309
 
310
- testDataEditor.getSession().on('change', function() {
310
+ testDataEditor.getSession().on('change', function () {
311
311
  clearTimeout(changeTimer);
312
312
  changeTimer = setTimeout(testExpression, 200);
313
313
  expressionTestCache[
314
314
  expressionTestCacheId
315
315
  ] = testDataEditor.getValue();
316
316
  });
317
- expressionEditor.getSession().on('change', function() {
317
+ expressionEditor.getSession().on('change', function () {
318
318
  clearTimeout(changeTimer);
319
319
  changeTimer = setTimeout(testExpression, 200);
320
320
  });
@@ -328,7 +328,7 @@
328
328
  });
329
329
  panels = RED.panels.create({
330
330
  id: 'node-input-expression-panels',
331
- resize: function(p1Height, p2Height) {
331
+ resize: function (p1Height, p2Height) {
332
332
  var p1 = $('#node-input-expression-panel-expr');
333
333
  p1Height -= $(p1.children()[0]).outerHeight(true);
334
334
  var editorRow = $(p1.children()[1]);
@@ -356,7 +356,7 @@
356
356
  }
357
357
  });
358
358
 
359
- $('#node-input-example-reformat').click(function(evt) {
359
+ $('#node-input-example-reformat').click(function (evt) {
360
360
  evt.preventDefault();
361
361
  var v = testDataEditor.getValue() || '';
362
362
  try {
@@ -369,14 +369,14 @@
369
369
 
370
370
  testExpression();
371
371
  },
372
- close: function() {
372
+ close: function () {
373
373
  if (options.onclose) {
374
374
  options.onclose();
375
375
  }
376
376
  expressionEditor.destroy();
377
377
  testDataEditor.destroy();
378
378
  },
379
- show: function() {}
379
+ show: function () { }
380
380
  };
381
381
  RED.tray.show(trayOptions);
382
382
  }
@@ -388,240 +388,268 @@
388
388
  const jsonataFns =
389
389
  {
390
390
  "$string": {
391
- "args": "arg",
392
- "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"
391
+ "args": "arg",
392
+ "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"
393
393
  },
394
394
  "$length": {
395
- "args": "str",
396
- "desc": "Returns the number of characters in the string `str`. An error is thrown if `str` is not a string."
395
+ "args": "str",
396
+ "desc": "Returns the number of characters in the string `str`. An error is thrown if `str` is not a string."
397
397
  },
398
398
  "$substring": {
399
- "args": "str, start[, length]",
400
- "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`."
399
+ "args": "str, start[, length]",
400
+ "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`."
401
401
  },
402
402
  "$substringBefore": {
403
- "args": "str, chars",
404
- "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`."
403
+ "args": "str, chars",
404
+ "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`."
405
405
  },
406
406
  "$substringAfter": {
407
- "args": "str, chars",
408
- "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`."
407
+ "args": "str, chars",
408
+ "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`."
409
409
  },
410
410
  "$uppercase": {
411
- "args": "str",
412
- "desc": "Returns a string with all the characters of `str` converted to uppercase."
411
+ "args": "str",
412
+ "desc": "Returns a string with all the characters of `str` converted to uppercase."
413
413
  },
414
414
  "$lowercase": {
415
- "args": "str",
416
- "desc": "Returns a string with all the characters of `str` converted to lowercase."
415
+ "args": "str",
416
+ "desc": "Returns a string with all the characters of `str` converted to lowercase."
417
417
  },
418
418
  "$trim": {
419
- "args": "str",
420
- "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."
419
+ "args": "str",
420
+ "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."
421
421
  },
422
422
  "$contains": {
423
- "args": "str, pattern",
424
- "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."
423
+ "args": "str, pattern",
424
+ "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."
425
425
  },
426
426
  "$split": {
427
- "args": "str[, separator][, limit]",
428
- "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."
427
+ "args": "str[, separator][, limit]",
428
+ "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."
429
429
  },
430
430
  "$join": {
431
- "args": "array[, separator]",
432
- "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."
431
+ "args": "array[, separator]",
432
+ "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."
433
433
  },
434
434
  "$match": {
435
- "args": "str, pattern [, limit]",
436
- "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`."
435
+ "args": "str, pattern [, limit]",
436
+ "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`."
437
437
  },
438
438
  "$replace": {
439
- "args": "str, pattern, replacement [, limit]",
440
- "desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
439
+ "args": "str, pattern, replacement [, limit]",
440
+ "desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
441
441
  },
442
442
  "$now": {
443
- "args":"",
444
- "desc":"Generates a timestamp in ISO 8601 compatible format and returns it as a string."
443
+ "args": "",
444
+ "desc": "Generates a timestamp in ISO 8601 compatible format and returns it as a string."
445
445
  },
446
446
  "$base64encode": {
447
- "args":"string",
448
- "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."
447
+ "args": "string",
448
+ "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."
449
449
  },
450
450
  "$base64decode": {
451
- "args":"string",
452
- "desc":"Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
451
+ "args": "string",
452
+ "desc": "Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
453
453
  },
454
454
  "$number": {
455
- "args": "arg",
456
- "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."
455
+ "args": "arg",
456
+ "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."
457
457
  },
458
458
  "$abs": {
459
- "args":"number",
460
- "desc":"Returns the absolute value of the `number` parameter."
459
+ "args": "number",
460
+ "desc": "Returns the absolute value of the `number` parameter."
461
461
  },
462
462
  "$floor": {
463
- "args":"number",
464
- "desc":"Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
463
+ "args": "number",
464
+ "desc": "Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
465
465
  },
466
466
  "$ceil": {
467
- "args":"number",
468
- "desc":"Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
467
+ "args": "number",
468
+ "desc": "Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
469
469
  },
470
470
  "$round": {
471
- "args":"number [, precision]",
472
- "desc":"Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
471
+ "args": "number [, precision]",
472
+ "desc": "Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
473
473
  },
474
474
  "$power": {
475
- "args":"base, exponent",
476
- "desc":"Returns the value of `base` raised to the power of `exponent`."
475
+ "args": "base, exponent",
476
+ "desc": "Returns the value of `base` raised to the power of `exponent`."
477
477
  },
478
478
  "$sqrt": {
479
- "args":"number",
480
- "desc":"Returns the square root of the value of the `number` parameter."
479
+ "args": "number",
480
+ "desc": "Returns the square root of the value of the `number` parameter."
481
481
  },
482
482
  "$random": {
483
- "args":"",
484
- "desc":"Returns a pseudo random number greater than or equal to zero and less than one."
483
+ "args": "",
484
+ "desc": "Returns a pseudo random number greater than or equal to zero and less than one."
485
485
  },
486
486
  "$millis": {
487
- "args":"",
488
- "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."
487
+ "args": "",
488
+ "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."
489
489
  },
490
490
  "$sum": {
491
- "args": "array",
492
- "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."
491
+ "args": "array",
492
+ "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."
493
493
  },
494
494
  "$max": {
495
- "args": "array",
496
- "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."
495
+ "args": "array",
496
+ "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."
497
497
  },
498
498
  "$min": {
499
- "args": "array",
500
- "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."
499
+ "args": "array",
500
+ "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."
501
501
  },
502
502
  "$average": {
503
- "args": "array",
504
- "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."
503
+ "args": "array",
504
+ "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."
505
505
  },
506
506
  "$boolean": {
507
- "args": "arg",
508
- "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`"
507
+ "args": "arg",
508
+ "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`"
509
509
  },
510
510
  "$not": {
511
- "args": "arg",
512
- "desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
511
+ "args": "arg",
512
+ "desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
513
513
  },
514
514
  "$exists": {
515
- "args": "arg",
516
- "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)."
515
+ "args": "arg",
516
+ "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)."
517
517
  },
518
518
  "$count": {
519
- "args": "array",
520
- "desc": "Returns the number of items in the array"
519
+ "args": "array",
520
+ "desc": "Returns the number of items in the array"
521
521
  },
522
522
  "$append": {
523
- "args": "array, array",
524
- "desc": "Appends two arrays"
523
+ "args": "array, array",
524
+ "desc": "Appends two arrays"
525
525
  },
526
526
  "$sort": {
527
- "args":"array [, function]",
528
- "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`."
527
+ "args": "array [, function]",
528
+ "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`."
529
529
  },
530
530
  "$reverse": {
531
- "args":"array",
532
- "desc":"Returns an array containing all the values from the `array` parameter, but in reverse order."
531
+ "args": "array",
532
+ "desc": "Returns an array containing all the values from the `array` parameter, but in reverse order."
533
533
  },
534
534
  "$shuffle": {
535
- "args":"array",
536
- "desc":"Returns an array containing all the values from the `array` parameter, but shuffled into random order."
535
+ "args": "array",
536
+ "desc": "Returns an array containing all the values from the `array` parameter, but shuffled into random order."
537
537
  },
538
538
  "$zip": {
539
- "args":"array, ...",
540
- "desc":"Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
539
+ "args": "array, ...",
540
+ "desc": "Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
541
541
  },
542
542
  "$keys": {
543
- "args": "object",
544
- "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."
543
+ "args": "object",
544
+ "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."
545
545
  },
546
546
  "$lookup": {
547
- "args": "object, key",
548
- "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."
547
+ "args": "object, key",
548
+ "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."
549
549
  },
550
550
  "$spread": {
551
- "args": "object",
552
- "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."
551
+ "args": "object",
552
+ "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."
553
553
  },
554
554
  "$merge": {
555
- "args": "array&lt;object&gt;",
556
- "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."
555
+ "args": "array&lt;object&gt;",
556
+ "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."
557
557
  },
558
558
  "$sift": {
559
- "args":"object, function",
560
- "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]])`"
559
+ "args": "object, function",
560
+ "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]])`"
561
561
  },
562
562
  "$each": {
563
- "args":"object, function",
564
- "desc":"Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
563
+ "args": "object, function",
564
+ "desc": "Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
565
565
  },
566
566
  "$map": {
567
- "args":"array, function",
568
- "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]])`"
567
+ "args": "array, function",
568
+ "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]])`"
569
569
  },
570
570
  "$filter": {
571
- "args":"array, function",
572
- "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]])`"
571
+ "args": "array, function",
572
+ "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]])`"
573
573
  },
574
574
  "$reduce": {
575
- "args":"array, function [, init]",
576
- "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."
575
+ "args": "array, function [, init]",
576
+ "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."
577
577
  },
578
578
  "$flowContext": {
579
- "args": "string[, string]",
580
- "desc": "Retrieves a flow context property.\n\nThis is a kumologica-core defined function."
579
+ "args": "string[, string]",
580
+ "desc": "Retrieves a flow context property.\n\nThis is a kumologica-core defined function."
581
581
  },
582
582
  "$globalContext": {
583
- "args": "string[, string]",
584
- "desc": "Retrieves a global context property.\n\nThis is a kumologica-core defined function."
583
+ "args": "string[, string]",
584
+ "desc": "Retrieves a global context property.\n\nThis is a kumologica-core defined function."
585
585
  },
586
586
  "$pad": {
587
- "args": "string, width [, char]",
588
- "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."
587
+ "args": "string, width [, char]",
588
+ "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."
589
589
  },
590
590
  "$fromMillis": {
591
- "args": "number",
592
- "desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format."
591
+ "args": "number",
592
+ "desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format."
593
593
  },
594
594
  "$formatNumber": {
595
- "args": "number, picture [, options]",
596
- "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."
595
+ "args": "number, picture [, options]",
596
+ "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."
597
597
  },
598
598
  "$formatBase": {
599
- "args": "number [, radix]",
600
- "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."
599
+ "args": "number [, radix]",
600
+ "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."
601
601
  },
602
602
  "$toMillis": {
603
- "args": "timestamp",
604
- "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."
603
+ "args": "timestamp",
604
+ "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."
605
605
  },
606
606
  "$env": {
607
- "args": "arg",
608
- "desc": "Returns the value of an environment variable.\n\nThis is a kumologica-core defined function."
607
+ "args": "arg",
608
+ "desc": "Returns the value of an environment variable.\n\nThis is a kumologica-core defined function."
609
609
  },
610
610
  "$eval": {
611
- "args": "expr [, context]",
612
- "desc": "Parses and evaluates the string `expr` which contains literal JSON or a JSONata expression using the current context as the context for evaluation."
611
+ "args": "expr [, context]",
612
+ "desc": "Parses and evaluates the string `expr` which contains literal JSON or a JSONata expression using the current context as the context for evaluation."
613
613
  },
614
614
  "$formatInteger": {
615
- "args": "number, picture",
616
- "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."
615
+ "args": "number, picture",
616
+ "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."
617
617
  },
618
618
  "$parseInteger": {
619
- "args": "string, picture",
620
- "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`."
619
+ "args": "string, picture",
620
+ "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`."
621
621
 
622
622
  },
623
623
  "$single": {
624
- "args": "array, function",
625
- "desc": "Returns the one and only one value in the array parameter that satisfy the function predicate"
624
+ "args": "array, function",
625
+ "desc": "Returns the one and only one value in the array parameter that satisfy the function predicate"
626
+ },
627
+ "$maskjson": {
628
+ "args": "object, object",
629
+ "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"
630
+ },
631
+ "$maskphone": {
632
+ "args": "string, object",
633
+ "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"
634
+ },
635
+ "$maskemail": {
636
+ "args": "string, object",
637
+ "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"
638
+ },
639
+ "$maskcard": {
640
+ "args": "string, object",
641
+ "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"
642
+ },
643
+ "$maskpassword": {
644
+ "args": "string, object",
645
+ "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"
646
+ },
647
+ "$queryparam": {
648
+ "args": "string",
649
+ "desc": "Returns the value for the given query parameter key"
650
+ },
651
+ "$uriparam": {
652
+ "args": "string",
653
+ "desc": "Returns the value for the given path parameter key"
626
654
  }
627
655
  }