@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
package/dist/index.js CHANGED
@@ -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.
@@ -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 _env({ arrayIndices, env, location, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _env.dynamic = false;
25
26
  export default _env;
@@ -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 environment variable.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in env object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all environment variables.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to environment variable.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in env 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 environment variables.'
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.
@@ -22,4 +22,5 @@ function _index({ arrayIndices, location, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _index.dynamic = true;
25
26
  export default _index;
@@ -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 _actions({ actions, arrayIndices, location, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _actions.dynamic = true;
25
26
  export default _actions;
@@ -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 actions object.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in actions object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all actions data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in actions object.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in actions 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 actions 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.
@@ -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 { get, type } from '@lowdefy/helpers';
16
- function _api({ params, apiResponses, location }) {
16
+ function _api({ params, apiResponses }) {
17
17
  if (!type.isString(params)) {
18
- throw new Error(`Operator Error: _api accepts a string value. Received: ${JSON.stringify(params)} at ${location}.`);
18
+ throw new Error(`_api accepts a string value.`);
19
19
  }
20
20
  const splitKey = params.split('.');
21
21
  const [endpoint, ...keyParts] = splitKey;
@@ -31,4 +31,5 @@ function _api({ params, apiResponses, location }) {
31
31
  }
32
32
  return null;
33
33
  }
34
+ _api.dynamic = true;
34
35
  export default _api;
@@ -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 API response data. First segment is the endpoint name, 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.
@@ -47,4 +47,5 @@ function _base64({ params, location, methodName }) {
47
47
  params
48
48
  });
49
49
  }
50
+ _base64.dynamic = true;
50
51
  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.
@@ -22,4 +22,5 @@ function _event({ arrayIndices, event, location, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _event.dynamic = true;
25
26
  export default _event;
@@ -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 event object.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in event object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all event data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in event object.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in event 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 event 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.
@@ -22,4 +22,5 @@ function _event_log({ arrayIndices, eventLog, location, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _event_log.dynamic = true;
25
26
  export default _event_log;
@@ -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 event log.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in event log.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all event log data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in event log.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in event log.'
46
+ }
47
+ ]
48
+ },
49
+ default: {
50
+ description: 'Default value if key does not exist.'
51
+ },
52
+ all: {
53
+ type: 'boolean',
54
+ description: 'Return all event log 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.
@@ -22,4 +22,5 @@ function _global({ arrayIndices, location, lowdefyGlobal, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _global.dynamic = true;
25
26
  export default _global;
@@ -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 global object.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in global object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all global data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in global object.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in global 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 global data.'
55
+ }
56
+ },
57
+ additionalProperties: false
58
+ }
59
+ ]
60
+ }
61
+ };
@@ -0,0 +1,22 @@
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: 'integer',
19
+ minimum: 0,
20
+ description: 'Returns the current array index when used inside a list block.'
21
+ }
22
+ };
@@ -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 _input({ arrayIndices, input, location, params }) {
22
22
  params
23
23
  });
24
24
  }
25
+ _input.dynamic = true;
25
26
  export default _input;
@@ -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 input object.'
22
+ },
23
+ {
24
+ type: 'integer',
25
+ description: 'Index to access in input object.'
26
+ },
27
+ {
28
+ type: 'boolean',
29
+ enum: [
30
+ true
31
+ ],
32
+ description: 'Return all input data.'
33
+ },
34
+ {
35
+ type: 'object',
36
+ properties: {
37
+ key: {
38
+ oneOf: [
39
+ {
40
+ type: 'string',
41
+ description: 'Dot-notation path to value in input object.'
42
+ },
43
+ {
44
+ type: 'integer',
45
+ description: 'Index to access in input 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 input 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.
@@ -13,7 +13,10 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ function js(operatorContext) {
16
- const { jsMap, operators, location, params } = operatorContext;
16
+ const { jsMap, operators, 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
  actions: (p)=>operators._actions({
@@ -54,7 +57,10 @@
54
57
  })
55
58
  });
56
59
  } catch (error) {
57
- throw new Error(`Operator Error: ${error.message} at ${location}. Received function: ${jsMap[params].toString()}`);
60
+ throw new Error(`_js function execution error. Function: ${jsMap[params].toString()}`, {
61
+ cause: error
62
+ });
58
63
  }
59
64
  }
65
+ js.dynamic = true;
60
66
  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.
@@ -30,10 +30,10 @@ const validProperties = [
30
30
  function _location({ arrayIndices, basePath, home, location, pageId, params, globals }) {
31
31
  const { window } = globals;
32
32
  if (!window?.location) {
33
- throw new Error(`Operator Error: Browser window.location not available for _location. Received: ${JSON.stringify(params)} at ${location}.`);
33
+ throw new Error(`Browser window.location not available for _location.`);
34
34
  }
35
35
  if (!validProperties.includes(params)) {
36
- throw new Error(`Operator Error: _location only returns values for ${validProperties.join(', ')}. Received: ${JSON.stringify(params)} at ${location}.`);
36
+ throw new Error(`_location only returns values for ${validProperties.join(', ')}.`);
37
37
  }
38
38
  const windowLocation = {
39
39
  basePath,
@@ -57,4 +57,5 @@ function _location({ arrayIndices, basePath, home, location, pageId, params, glo
57
57
  params
58
58
  });
59
59
  }
60
+ _location.dynamic = true;
60
61
  export default _location;