@kumologica/sdk 3.2.0-beta2 → 3.2.0-beta21

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.
@@ -22006,6 +22006,7 @@ RED.view.tools = (function() {
22006
22006
  <span class="option-disabled">Generate script...</span>
22007
22007
  <span id="exportCloudFormationBtn" class="option">AWS CloudFormation</span>
22008
22008
  <span id="exportServerlessBtn" class="option">Serverless</span>
22009
+ <span id="exportGithubActionBtn" class="option">Github Action Workflow</span>
22009
22010
  </div>
22010
22011
  </div>
22011
22012
  </div>
@@ -22069,6 +22070,12 @@ RED.view.tools = (function() {
22069
22070
  });
22070
22071
  //tagsSection.expand();
22071
22072
 
22073
+ // vpc section
22074
+ vpcSection = sections.add({
22075
+ title: 'vpc',
22076
+ collapsible: true,
22077
+ });
22078
+
22072
22079
  // event section
22073
22080
  eventSection = sections.add({
22074
22081
  title: 'Triggers',
@@ -22091,7 +22098,7 @@ RED.view.tools = (function() {
22091
22098
 
22092
22099
  // Function content init
22093
22100
  let functionSectionHtml = `
22094
- <table class="node-info">
22101
+ <table class="node-info">
22095
22102
  <tr class="node-info-node-row">
22096
22103
  <td>Name</td>
22097
22104
  <td colspan="2" style="background: white"><input style="width:100%" id="cloud-fn-name" class="palette-textinput" pattern="[a-zA-Z0-9-_]{1,64}" type="text"></td>
@@ -22126,7 +22133,10 @@ RED.view.tools = (function() {
22126
22133
  </tr>
22127
22134
  <tr class="node-info-node-row">
22128
22135
  <td>Custom Role</td>
22129
- <td colspan="2" style="background: white; overflow-x:hidden"><input id="cloud-fn-role" list="iamroles-cloud-fn-role-dataList" style="width:100%" class="palette-textinput" placeHolder="optional" type="string"><datalist id="iamroles-cloud-fn-role-dataList"></datalist></td>
22136
+ <td colspan="2" style="background: white; overflow-x:hidden">
22137
+ <input id="cloud-fn-role" list="iamroles-cloud-fn-role-dataList" style="width:100%" class="palette-textinput" placeHolder="optional" type="string">
22138
+ <datalist id="iamroles-cloud-fn-role-dataList"></datalist>
22139
+ </td>
22130
22140
  </tr>
22131
22141
  </table>
22132
22142
  `;
@@ -22171,6 +22181,28 @@ RED.view.tools = (function() {
22171
22181
  $(tagsSectionHtml).appendTo(tagsSection.content);
22172
22182
  tagsSection.container.show();
22173
22183
 
22184
+ // VPC section init
22185
+ let vpcSectionHtml = `
22186
+ <table class="node-info">
22187
+ <tbody>
22188
+ <tr class="node-info-node-row">
22189
+ <td>Security Group Ids</td>
22190
+ <td colspan="2" style="background: white; overflow-x:hidden">
22191
+ <input id="cloud-fn-vpc-security-group" style="width:100%" class="palette-textinput" placeHolder="sg-11111, sg-22222" type="string">
22192
+ </td>
22193
+ </tr>
22194
+ <tr class="node-info-node-row">
22195
+ <td>Subnet Ids</td>
22196
+ <td colspan="2" style="background: white; overflow-x:hidden">
22197
+ <input id="cloud-fn-vpc-subnet" style="width:100%" class="palette-textinput" placeHolder="subnet-111, subnet-222" type="string">
22198
+ </td>
22199
+ </tr>
22200
+ </tbody>
22201
+ </table>
22202
+ `;
22203
+ $(vpcSectionHtml).appendTo(vpcSection.content);
22204
+ vpcSection.container.show();
22205
+
22174
22206
  // Event section init
22175
22207
  $(`
22176
22208
  <div style="display:flex; flex-direction: column; justify-content: flex-start;">
@@ -22180,11 +22212,12 @@ RED.view.tools = (function() {
22180
22212
  <option value="kinesis">Amazon Kinesis</option>
22181
22213
  <option value="sqs">Amazon SQS</option>
22182
22214
  <option disabled>────────────────────</option>
22183
- <option value="alb">Application Load Balancer</option>
22215
+ <!--option value="alb">Application Load Balancer</option-->
22184
22216
  <!--option value="cognito">Amazon Cognito Sync Trigger</option-->
22185
22217
  <!--option value="lex">Amazon Lex</option-->
22186
- <option value="alexa">Amazon Alexa</option>
22218
+ <!--option value="alexa">Amazon Alexa</option-->
22187
22219
  <option selected value="api">Amazon API Gateway</option>
22220
+ <option selected value="websocket">Amazon WebSocket API</option>
22188
22221
  <!--option value="cf">Amazon CloudFront (Lambda@Edge)</option-->
22189
22222
  <!--option value="firehose">Amazon Kinesis Data Firehose</option-->
22190
22223
  <option disabled>────────────────────</option>
@@ -22196,7 +22229,7 @@ RED.view.tools = (function() {
22196
22229
  <option value="cwevents">Amazon CloudWatch Events</option>
22197
22230
  <!--option value="codecommit">Amazon CodeCommit</option-->
22198
22231
  <!--option value="config">Amazon Config</option-->
22199
- <option value="iot">Amazon IoT Events</option>
22232
+ <!--option value="iot">Amazon IoT Events</option-->
22200
22233
  </select>
22201
22234
 
22202
22235
  <a id="add-event" href="#" style="float: right; margin: 0px 0px 0px 5px !important; height: 21px !important;" class="editor-button editor-button-small">
@@ -22285,6 +22318,12 @@ RED.view.tools = (function() {
22285
22318
  if (params.timeout) {
22286
22319
  $('#cloud-fn-timeout').val(params.timeout);
22287
22320
  }
22321
+ if (params.vpcConfig && params.vpcConfig.sg) {
22322
+ $('#cloud-fn-vpc-security-group').val(params.vpcConfig.sg);
22323
+ }
22324
+ if (params.vpcConfig && params.vpcConfig.sn) {
22325
+ $('#cloud-fn-vpc-subnet').val(params.vpcConfig.sn);
22326
+ }
22288
22327
  if (params.reservedConcurrency) {
22289
22328
  $('#cloud-fn-reservedConcurrency').val(params.reservedConcurrency);
22290
22329
  }
@@ -22342,7 +22381,11 @@ RED.view.tools = (function() {
22342
22381
  let fnXray = $('#cloud-fn-x-ray').prop('checked');
22343
22382
  let fnProfile = getProfile();
22344
22383
  let fnRole = $('#cloud-fn-role').val();
22345
-
22384
+ let fnVpcConfig = {
22385
+ sg: $('#cloud-fn-vpc-security-group').val(),
22386
+ sn: $('#cloud-fn-vpc-subnet').val()
22387
+ };
22388
+
22346
22389
  // Environment variables
22347
22390
  let environment = [];
22348
22391
  let envvarRows = $('#cloud-fn-env-table tr');
@@ -22394,7 +22437,7 @@ RED.view.tools = (function() {
22394
22437
  events.push(event);
22395
22438
  });
22396
22439
 
22397
- return {
22440
+ const res = {
22398
22441
  functionName: fnName,
22399
22442
  description: fnDescription,
22400
22443
  memory: fnMemory,
@@ -22406,7 +22449,10 @@ RED.view.tools = (function() {
22406
22449
  environment: environment,
22407
22450
  tags: tags,
22408
22451
  events: events,
22452
+ vpcConfig: fnVpcConfig
22409
22453
  };
22454
+
22455
+ return res;
22410
22456
  }
22411
22457
 
22412
22458
  async function attachDataList(serviceType, itemId, dataListId) {
@@ -22422,7 +22468,7 @@ RED.view.tools = (function() {
22422
22468
 
22423
22469
  if (serviceType == 'api') {
22424
22470
  $(`#${dataListId}`).append(
22425
- $('<option>').attr('value', 'Create new API').text('Create new API')
22471
+ $('<option>').attr('value', 'create new').text('Create new API')
22426
22472
  );
22427
22473
  }
22428
22474
 
@@ -22453,7 +22499,7 @@ RED.view.tools = (function() {
22453
22499
 
22454
22500
  if (serviceType == 'api') {
22455
22501
  $(`#${dataListId}`).append(
22456
- $('<option>').attr('value', 'Create new API').text('Create new API')
22502
+ $('<option>').attr('value', 'create new').text('Create new API')
22457
22503
  );
22458
22504
  }
22459
22505
 
@@ -22678,8 +22724,7 @@ RED.view.tools = (function() {
22678
22724
  $('#cloud-fn-memory').val('512');
22679
22725
  $('#cloud-fn-timeout').val('20');
22680
22726
 
22681
- $('#cloud-fn-timeout, #cloud-fn-memory, #cloud-fn-description, #cloud-fn-name, #cloud-fn-reservedConcurrency, #cloud-fn-x-ray, #cloud-fn-role'
22682
- ).change(function () {
22727
+ $('#cloud-fn-timeout, #cloud-fn-memory, #cloud-fn-description, #cloud-fn-name, #cloud-fn-reservedConcurrency, #cloud-fn-x-ray, #cloud-fn-role, #cloud-fn-vpc-subnet, #cloud-fn-security-group').change(function () {
22683
22728
  saveSettings();
22684
22729
  });
22685
22730
 
@@ -22848,6 +22893,14 @@ RED.view.tools = (function() {
22848
22893
  exportScript(window.__kumologica.cloud.provider.serverless);
22849
22894
  });
22850
22895
 
22896
+ // Export serverless script
22897
+ $('#exportGithubActionBtn').click((e) => {
22898
+ e.preventDefault();
22899
+ hideMenu();
22900
+ exportScript(window.__kumologica.cloud.provider.github);
22901
+ });
22902
+
22903
+
22851
22904
  $('#cloud-options-dropdown').click((e) => {
22852
22905
  e.stopPropagation();
22853
22906
 
@@ -23195,23 +23248,36 @@ RED.view.tools = (function() {
23195
23248
  function: 'attachDataList',
23196
23249
  },
23197
23250
  ];
23198
- parameterSets['cognito'] = [
23199
- { label: 'Identity Pool ARN', key: 'identityPool', value: '' },
23200
- ];
23201
- parameterSets['iot'] = [
23251
+ //parameterSets['cognito'] = [
23252
+ // { label: 'Identity Pool ARN', key: 'identityPool', value: '' },
23253
+ //];
23254
+ //parameterSets['iot'] = [
23255
+ // {
23256
+ // label: 'Rule Name',
23257
+ // key: 'rule',
23258
+ // value: '',
23259
+ // required: true,
23260
+ // function: 'attachDataList',
23261
+ // },
23262
+ // { label: 'Query', key: 'query', value: '', required: true },
23263
+ //];
23264
+ parameterSets['api'] = [
23202
23265
  {
23203
- label: 'Rule Name',
23204
- key: 'rule',
23266
+ label: 'API',
23267
+ key: 'api',
23205
23268
  value: '',
23206
23269
  required: true,
23207
23270
  function: 'attachDataList',
23208
23271
  },
23209
- { label: 'Query', key: 'query', value: '', required: true },
23272
+ { label: 'Deployment Stage', key: 'stage', value: '', required: true },
23273
+ { label: 'Parent Id', key: 'parentId', value: '', required: false },
23274
+ { label: 'Resource', key: 'resource', value: '', required: false },
23275
+ { label: 'Authorizer Id', key: 'authorizerId', value: '', required: false }
23210
23276
  ];
23211
- parameterSets['api'] = [
23277
+ parameterSets['websocket'] = [
23212
23278
  {
23213
- label: 'API',
23214
- key: 'api',
23279
+ label: 'ApiId',
23280
+ key: 'apiId',
23215
23281
  value: '',
23216
23282
  required: true,
23217
23283
  function: 'attachDataList',
@@ -23232,23 +23298,23 @@ RED.view.tools = (function() {
23232
23298
  ];
23233
23299
  parameterSets['sqs'] = [
23234
23300
  {
23235
- label: 'Queue URL',
23236
- key: 'stream',
23301
+ label: 'Queue Arn',
23302
+ key: 'queueArn',
23237
23303
  value: '',
23238
23304
  required: true,
23239
23305
  function: 'attachDataList',
23240
23306
  },
23241
23307
  { label: 'Batch Size', key: 'batchSize', value: '', min: 1, max: 10 },
23242
23308
  ];
23243
- parameterSets['alexa'] = [
23244
- {
23245
- label: 'Skill ID',
23246
- key: 'skillID',
23247
- value: '',
23248
- required: true,
23249
- function: 'attachDataList',
23250
- },
23251
- ];
23309
+ //parameterSets['alexa'] = [
23310
+ // {
23311
+ // label: 'Skill ID',
23312
+ // key: 'skillID',
23313
+ // value: '',
23314
+ // required: true,
23315
+ // function: 'attachDataList',
23316
+ // },
23317
+ //];
23252
23318
  parameterSets['kinesis'] = [
23253
23319
  { label: 'Stream ARN', key: 'stream', value: '', required: true },
23254
23320
  { label: 'Batch Size', key: 'batchSize', value: '', min: 1, max: 10000 },
@@ -23265,48 +23331,52 @@ RED.view.tools = (function() {
23265
23331
  },
23266
23332
  ];
23267
23333
  parameterSets['cwevents'] = [
23268
- {
23269
- label: 'Rule ARN',
23270
- key: 'rule',
23271
- value: '',
23272
- required: true,
23273
- function: 'attachDataList',
23274
- },
23275
- ];
23276
- parameterSets['cwlogs'] = [
23277
- {
23278
- label: 'Log Group',
23279
- key: 'logGroup',
23280
- value: '',
23281
- required: true,
23282
- function: 'attachDataList',
23283
- },
23284
- { label: 'Filter Name', key: 'filterName', value: '' },
23285
- { label: 'Filter Pattern', key: 'filterPattern', value: '' },
23286
- ];
23287
- parameterSets['codecommit'] = [
23288
- {
23289
- label: 'Repository Name',
23290
- key: 'repository',
23291
- value: '',
23292
- required: true,
23293
- function: 'attachDataList',
23294
- },
23295
- { label: 'Trigger Name', key: 'trigger', value: '', required: true },
23296
- {
23297
- label: 'Events',
23298
- key: 'events',
23334
+ { label: 'Expression', key: 'expression', value: 'cron()', required: true },
23335
+ { label: 'Reference', key: 'reference', value: '' },
23336
+ { label: 'Name', key: 'name', value: ''},
23337
+ { label: 'State',
23338
+ key: 'state',
23299
23339
  value: '',
23300
23340
  list: [
23301
- { k: 'all', v: 'all' },
23302
- { k: 'updateReference', v: 'updateReference' },
23303
- { k: 'createReference', v: 'createReference' },
23304
- { k: 'deleteReference', v: 'deleteReference' },
23341
+ { k: 'ENABLED', v: 'ENABLED' },
23342
+ { k: 'DISABLED', v: 'DISABLED' }
23305
23343
  ],
23306
23344
  },
23307
- { label: 'Branch Names', key: 'branchNames', value: '' },
23308
- { label: 'Custom Data', key: 'customData', value: '' },
23309
23345
  ];
23346
+ //parameterSets['cwlogs'] = [
23347
+ // {
23348
+ // label: 'Log Group',
23349
+ // key: 'logGroup',
23350
+ // value: '',
23351
+ // required: true,
23352
+ // function: 'attachDataList',
23353
+ // },
23354
+ // { label: 'Filter Name', key: 'filterName', value: '' },
23355
+ // { label: 'Filter Pattern', key: 'filterPattern', value: '' },
23356
+ //];
23357
+ //parameterSets['codecommit'] = [
23358
+ // {
23359
+ // label: 'Repository Name',
23360
+ // key: 'repository',
23361
+ // value: '',
23362
+ // required: true,
23363
+ // function: 'attachDataList',
23364
+ // },
23365
+ // { label: 'Trigger Name', key: 'trigger', value: '', required: true },
23366
+ // {
23367
+ // label: 'Events',
23368
+ // key: 'events',
23369
+ // value: '',
23370
+ // list: [
23371
+ // { k: 'all', v: 'all' },
23372
+ // { k: 'updateReference', v: 'updateReference' },
23373
+ // { k: 'createReference', v: 'createReference' },
23374
+ // { k: 'deleteReference', v: 'deleteReference' },
23375
+ // ],
23376
+ // },
23377
+ // { label: 'Branch Names', key: 'branchNames', value: '' },
23378
+ // { label: 'Custom Data', key: 'customData', value: '' },
23379
+ //];
23310
23380
 
23311
23381
  return {
23312
23382
  init: init,
@@ -32485,7 +32555,7 @@ RED.editor = (function () {
32485
32555
  RED.editor.registerTypeEditor("_buffer", definition);
32486
32556
 
32487
32557
  })();
32488
- ;(function() {
32558
+ ;(function () {
32489
32559
  var template =
32490
32560
  '<script type="text/x-kumologica" data-template-name="_expression">' +
32491
32561
  '<div id="node-input-expression-panels">' +
@@ -32518,7 +32588,7 @@ RED.editor = (function () {
32518
32588
  var expressionTestCache = {};
32519
32589
 
32520
32590
  var definition = {
32521
- show: function(options) {
32591
+ show: function (options) {
32522
32592
  var expressionTestCacheId = options.parent || '_';
32523
32593
  var value = options.value;
32524
32594
  var onComplete = options.complete;
@@ -32536,7 +32606,7 @@ RED.editor = (function () {
32536
32606
  {
32537
32607
  id: 'node-dialog-cancel',
32538
32608
  text: 'Cancel',
32539
- click: function() {
32609
+ click: function () {
32540
32610
  RED.tray.close();
32541
32611
  }
32542
32612
  },
@@ -32544,21 +32614,21 @@ RED.editor = (function () {
32544
32614
  id: 'node-dialog-ok',
32545
32615
  text: 'Done',
32546
32616
  class: 'primary',
32547
- click: function() {
32617
+ click: function () {
32548
32618
  $('#node-input-expression-help').text('');
32549
- RED.tray.close(undefined, ()=> {
32619
+ RED.tray.close(undefined, () => {
32550
32620
  onComplete(expressionEditor.getValue());
32551
32621
  });
32552
32622
  }
32553
32623
  }
32554
32624
  ],
32555
- resize: function(dimensions) {
32625
+ resize: function (dimensions) {
32556
32626
  var height = $('#dialog-form').height();
32557
32627
  if (panels) {
32558
32628
  panels.resize(height);
32559
32629
  }
32560
32630
  },
32561
- open: function(tray) {
32631
+ open: function (tray) {
32562
32632
  var trayBody = tray.find('.editor-tray-body');
32563
32633
  trayBody.addClass('node-input-expression-editor');
32564
32634
  var dialogForm = RED.editor.buildEditForm(
@@ -32568,14 +32638,14 @@ RED.editor = (function () {
32568
32638
  'editor'
32569
32639
  );
32570
32640
  var funcSelect = $('#node-input-expression-func');
32571
- Object.keys(jsonata.functions).forEach(function(f) {
32641
+ Object.keys(jsonata.functions).forEach(function (f) {
32572
32642
  funcSelect.append(
32573
32643
  $('<option></option>')
32574
32644
  .val(f)
32575
32645
  .text(f)
32576
32646
  );
32577
32647
  });
32578
- funcSelect.change(function(e) {
32648
+ funcSelect.change(function (e) {
32579
32649
  var f = $(this).val();
32580
32650
  var args = RED._('jsonata:' + f + '.args', { defaultValue: '' });
32581
32651
  var title = '<h5>' + f + '(' + args + ')</h5>';
@@ -32600,7 +32670,7 @@ RED.editor = (function () {
32600
32670
  var currentFunctionMarker = null;
32601
32671
 
32602
32672
  expressionEditor.getSession().setValue(value || '', -1);
32603
- expressionEditor.on('changeSelection', function() {
32673
+ expressionEditor.on('changeSelection', function () {
32604
32674
  var c = expressionEditor.getCursorPosition();
32605
32675
  var token = expressionEditor
32606
32676
  .getSession()
@@ -32675,7 +32745,7 @@ RED.editor = (function () {
32675
32745
  });
32676
32746
 
32677
32747
  dialogForm.i18n();
32678
- $('#node-input-expression-func-insert').click(function(e) {
32748
+ $('#node-input-expression-func-insert').click(function (e) {
32679
32749
  e.preventDefault();
32680
32750
  var pos = expressionEditor.getCursorPosition();
32681
32751
  var f = funcSelect.val();
@@ -32683,7 +32753,7 @@ RED.editor = (function () {
32683
32753
  expressionEditor.insertSnippet(snippet);
32684
32754
  expressionEditor.focus();
32685
32755
  });
32686
- $('#node-input-expression-reformat').click(function(evt) {
32756
+ $('#node-input-expression-reformat').click(function (evt) {
32687
32757
  evt.preventDefault();
32688
32758
  var v = expressionEditor.getValue() || '';
32689
32759
  try {
@@ -32696,7 +32766,7 @@ RED.editor = (function () {
32696
32766
 
32697
32767
  var tabs = RED.tabs.create({
32698
32768
  element: $('#node-input-expression-tabs'),
32699
- onchange: function(tab) {
32769
+ onchange: function (tab) {
32700
32770
  $('.node-input-expression-tab-content').hide();
32701
32771
  tab.content.show();
32702
32772
  trayOptions.resize();
@@ -32722,12 +32792,12 @@ RED.editor = (function () {
32722
32792
  lineNumbers: false
32723
32793
  });
32724
32794
  var changeTimer;
32725
- $('.node-input-expression-legacy').click(function(e) {
32795
+ $('.node-input-expression-legacy').click(function (e) {
32726
32796
  e.preventDefault();
32727
32797
  RED.sidebar.info.set(RED._('expressionEditor.compatModeDesc'));
32728
32798
  RED.sidebar.info.show();
32729
32799
  });
32730
- var testExpression = function() {
32800
+ var testExpression = function () {
32731
32801
  var value = testDataEditor.getValue();
32732
32802
  var parsedData;
32733
32803
  var currentExpression = expressionEditor.getValue();
@@ -32739,11 +32809,11 @@ RED.editor = (function () {
32739
32809
  $('.node-input-expression-legacy').toggle(legacyMode);
32740
32810
  try {
32741
32811
  expr = jsonata(currentExpression);
32742
- expr.assign('flowContext', function(val) {
32812
+ expr.assign('flowContext', function (val) {
32743
32813
  usesContext = true;
32744
32814
  return null;
32745
32815
  });
32746
- expr.assign('globalContext', function(val) {
32816
+ expr.assign('globalContext', function (val) {
32747
32817
  usesContext = true;
32748
32818
  return null;
32749
32819
  });
@@ -32794,14 +32864,14 @@ RED.editor = (function () {
32794
32864
  }
32795
32865
  };
32796
32866
 
32797
- testDataEditor.getSession().on('change', function() {
32867
+ testDataEditor.getSession().on('change', function () {
32798
32868
  clearTimeout(changeTimer);
32799
32869
  changeTimer = setTimeout(testExpression, 200);
32800
32870
  expressionTestCache[
32801
32871
  expressionTestCacheId
32802
32872
  ] = testDataEditor.getValue();
32803
32873
  });
32804
- expressionEditor.getSession().on('change', function() {
32874
+ expressionEditor.getSession().on('change', function () {
32805
32875
  clearTimeout(changeTimer);
32806
32876
  changeTimer = setTimeout(testExpression, 200);
32807
32877
  });
@@ -32815,7 +32885,7 @@ RED.editor = (function () {
32815
32885
  });
32816
32886
  panels = RED.panels.create({
32817
32887
  id: 'node-input-expression-panels',
32818
- resize: function(p1Height, p2Height) {
32888
+ resize: function (p1Height, p2Height) {
32819
32889
  var p1 = $('#node-input-expression-panel-expr');
32820
32890
  p1Height -= $(p1.children()[0]).outerHeight(true);
32821
32891
  var editorRow = $(p1.children()[1]);
@@ -32843,7 +32913,7 @@ RED.editor = (function () {
32843
32913
  }
32844
32914
  });
32845
32915
 
32846
- $('#node-input-example-reformat').click(function(evt) {
32916
+ $('#node-input-example-reformat').click(function (evt) {
32847
32917
  evt.preventDefault();
32848
32918
  var v = testDataEditor.getValue() || '';
32849
32919
  try {
@@ -32856,14 +32926,14 @@ RED.editor = (function () {
32856
32926
 
32857
32927
  testExpression();
32858
32928
  },
32859
- close: function() {
32929
+ close: function () {
32860
32930
  if (options.onclose) {
32861
32931
  options.onclose();
32862
32932
  }
32863
32933
  expressionEditor.destroy();
32864
32934
  testDataEditor.destroy();
32865
32935
  },
32866
- show: function() {}
32936
+ show: function () { }
32867
32937
  };
32868
32938
  RED.tray.show(trayOptions);
32869
32939
  }
@@ -32875,241 +32945,269 @@ RED.editor = (function () {
32875
32945
  const jsonataFns =
32876
32946
  {
32877
32947
  "$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"
32948
+ "args": "arg",
32949
+ "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
32950
  },
32881
32951
  "$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."
32952
+ "args": "str",
32953
+ "desc": "Returns the number of characters in the string `str`. An error is thrown if `str` is not a string."
32884
32954
  },
32885
32955
  "$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`."
32956
+ "args": "str, start[, length]",
32957
+ "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
32958
  },
32889
32959
  "$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`."
32960
+ "args": "str, chars",
32961
+ "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
32962
  },
32893
32963
  "$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`."
32964
+ "args": "str, chars",
32965
+ "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
32966
  },
32897
32967
  "$uppercase": {
32898
- "args": "str",
32899
- "desc": "Returns a string with all the characters of `str` converted to uppercase."
32968
+ "args": "str",
32969
+ "desc": "Returns a string with all the characters of `str` converted to uppercase."
32900
32970
  },
32901
32971
  "$lowercase": {
32902
- "args": "str",
32903
- "desc": "Returns a string with all the characters of `str` converted to lowercase."
32972
+ "args": "str",
32973
+ "desc": "Returns a string with all the characters of `str` converted to lowercase."
32904
32974
  },
32905
32975
  "$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."
32976
+ "args": "str",
32977
+ "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
32978
  },
32909
32979
  "$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."
32980
+ "args": "str, pattern",
32981
+ "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
32982
  },
32913
32983
  "$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."
32984
+ "args": "str[, separator][, limit]",
32985
+ "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
32986
  },
32917
32987
  "$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."
32988
+ "args": "array[, separator]",
32989
+ "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
32990
  },
32921
32991
  "$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`."
32992
+ "args": "str, pattern [, limit]",
32993
+ "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
32994
  },
32925
32995
  "$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."
32996
+ "args": "str, pattern, replacement [, limit]",
32997
+ "desc": "Finds occurrences of `pattern` within `str` and replaces them with `replacement`.\n\nThe optional `limit` parameter is the maximum number of replacements."
32928
32998
  },
32929
32999
  "$now": {
32930
- "args":"",
32931
- "desc":"Generates a timestamp in ISO 8601 compatible format and returns it as a string."
33000
+ "args": "",
33001
+ "desc": "Generates a timestamp in ISO 8601 compatible format and returns it as a string."
32932
33002
  },
32933
33003
  "$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."
33004
+ "args": "string",
33005
+ "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
33006
  },
32937
33007
  "$base64decode": {
32938
- "args":"string",
32939
- "desc":"Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
33008
+ "args": "string",
33009
+ "desc": "Converts base 64 encoded bytes to a string, using a UTF-8 Unicode codepage."
32940
33010
  },
32941
33011
  "$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."
33012
+ "args": "arg",
33013
+ "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
33014
  },
32945
33015
  "$abs": {
32946
- "args":"number",
32947
- "desc":"Returns the absolute value of the `number` parameter."
33016
+ "args": "number",
33017
+ "desc": "Returns the absolute value of the `number` parameter."
32948
33018
  },
32949
33019
  "$floor": {
32950
- "args":"number",
32951
- "desc":"Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
33020
+ "args": "number",
33021
+ "desc": "Returns the value of `number` rounded down to the nearest integer that is smaller or equal to `number`."
32952
33022
  },
32953
33023
  "$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`."
33024
+ "args": "number",
33025
+ "desc": "Returns the value of `number` rounded up to the nearest integer that is greater than or equal to `number`."
32956
33026
  },
32957
33027
  "$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."
33028
+ "args": "number [, precision]",
33029
+ "desc": "Returns the value of the `number` parameter rounded to the number of decimal places specified by the optional `precision` parameter."
32960
33030
  },
32961
33031
  "$power": {
32962
- "args":"base, exponent",
32963
- "desc":"Returns the value of `base` raised to the power of `exponent`."
33032
+ "args": "base, exponent",
33033
+ "desc": "Returns the value of `base` raised to the power of `exponent`."
32964
33034
  },
32965
33035
  "$sqrt": {
32966
- "args":"number",
32967
- "desc":"Returns the square root of the value of the `number` parameter."
33036
+ "args": "number",
33037
+ "desc": "Returns the square root of the value of the `number` parameter."
32968
33038
  },
32969
33039
  "$random": {
32970
- "args":"",
32971
- "desc":"Returns a pseudo random number greater than or equal to zero and less than one."
33040
+ "args": "",
33041
+ "desc": "Returns a pseudo random number greater than or equal to zero and less than one."
32972
33042
  },
32973
33043
  "$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."
33044
+ "args": "",
33045
+ "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
33046
  },
32977
33047
  "$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."
33048
+ "args": "array",
33049
+ "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
33050
  },
32981
33051
  "$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."
33052
+ "args": "array",
33053
+ "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
33054
  },
32985
33055
  "$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."
33056
+ "args": "array",
33057
+ "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
33058
  },
32989
33059
  "$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."
33060
+ "args": "array",
33061
+ "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
33062
  },
32993
33063
  "$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`"
33064
+ "args": "arg",
33065
+ "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
33066
  },
32997
33067
  "$not": {
32998
- "args": "arg",
32999
- "desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
33068
+ "args": "arg",
33069
+ "desc": "Returns Boolean NOT on the argument. `arg` is first cast to a boolean"
33000
33070
  },
33001
33071
  "$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)."
33072
+ "args": "arg",
33073
+ "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
33074
  },
33005
33075
  "$count": {
33006
- "args": "array",
33007
- "desc": "Returns the number of items in the array"
33076
+ "args": "array",
33077
+ "desc": "Returns the number of items in the array"
33008
33078
  },
33009
33079
  "$append": {
33010
- "args": "array, array",
33011
- "desc": "Appends two arrays"
33080
+ "args": "array, array",
33081
+ "desc": "Appends two arrays"
33012
33082
  },
33013
33083
  "$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`."
33084
+ "args": "array [, function]",
33085
+ "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
33086
  },
33017
33087
  "$reverse": {
33018
- "args":"array",
33019
- "desc":"Returns an array containing all the values from the `array` parameter, but in reverse order."
33088
+ "args": "array",
33089
+ "desc": "Returns an array containing all the values from the `array` parameter, but in reverse order."
33020
33090
  },
33021
33091
  "$shuffle": {
33022
- "args":"array",
33023
- "desc":"Returns an array containing all the values from the `array` parameter, but shuffled into random order."
33092
+ "args": "array",
33093
+ "desc": "Returns an array containing all the values from the `array` parameter, but shuffled into random order."
33024
33094
  },
33025
33095
  "$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...."
33096
+ "args": "array, ...",
33097
+ "desc": "Returns a convolved (zipped) array containing grouped arrays of values from the `array1` … `arrayN` arguments from index 0, 1, 2...."
33028
33098
  },
33029
33099
  "$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."
33100
+ "args": "object",
33101
+ "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
33102
  },
33033
33103
  "$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."
33104
+ "args": "object, key",
33105
+ "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
33106
  },
33037
33107
  "$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."
33108
+ "args": "object",
33109
+ "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
33110
  },
33041
33111
  "$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."
33112
+ "args": "array&lt;object&gt;",
33113
+ "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
33114
  },
33045
33115
  "$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]])`"
33116
+ "args": "object, function",
33117
+ "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
33118
  },
33049
33119
  "$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`."
33120
+ "args": "object, function",
33121
+ "desc": "Returns an array containing the values return by the `function` when applied to each key/value pair in the `object`."
33052
33122
  },
33053
33123
  "$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]])`"
33124
+ "args": "array, function",
33125
+ "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
33126
  },
33057
33127
  "$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]])`"
33128
+ "args": "array, function",
33129
+ "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
33130
  },
33061
33131
  "$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."
33132
+ "args": "array, function [, init]",
33133
+ "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
33134
  },
33065
33135
  "$flowContext": {
33066
- "args": "string[, string]",
33067
- "desc": "Retrieves a flow context property.\n\nThis is a kumologica-core defined function."
33136
+ "args": "string[, string]",
33137
+ "desc": "Retrieves a flow context property.\n\nThis is a kumologica-core defined function."
33068
33138
  },
33069
33139
  "$globalContext": {
33070
- "args": "string[, string]",
33071
- "desc": "Retrieves a global context property.\n\nThis is a kumologica-core defined function."
33140
+ "args": "string[, string]",
33141
+ "desc": "Retrieves a global context property.\n\nThis is a kumologica-core defined function."
33072
33142
  },
33073
33143
  "$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."
33144
+ "args": "string, width [, char]",
33145
+ "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
33146
  },
33077
33147
  "$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."
33148
+ "args": "number",
33149
+ "desc": "Convert a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC) to a timestamp string in the ISO 8601 format."
33080
33150
  },
33081
33151
  "$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."
33152
+ "args": "number, picture [, options]",
33153
+ "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
33154
  },
33085
33155
  "$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."
33156
+ "args": "number [, radix]",
33157
+ "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
33158
  },
33089
33159
  "$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."
33160
+ "args": "timestamp",
33161
+ "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
33162
  },
33093
33163
  "$env": {
33094
- "args": "arg",
33095
- "desc": "Returns the value of an environment variable.\n\nThis is a kumologica-core defined function."
33164
+ "args": "arg",
33165
+ "desc": "Returns the value of an environment variable.\n\nThis is a kumologica-core defined function."
33096
33166
  },
33097
33167
  "$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."
33168
+ "args": "expr [, context]",
33169
+ "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
33170
  },
33101
33171
  "$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."
33172
+ "args": "number, picture",
33173
+ "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
33174
  },
33105
33175
  "$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`."
33176
+ "args": "string, picture",
33177
+ "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
33178
 
33109
33179
  },
33110
33180
  "$single": {
33111
- "args": "array, function",
33112
- "desc": "Returns the one and only one value in the array parameter that satisfy the function predicate"
33181
+ "args": "array, function",
33182
+ "desc": "Returns the one and only one value in the array parameter that satisfy the function predicate"
33183
+ },
33184
+ "$maskjson": {
33185
+ "args": "object, object",
33186
+ "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"
33187
+ },
33188
+ "$maskphone": {
33189
+ "args": "string, object",
33190
+ "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"
33191
+ },
33192
+ "$maskemail": {
33193
+ "args": "string, object",
33194
+ "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"
33195
+ },
33196
+ "$maskcard": {
33197
+ "args": "string, object",
33198
+ "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"
33199
+ },
33200
+ "$maskpassword": {
33201
+ "args": "string, object",
33202
+ "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"
33203
+ },
33204
+ "$queryparam": {
33205
+ "args": "string",
33206
+ "desc": "Returns the value for the given query parameter key"
33207
+ },
33208
+ "$uriparam": {
33209
+ "args": "string",
33210
+ "desc": "Returns the value for the given path parameter key"
33113
33211
  }
33114
33212
  }
33115
33213
  ;