@lowdefy/operators-js 4.5.1 → 4.6.0

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.
Files changed (123) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/operators/build/env.js +2 -1
  3. package/dist/operators/build/env.schema.js +61 -0
  4. package/dist/operators/client/_index.js +2 -1
  5. package/dist/operators/client/actions.js +2 -1
  6. package/dist/operators/client/actions.schema.js +61 -0
  7. package/dist/operators/client/api.js +4 -3
  8. package/dist/operators/client/api.schema.js +21 -0
  9. package/dist/operators/client/base64.js +2 -1
  10. package/dist/operators/client/base64.schema.js +21 -0
  11. package/dist/operators/client/event.js +2 -1
  12. package/dist/operators/client/event.schema.js +61 -0
  13. package/dist/operators/client/event_log.js +2 -1
  14. package/dist/operators/client/event_log.schema.js +61 -0
  15. package/dist/operators/client/global.js +2 -1
  16. package/dist/operators/client/global.schema.js +61 -0
  17. package/dist/operators/client/index.schema.js +22 -0
  18. package/dist/operators/client/input.js +2 -1
  19. package/dist/operators/client/input.schema.js +61 -0
  20. package/dist/operators/client/js.js +9 -3
  21. package/dist/operators/client/js.schema.js +21 -0
  22. package/dist/operators/client/location.js +4 -3
  23. package/dist/operators/client/location.schema.js +35 -0
  24. package/dist/operators/client/media.js +3 -2
  25. package/dist/operators/client/media.schema.js +59 -0
  26. package/dist/operators/client/menu.js +2 -1
  27. package/dist/operators/client/menu.schema.js +54 -0
  28. package/dist/operators/client/request.js +4 -3
  29. package/dist/operators/client/request.schema.js +21 -0
  30. package/dist/operators/client/request_details.js +2 -1
  31. package/dist/operators/client/request_details.schema.js +61 -0
  32. package/dist/operators/client/url_query.js +3 -2
  33. package/dist/operators/client/url_query.schema.js +61 -0
  34. package/dist/operators/server/base64.js +2 -1
  35. package/dist/operators/server/base64.schema.js +21 -0
  36. package/dist/operators/server/hash.js +2 -1
  37. package/dist/operators/server/hash.schema.js +21 -0
  38. package/dist/operators/server/item.js +2 -1
  39. package/dist/operators/server/item.schema.js +61 -0
  40. package/dist/operators/server/js.js +8 -2
  41. package/dist/operators/server/js.schema.js +21 -0
  42. package/dist/operators/server/payload.js +2 -1
  43. package/dist/operators/server/payload.schema.js +61 -0
  44. package/dist/operators/server/secret.js +3 -2
  45. package/dist/operators/server/secret.schema.js +50 -0
  46. package/dist/operators/server/step.js +2 -1
  47. package/dist/operators/server/step.schema.js +61 -0
  48. package/dist/operators/shared/and.js +4 -3
  49. package/dist/operators/shared/and.schema.js +21 -0
  50. package/dist/operators/shared/args.js +2 -1
  51. package/dist/operators/shared/args.schema.js +61 -0
  52. package/dist/operators/shared/array.js +2 -1
  53. package/dist/operators/shared/array.schema.js +20 -0
  54. package/dist/operators/shared/date.js +59 -28
  55. package/dist/operators/shared/date.schema.js +20 -0
  56. package/dist/operators/shared/divide.js +7 -6
  57. package/dist/operators/shared/divide.schema.js +26 -0
  58. package/dist/operators/shared/eq.js +5 -4
  59. package/dist/operators/shared/eq.schema.js +23 -0
  60. package/dist/operators/shared/function.js +3 -2
  61. package/dist/operators/shared/function.schema.js +20 -0
  62. package/dist/operators/shared/get.js +4 -3
  63. package/dist/operators/shared/get.schema.js +40 -0
  64. package/dist/operators/shared/gt.js +5 -4
  65. package/dist/operators/shared/gt.schema.js +23 -0
  66. package/dist/operators/shared/gte.js +5 -4
  67. package/dist/operators/shared/gte.schema.js +23 -0
  68. package/dist/operators/shared/if.js +4 -3
  69. package/dist/operators/shared/if.schema.js +36 -0
  70. package/dist/operators/shared/if_none.js +5 -4
  71. package/dist/operators/shared/if_none.schema.js +23 -0
  72. package/dist/operators/shared/intl.js +2 -1
  73. package/dist/operators/shared/intl.schema.js +20 -0
  74. package/dist/operators/shared/json.js +2 -1
  75. package/dist/operators/shared/json.schema.js +20 -0
  76. package/dist/operators/shared/log.js +2 -1
  77. package/dist/operators/shared/log.schema.js +20 -0
  78. package/dist/operators/shared/lt.js +5 -4
  79. package/dist/operators/shared/lt.schema.js +23 -0
  80. package/dist/operators/shared/lte.js +5 -4
  81. package/dist/operators/shared/lte.schema.js +23 -0
  82. package/dist/operators/shared/math.js +5 -2
  83. package/dist/operators/shared/math.schema.js +20 -0
  84. package/dist/operators/shared/ne.js +5 -4
  85. package/dist/operators/shared/ne.schema.js +23 -0
  86. package/dist/operators/shared/not.js +2 -1
  87. package/dist/operators/shared/not.schema.js +21 -0
  88. package/dist/operators/shared/number.js +2 -1
  89. package/dist/operators/shared/number.schema.js +20 -0
  90. package/dist/operators/shared/object.js +2 -1
  91. package/dist/operators/shared/object.schema.js +20 -0
  92. package/dist/operators/shared/operator.js +6 -5
  93. package/dist/operators/shared/operator.schema.js +33 -0
  94. package/dist/operators/shared/or.js +4 -3
  95. package/dist/operators/shared/or.schema.js +21 -0
  96. package/dist/operators/shared/product.js +4 -3
  97. package/dist/operators/shared/product.schema.js +24 -0
  98. package/dist/operators/shared/random.js +14 -18
  99. package/dist/operators/shared/random.schema.js +60 -0
  100. package/dist/operators/shared/regex.js +8 -6
  101. package/dist/operators/shared/regex.schema.js +50 -0
  102. package/dist/operators/shared/state.js +2 -1
  103. package/dist/operators/shared/state.schema.js +61 -0
  104. package/dist/operators/shared/string.js +2 -1
  105. package/dist/operators/shared/string.schema.js +20 -0
  106. package/dist/operators/shared/subtract.js +6 -5
  107. package/dist/operators/shared/subtract.schema.js +26 -0
  108. package/dist/operators/shared/sum.js +4 -3
  109. package/dist/operators/shared/sum.schema.js +24 -0
  110. package/dist/operators/shared/switch.js +5 -4
  111. package/dist/operators/shared/switch.schema.js +49 -0
  112. package/dist/operators/shared/type.js +4 -3
  113. package/dist/operators/shared/type.schema.js +71 -0
  114. package/dist/operators/shared/uri.js +2 -1
  115. package/dist/operators/shared/uri.schema.js +21 -0
  116. package/dist/operators/shared/user.js +2 -1
  117. package/dist/operators/shared/user.schema.js +61 -0
  118. package/dist/operatorsBuild.js +1 -1
  119. package/dist/operatorsClient.js +1 -1
  120. package/dist/operatorsServer.js +1 -1
  121. package/dist/schemas.js +74 -0
  122. package/dist/types.js +1 -1
  123. package/package.json +4 -3
@@ -0,0 +1,35 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ type: 'string',
19
+ enum: [
20
+ 'basePath',
21
+ 'hash',
22
+ 'homePageId',
23
+ 'host',
24
+ 'hostname',
25
+ 'href',
26
+ 'origin',
27
+ 'pageId',
28
+ 'pathname',
29
+ 'port',
30
+ 'protocol',
31
+ 'search'
32
+ ],
33
+ description: 'Browser window location property to return.'
34
+ }
35
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@ const breakpoints = {
23
23
  function _media({ arrayIndices, location, params, globals }) {
24
24
  const { window } = globals;
25
25
  if (!window?.innerWidth) {
26
- throw new Error(`Operator Error: device window width not available for _media. Received: ${JSON.stringify(params)} at ${location}.`);
26
+ throw new Error(`device window width not available for _media.`);
27
27
  }
28
28
  let size;
29
29
  switch(true){
@@ -59,4 +59,5 @@ function _media({ arrayIndices, location, params, globals }) {
59
59
  params
60
60
  });
61
61
  }
62
+ _media.dynamic = true;
62
63
  export default _media;
@@ -0,0 +1,59 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ oneOf: [
19
+ {
20
+ type: 'string',
21
+ enum: [
22
+ 'size',
23
+ 'width',
24
+ 'height'
25
+ ],
26
+ description: 'Media property to return.'
27
+ },
28
+ {
29
+ type: 'boolean',
30
+ enum: [
31
+ true
32
+ ],
33
+ description: 'Return all media data.'
34
+ },
35
+ {
36
+ type: 'object',
37
+ properties: {
38
+ key: {
39
+ type: 'string',
40
+ enum: [
41
+ 'size',
42
+ 'width',
43
+ 'height'
44
+ ],
45
+ description: 'Media property to return.'
46
+ },
47
+ default: {
48
+ description: 'Default value if key does not exist.'
49
+ },
50
+ all: {
51
+ type: 'boolean',
52
+ description: 'Return all media data.'
53
+ }
54
+ },
55
+ additionalProperties: false
56
+ }
57
+ ]
58
+ }
59
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -22,4 +22,5 @@ function _menu({ params, menus, location }) {
22
22
  location
23
23
  });
24
24
  }
25
+ _menu.dynamic = true;
25
26
  export default _menu;
@@ -0,0 +1,54 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ oneOf: [
19
+ {
20
+ type: 'string',
21
+ description: 'Menu ID to look up.'
22
+ },
23
+ {
24
+ type: 'number',
25
+ description: 'Menu index to access.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all menus.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ value: {
38
+ type: 'string',
39
+ description: 'Menu ID to look up.'
40
+ },
41
+ index: {
42
+ type: 'number',
43
+ description: 'Menu index to access.'
44
+ },
45
+ all: {
46
+ type: 'boolean',
47
+ description: 'Return all menus.'
48
+ }
49
+ },
50
+ additionalProperties: false
51
+ }
52
+ ]
53
+ }
54
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -13,9 +13,9 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import { applyArrayIndices, get, serializer, type } from '@lowdefy/helpers';
16
- function _request({ arrayIndices, params, requests, location }) {
16
+ function _request({ arrayIndices, params, requests }) {
17
17
  if (!type.isString(params)) {
18
- throw new Error(`Operator Error: _request accepts a string value. Received: ${JSON.stringify(params)} at ${location}.`);
18
+ throw new Error(`_request accepts a string value.`);
19
19
  }
20
20
  const splitKey = params.split('.');
21
21
  const [requestId, ...keyParts] = splitKey;
@@ -31,4 +31,5 @@ function _request({ arrayIndices, params, requests, location }) {
31
31
  }
32
32
  return null;
33
33
  }
34
+ _request.dynamic = true;
34
35
  export default _request;
@@ -0,0 +1,21 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ type: 'string',
19
+ description: 'Dot-notation path to request response data. First segment is the request ID, remaining segments access nested properties.'
20
+ }
21
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -22,4 +22,5 @@ function _request_details({ params, requests, arrayIndices, location }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _request_details.dynamic = true;
25
26
  export default _request_details;
@@ -0,0 +1,61 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ oneOf: [
19
+ {
20
+ type: 'string',
21
+ description: 'Dot-notation path to value in request details.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in request details.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all request details.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in request details.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in request details.'
46
+ }
47
+ ]
48
+ },
49
+ default: {
50
+ description: 'Default value if key does not exist.'
51
+ },
52
+ all: {
53
+ type: 'boolean',
54
+ description: 'Return all request details.'
55
+ }
56
+ },
57
+ additionalProperties: false
58
+ }
59
+ ]
60
+ }
61
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@ import { urlQuery } from '@lowdefy/helpers';
17
17
  function _url_query({ arrayIndices, globals, location, params }) {
18
18
  const { window } = globals;
19
19
  if (!window?.location) {
20
- throw new Error(`Operator Error: Browser window.location not available for _url_query. Received: ${JSON.stringify(params)} at ${location}.`);
20
+ throw new Error(`Browser window.location not available for _url_query.`);
21
21
  }
22
22
  return getFromObject({
23
23
  arrayIndices,
@@ -27,4 +27,5 @@ function _url_query({ arrayIndices, globals, location, params }) {
27
27
  params
28
28
  });
29
29
  }
30
+ _url_query.dynamic = true;
30
31
  export default _url_query;
@@ -0,0 +1,61 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ oneOf: [
19
+ {
20
+ type: 'string',
21
+ description: 'Dot-notation path to value in URL query params.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in URL query params.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all URL query params.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in URL query params.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in URL query params.'
46
+ }
47
+ ]
48
+ },
49
+ default: {
50
+ description: 'Default value if key does not exist.'
51
+ },
52
+ all: {
53
+ type: 'boolean',
54
+ description: 'Return all URL query params.'
55
+ }
56
+ },
57
+ additionalProperties: false
58
+ }
59
+ ]
60
+ }
61
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -49,4 +49,5 @@ function _base64({ params, location, methodName }) {
49
49
  params
50
50
  });
51
51
  }
52
+ _base64.dynamic = false;
52
53
  export default _base64;
@@ -0,0 +1,21 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ type: 'string',
19
+ description: 'String value to encode or decode.'
20
+ }
21
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -81,4 +81,5 @@ function _hash({ params, location, methodName }) {
81
81
  params
82
82
  });
83
83
  }
84
+ _hash.dynamic = false;
84
85
  export default _hash;
@@ -0,0 +1,21 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ type: 'string',
19
+ description: 'String value to hash.'
20
+ }
21
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -21,4 +21,5 @@ function _item({ location, params, items }) {
21
21
  params
22
22
  });
23
23
  }
24
+ _item.dynamic = true;
24
25
  export default _item;
@@ -0,0 +1,61 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ oneOf: [
19
+ {
20
+ type: 'string',
21
+ description: 'Dot-notation path to value in items object.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in items object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all items data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in items object.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in items object.'
46
+ }
47
+ ]
48
+ },
49
+ default: {
50
+ description: 'Default value if key does not exist.'
51
+ },
52
+ all: {
53
+ type: 'boolean',
54
+ description: 'Return all items data.'
55
+ }
56
+ },
57
+ additionalProperties: false
58
+ }
59
+ ]
60
+ }
61
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -14,6 +14,9 @@
14
14
  limitations under the License.
15
15
  */ function js(operatorContext) {
16
16
  const { jsMap, operators, location, params } = operatorContext;
17
+ if (!jsMap[params]) {
18
+ throw new Error(`_js function not found. The function may not have been built yet. Received hash: ${params}`);
19
+ }
17
20
  try {
18
21
  return jsMap[params]({
19
22
  payload: (p)=>operators._payload({
@@ -42,7 +45,10 @@
42
45
  })
43
46
  });
44
47
  } catch (error) {
45
- throw new Error(`Operator Error: ${error.message} at ${location}. Received function: ${jsMap[params].toString()}`);
48
+ throw new Error(`_js function execution error. Function: ${jsMap[params].toString()}`, {
49
+ cause: error
50
+ });
46
51
  }
47
52
  }
53
+ js.dynamic = true;
48
54
  export default js;
@@ -0,0 +1,21 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ type: 'string',
19
+ description: 'Hash identifier of the pre-built JavaScript function to execute.'
20
+ }
21
+ };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2024 Lowdefy, Inc
2
+ Copyright 2020-2026 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -21,4 +21,5 @@ function _payload({ location, params, payload }) {
21
21
  params
22
22
  });
23
23
  }
24
+ _payload.dynamic = true;
24
25
  export default _payload;
@@ -0,0 +1,61 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ oneOf: [
19
+ {
20
+ type: 'string',
21
+ description: 'Dot-notation path to value in payload object.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in payload object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all payload data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in payload object.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in payload object.'
46
+ }
47
+ ]
48
+ },
49
+ default: {
50
+ description: 'Default value if key does not exist.'
51
+ },
52
+ all: {
53
+ type: 'boolean',
54
+ description: 'Return all payload data.'
55
+ }
56
+ },
57
+ additionalProperties: false
58
+ }
59
+ ]
60
+ }
61
+ };