code0-hercules 1.3.0__py3-none-any.whl

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 (258) hide show
  1. code0_hercules-1.3.0.dist-info/METADATA +79 -0
  2. code0_hercules-1.3.0.dist-info/RECORD +258 -0
  3. code0_hercules-1.3.0.dist-info/WHEEL +5 -0
  4. code0_hercules-1.3.0.dist-info/entry_points.txt +2 -0
  5. code0_hercules-1.3.0.dist-info/top_level.txt +1 -0
  6. hercules/__init__.py +81 -0
  7. hercules/_metadata.py +38 -0
  8. hercules/_tsgen/convert.mjs +96 -0
  9. hercules/_tsgen/package-lock.json +366 -0
  10. hercules/_tsgen/package.json +11 -0
  11. hercules/_tucana/__init__.py +29 -0
  12. hercules/_tucana/helpers.py +73 -0
  13. hercules/action.py +345 -0
  14. hercules/actions/__init__.py +21 -0
  15. hercules/actions/execution.py +121 -0
  16. hercules/actions/flow_execution.py +11 -0
  17. hercules/actions/flow_update.py +18 -0
  18. hercules/actions/module_configurations.py +14 -0
  19. hercules/actions/sub_flow_execution.py +14 -0
  20. hercules/cli.py +137 -0
  21. hercules/decorators/__init__.py +0 -0
  22. hercules/decorators/datatype.py +39 -0
  23. hercules/decorators/event.py +35 -0
  24. hercules/decorators/function.py +59 -0
  25. hercules/decorators/meta.py +82 -0
  26. hercules/decorators/runtime_event.py +15 -0
  27. hercules/decorators/runtime_function.py +18 -0
  28. hercules/definitions/__init__.py +162 -0
  29. hercules/definitions/cron_action/__init__.py +0 -0
  30. hercules/definitions/cron_action/data_types/__init__.py +0 -0
  31. hercules/definitions/cron_action/data_types/cron_day_of_month.py +11 -0
  32. hercules/definitions/cron_action/data_types/cron_day_of_week.py +11 -0
  33. hercules/definitions/cron_action/data_types/cron_hour.py +11 -0
  34. hercules/definitions/cron_action/data_types/cron_minute.py +11 -0
  35. hercules/definitions/cron_action/data_types/cron_month.py +11 -0
  36. hercules/definitions/cron_action/runtime_flow_types/__init__.py +0 -0
  37. hercules/definitions/cron_action/runtime_flow_types/cron.py +19 -0
  38. hercules/definitions/rest_action/__init__.py +0 -0
  39. hercules/definitions/rest_action/data_types/__init__.py +0 -0
  40. hercules/definitions/rest_action/data_types/rest_adapter_input.py +19 -0
  41. hercules/definitions/rest_action/data_types/rest_auth_type.py +19 -0
  42. hercules/definitions/rest_action/data_types/rest_auth_value.py +11 -0
  43. hercules/definitions/rest_action/runtime_flow_types/__init__.py +0 -0
  44. hercules/definitions/rest_action/runtime_flow_types/rest.py +20 -0
  45. hercules/definitions/rest_action/runtime_functions/__init__.py +0 -0
  46. hercules/definitions/rest_action/runtime_functions/rest_control_respond.py +21 -0
  47. hercules/definitions/taurus_boolean/__init__.py +0 -0
  48. hercules/definitions/taurus_boolean/data_types/__init__.py +0 -0
  49. hercules/definitions/taurus_boolean/data_types/boolean.py +11 -0
  50. hercules/definitions/taurus_boolean/runtime_functions/__init__.py +0 -0
  51. hercules/definitions/taurus_boolean/runtime_functions/std_boolean_as_number.py +18 -0
  52. hercules/definitions/taurus_boolean/runtime_functions/std_boolean_as_text.py +18 -0
  53. hercules/definitions/taurus_boolean/runtime_functions/std_boolean_from_number.py +18 -0
  54. hercules/definitions/taurus_boolean/runtime_functions/std_boolean_from_text.py +18 -0
  55. hercules/definitions/taurus_boolean/runtime_functions/std_boolean_is_equal.py +19 -0
  56. hercules/definitions/taurus_boolean/runtime_functions/std_boolean_negate.py +18 -0
  57. hercules/definitions/taurus_color/__init__.py +0 -0
  58. hercules/definitions/taurus_color/data_types/__init__.py +0 -0
  59. hercules/definitions/taurus_color/data_types/color.py +17 -0
  60. hercules/definitions/taurus_color/runtime_functions/__init__.py +0 -0
  61. hercules/definitions/taurus_color/runtime_functions/std_color_as_hex.py +18 -0
  62. hercules/definitions/taurus_color/runtime_functions/std_color_as_hsl.py +18 -0
  63. hercules/definitions/taurus_color/runtime_functions/std_color_as_rgb.py +18 -0
  64. hercules/definitions/taurus_color/runtime_functions/std_color_from_hex.py +18 -0
  65. hercules/definitions/taurus_color/runtime_functions/std_color_from_hsl.py +21 -0
  66. hercules/definitions/taurus_color/runtime_functions/std_color_from_rgb.py +21 -0
  67. hercules/definitions/taurus_control/__init__.py +0 -0
  68. hercules/definitions/taurus_control/data_types/__init__.py +0 -0
  69. hercules/definitions/taurus_control/data_types/comparator.py +21 -0
  70. hercules/definitions/taurus_control/data_types/consumer.py +20 -0
  71. hercules/definitions/taurus_control/data_types/predicate.py +20 -0
  72. hercules/definitions/taurus_control/data_types/runnable.py +13 -0
  73. hercules/definitions/taurus_control/data_types/transform.py +20 -0
  74. hercules/definitions/taurus_control/runtime_functions/__init__.py +0 -0
  75. hercules/definitions/taurus_control/runtime_functions/std_control_if.py +19 -0
  76. hercules/definitions/taurus_control/runtime_functions/std_control_if_else.py +21 -0
  77. hercules/definitions/taurus_control/runtime_functions/std_control_return.py +18 -0
  78. hercules/definitions/taurus_control/runtime_functions/std_control_stop.py +16 -0
  79. hercules/definitions/taurus_control/runtime_functions/std_control_value.py +18 -0
  80. hercules/definitions/taurus_date/__init__.py +0 -0
  81. hercules/definitions/taurus_date/data_types/__init__.py +0 -0
  82. hercules/definitions/taurus_date/data_types/date.py +11 -0
  83. hercules/definitions/taurus_date/data_types/hour.py +11 -0
  84. hercules/definitions/taurus_date/data_types/minute.py +11 -0
  85. hercules/definitions/taurus_date/data_types/month.py +22 -0
  86. hercules/definitions/taurus_date/runtime_functions/__init__.py +0 -0
  87. hercules/definitions/taurus_date/runtime_functions/std_date_format.py +20 -0
  88. hercules/definitions/taurus_date/runtime_functions/std_date_from.py +24 -0
  89. hercules/definitions/taurus_date/runtime_functions/std_date_from_text.py +19 -0
  90. hercules/definitions/taurus_date/runtime_functions/std_date_from_unix.py +18 -0
  91. hercules/definitions/taurus_date/runtime_functions/std_date_now.py +16 -0
  92. hercules/definitions/taurus_file/__init__.py +0 -0
  93. hercules/definitions/taurus_file/data_types/__init__.py +0 -0
  94. hercules/definitions/taurus_file/data_types/file.py +19 -0
  95. hercules/definitions/taurus_file/runtime_functions/__init__.py +0 -0
  96. hercules/definitions/taurus_file/runtime_functions/std_file_size.py +18 -0
  97. hercules/definitions/taurus_http/__init__.py +0 -0
  98. hercules/definitions/taurus_http/data_types/__init__.py +0 -0
  99. hercules/definitions/taurus_http/data_types/http_auth_place.py +12 -0
  100. hercules/definitions/taurus_http/data_types/http_auth_type.py +17 -0
  101. hercules/definitions/taurus_http/data_types/http_auth_value.py +11 -0
  102. hercules/definitions/taurus_http/data_types/http_method.py +16 -0
  103. hercules/definitions/taurus_http/data_types/http_payload.py +11 -0
  104. hercules/definitions/taurus_http/data_types/http_request.py +19 -0
  105. hercules/definitions/taurus_http/data_types/http_response.py +18 -0
  106. hercules/definitions/taurus_http/data_types/http_schema.py +31 -0
  107. hercules/definitions/taurus_http/data_types/http_status_code.py +13 -0
  108. hercules/definitions/taurus_http/data_types/http_url.py +13 -0
  109. hercules/definitions/taurus_http/runtime_functions/__init__.py +0 -0
  110. hercules/definitions/taurus_http/runtime_functions/http_request_send.py +26 -0
  111. hercules/definitions/taurus_list/__init__.py +0 -0
  112. hercules/definitions/taurus_list/data_types/__init__.py +0 -0
  113. hercules/definitions/taurus_list/data_types/list.py +13 -0
  114. hercules/definitions/taurus_list/runtime_functions/__init__.py +0 -0
  115. hercules/definitions/taurus_list/runtime_functions/std_list_at.py +20 -0
  116. hercules/definitions/taurus_list/runtime_functions/std_list_concat.py +20 -0
  117. hercules/definitions/taurus_list/runtime_functions/std_list_filter.py +19 -0
  118. hercules/definitions/taurus_list/runtime_functions/std_list_find.py +20 -0
  119. hercules/definitions/taurus_list/runtime_functions/std_list_find_index.py +19 -0
  120. hercules/definitions/taurus_list/runtime_functions/std_list_find_last.py +20 -0
  121. hercules/definitions/taurus_list/runtime_functions/std_list_first.py +18 -0
  122. hercules/definitions/taurus_list/runtime_functions/std_list_flat.py +18 -0
  123. hercules/definitions/taurus_list/runtime_functions/std_list_for_each.py +19 -0
  124. hercules/definitions/taurus_list/runtime_functions/std_list_index_of.py +19 -0
  125. hercules/definitions/taurus_list/runtime_functions/std_list_is_empty.py +18 -0
  126. hercules/definitions/taurus_list/runtime_functions/std_list_join.py +19 -0
  127. hercules/definitions/taurus_list/runtime_functions/std_list_last.py +18 -0
  128. hercules/definitions/taurus_list/runtime_functions/std_list_map.py +19 -0
  129. hercules/definitions/taurus_list/runtime_functions/std_list_max.py +18 -0
  130. hercules/definitions/taurus_list/runtime_functions/std_list_min.py +18 -0
  131. hercules/definitions/taurus_list/runtime_functions/std_list_pop.py +18 -0
  132. hercules/definitions/taurus_list/runtime_functions/std_list_push.py +19 -0
  133. hercules/definitions/taurus_list/runtime_functions/std_list_remove.py +19 -0
  134. hercules/definitions/taurus_list/runtime_functions/std_list_reverse.py +18 -0
  135. hercules/definitions/taurus_list/runtime_functions/std_list_size.py +18 -0
  136. hercules/definitions/taurus_list/runtime_functions/std_list_sort.py +19 -0
  137. hercules/definitions/taurus_list/runtime_functions/std_list_sort_reverse.py +19 -0
  138. hercules/definitions/taurus_list/runtime_functions/std_list_sum.py +18 -0
  139. hercules/definitions/taurus_list/runtime_functions/std_list_to_unique.py +18 -0
  140. hercules/definitions/taurus_number/__init__.py +0 -0
  141. hercules/definitions/taurus_number/data_types/__init__.py +0 -0
  142. hercules/definitions/taurus_number/data_types/number.py +11 -0
  143. hercules/definitions/taurus_number/runtime_functions/__init__.py +0 -0
  144. hercules/definitions/taurus_number/runtime_functions/std_number_abs.py +18 -0
  145. hercules/definitions/taurus_number/runtime_functions/std_number_add.py +19 -0
  146. hercules/definitions/taurus_number/runtime_functions/std_number_arccos.py +18 -0
  147. hercules/definitions/taurus_number/runtime_functions/std_number_arcsin.py +18 -0
  148. hercules/definitions/taurus_number/runtime_functions/std_number_arctan.py +18 -0
  149. hercules/definitions/taurus_number/runtime_functions/std_number_as_text.py +18 -0
  150. hercules/definitions/taurus_number/runtime_functions/std_number_clamp.py +20 -0
  151. hercules/definitions/taurus_number/runtime_functions/std_number_cos.py +18 -0
  152. hercules/definitions/taurus_number/runtime_functions/std_number_cosh.py +18 -0
  153. hercules/definitions/taurus_number/runtime_functions/std_number_divide.py +20 -0
  154. hercules/definitions/taurus_number/runtime_functions/std_number_euler.py +16 -0
  155. hercules/definitions/taurus_number/runtime_functions/std_number_exponential.py +19 -0
  156. hercules/definitions/taurus_number/runtime_functions/std_number_from_text.py +18 -0
  157. hercules/definitions/taurus_number/runtime_functions/std_number_has_digits.py +18 -0
  158. hercules/definitions/taurus_number/runtime_functions/std_number_is_equal.py +19 -0
  159. hercules/definitions/taurus_number/runtime_functions/std_number_is_greater.py +19 -0
  160. hercules/definitions/taurus_number/runtime_functions/std_number_is_less.py +19 -0
  161. hercules/definitions/taurus_number/runtime_functions/std_number_is_positive.py +18 -0
  162. hercules/definitions/taurus_number/runtime_functions/std_number_is_zero.py +18 -0
  163. hercules/definitions/taurus_number/runtime_functions/std_number_ln.py +18 -0
  164. hercules/definitions/taurus_number/runtime_functions/std_number_log.py +19 -0
  165. hercules/definitions/taurus_number/runtime_functions/std_number_max.py +19 -0
  166. hercules/definitions/taurus_number/runtime_functions/std_number_min.py +19 -0
  167. hercules/definitions/taurus_number/runtime_functions/std_number_modulo.py +19 -0
  168. hercules/definitions/taurus_number/runtime_functions/std_number_multiply.py +19 -0
  169. hercules/definitions/taurus_number/runtime_functions/std_number_negate.py +18 -0
  170. hercules/definitions/taurus_number/runtime_functions/std_number_pi.py +16 -0
  171. hercules/definitions/taurus_number/runtime_functions/std_number_random_number.py +19 -0
  172. hercules/definitions/taurus_number/runtime_functions/std_number_remove_digits.py +18 -0
  173. hercules/definitions/taurus_number/runtime_functions/std_number_root.py +19 -0
  174. hercules/definitions/taurus_number/runtime_functions/std_number_round.py +19 -0
  175. hercules/definitions/taurus_number/runtime_functions/std_number_round_down.py +19 -0
  176. hercules/definitions/taurus_number/runtime_functions/std_number_round_up.py +19 -0
  177. hercules/definitions/taurus_number/runtime_functions/std_number_sin.py +18 -0
  178. hercules/definitions/taurus_number/runtime_functions/std_number_sinh.py +18 -0
  179. hercules/definitions/taurus_number/runtime_functions/std_number_square.py +18 -0
  180. hercules/definitions/taurus_number/runtime_functions/std_number_square_root.py +18 -0
  181. hercules/definitions/taurus_number/runtime_functions/std_number_subtract.py +19 -0
  182. hercules/definitions/taurus_number/runtime_functions/std_number_tan.py +18 -0
  183. hercules/definitions/taurus_object/__init__.py +0 -0
  184. hercules/definitions/taurus_object/data_types/__init__.py +0 -0
  185. hercules/definitions/taurus_object/data_types/object.py +13 -0
  186. hercules/definitions/taurus_object/data_types/type.py +13 -0
  187. hercules/definitions/taurus_object/runtime_functions/__init__.py +0 -0
  188. hercules/definitions/taurus_object/runtime_functions/std_object_contains_key.py +19 -0
  189. hercules/definitions/taurus_object/runtime_functions/std_object_get.py +19 -0
  190. hercules/definitions/taurus_object/runtime_functions/std_object_keys.py +18 -0
  191. hercules/definitions/taurus_object/runtime_functions/std_object_set.py +20 -0
  192. hercules/definitions/taurus_object/runtime_functions/std_object_size.py +18 -0
  193. hercules/definitions/taurus_text/__init__.py +0 -0
  194. hercules/definitions/taurus_text/data_types/__init__.py +0 -0
  195. hercules/definitions/taurus_text/data_types/text.py +11 -0
  196. hercules/definitions/taurus_text/data_types/text_encoding.py +13 -0
  197. hercules/definitions/taurus_text/runtime_functions/__init__.py +0 -0
  198. hercules/definitions/taurus_text/runtime_functions/std_text_append.py +19 -0
  199. hercules/definitions/taurus_text/runtime_functions/std_text_as_bytes.py +18 -0
  200. hercules/definitions/taurus_text/runtime_functions/std_text_at.py +19 -0
  201. hercules/definitions/taurus_text/runtime_functions/std_text_byte_size.py +18 -0
  202. hercules/definitions/taurus_text/runtime_functions/std_text_capitalize.py +18 -0
  203. hercules/definitions/taurus_text/runtime_functions/std_text_chars.py +18 -0
  204. hercules/definitions/taurus_text/runtime_functions/std_text_contains.py +19 -0
  205. hercules/definitions/taurus_text/runtime_functions/std_text_decode.py +19 -0
  206. hercules/definitions/taurus_text/runtime_functions/std_text_encode.py +19 -0
  207. hercules/definitions/taurus_text/runtime_functions/std_text_ends_with.py +19 -0
  208. hercules/definitions/taurus_text/runtime_functions/std_text_from_ascii.py +18 -0
  209. hercules/definitions/taurus_text/runtime_functions/std_text_hex.py +18 -0
  210. hercules/definitions/taurus_text/runtime_functions/std_text_index_of.py +19 -0
  211. hercules/definitions/taurus_text/runtime_functions/std_text_insert.py +20 -0
  212. hercules/definitions/taurus_text/runtime_functions/std_text_is_equal.py +19 -0
  213. hercules/definitions/taurus_text/runtime_functions/std_text_length.py +18 -0
  214. hercules/definitions/taurus_text/runtime_functions/std_text_lowercase.py +18 -0
  215. hercules/definitions/taurus_text/runtime_functions/std_text_octal.py +18 -0
  216. hercules/definitions/taurus_text/runtime_functions/std_text_prepend.py +19 -0
  217. hercules/definitions/taurus_text/runtime_functions/std_text_remove.py +20 -0
  218. hercules/definitions/taurus_text/runtime_functions/std_text_replace.py +20 -0
  219. hercules/definitions/taurus_text/runtime_functions/std_text_replace_first.py +21 -0
  220. hercules/definitions/taurus_text/runtime_functions/std_text_replace_last.py +20 -0
  221. hercules/definitions/taurus_text/runtime_functions/std_text_reverse.py +18 -0
  222. hercules/definitions/taurus_text/runtime_functions/std_text_split.py +19 -0
  223. hercules/definitions/taurus_text/runtime_functions/std_text_starts_with.py +19 -0
  224. hercules/definitions/taurus_text/runtime_functions/std_text_swapcase.py +18 -0
  225. hercules/definitions/taurus_text/runtime_functions/std_text_to_ascii.py +18 -0
  226. hercules/definitions/taurus_text/runtime_functions/std_text_trim.py +18 -0
  227. hercules/definitions/taurus_text/runtime_functions/std_text_uppercase.py +18 -0
  228. hercules/events.py +23 -0
  229. hercules/internal/__init__.py +0 -0
  230. hercules/internal/connection.py +37 -0
  231. hercules/internal/literal.py +113 -0
  232. hercules/internal/module_builder.py +261 -0
  233. hercules/internal/pydantic_codegen.py +82 -0
  234. hercules/internal/schema.py +158 -0
  235. hercules/internal/tsgen.py +93 -0
  236. hercules/manager/__init__.py +0 -0
  237. hercules/manager/base.py +73 -0
  238. hercules/manager/config.py +45 -0
  239. hercules/manager/datatype.py +8 -0
  240. hercules/manager/event.py +8 -0
  241. hercules/manager/flow.py +12 -0
  242. hercules/manager/function.py +8 -0
  243. hercules/manager/runtime_event.py +8 -0
  244. hercules/manager/runtime_function.py +8 -0
  245. hercules/map/__init__.py +0 -0
  246. hercules/map/datatype.py +41 -0
  247. hercules/map/event.py +74 -0
  248. hercules/map/function.py +76 -0
  249. hercules/map/runtime_event.py +43 -0
  250. hercules/map/runtime_function.py +64 -0
  251. hercules/models/__init__.py +0 -0
  252. hercules/models/datatype.py +49 -0
  253. hercules/models/event.py +35 -0
  254. hercules/models/function.py +37 -0
  255. hercules/models/runtime_event.py +29 -0
  256. hercules/models/runtime_function.py +33 -0
  257. hercules/schema.py +38 -0
  258. hercules/types.py +88 -0
@@ -0,0 +1,18 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::date::from_unix")
9
+ @Signature("(value: NUMBER): DATE")
10
+ @Name({"code": "en-US", "content": "Date from Unix Timestamp"})
11
+ @Description({"code": "en-US", "content": "Creates a date from a Unix timestamp given in seconds since the Unix epoch."})
12
+ @DisplayMessage({"code": "en-US", "content": "Date from Unix timestamp ${value}"})
13
+ @Alias({"code": "en-US", "content": "from unix;unix;timestamp;epoch;from;date;time;std"})
14
+ @DisplayIcon("tabler:calendar-plus")
15
+ @Parameter({"runtime_name": "value", "name": [{"code": "en-US", "content": "Unix Timestamp"}], "description": [{"code": "en-US", "content": "The Unix timestamp in seconds since the Unix epoch (1970-01-01T00:00:00Z)."}]})
16
+ class StdDateFromUnix(RuntimeFunctionRunnable):
17
+ def run(self, *args):
18
+ raise NotImplementedError("StdDateFromUnix.run() is not implemented")
@@ -0,0 +1,16 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+
5
+
6
+ @OmitRuntimeFunction()
7
+ @Identifier("std::date::now")
8
+ @Signature("(): DATE")
9
+ @Name({"code": "en-US", "content": "Now"})
10
+ @Description({"code": "en-US", "content": "Returns the current date and time as a date."})
11
+ @DisplayMessage({"code": "en-US", "content": "Now"})
12
+ @Alias({"code": "en-US", "content": "now;current;today;current date;current time;date;time;std"})
13
+ @DisplayIcon("tabler:calendar")
14
+ class StdDateNow(RuntimeFunctionRunnable):
15
+ def run(self, *args):
16
+ raise NotImplementedError("StdDateNow.run() is not implemented")
File without changes
@@ -0,0 +1,19 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Literal
4
+
5
+ from pydantic import BaseModel, ConfigDict
6
+
7
+
8
+ class File(BaseModel):
9
+ model_config = ConfigDict(
10
+ extra='forbid',
11
+ )
12
+ contentType: Any
13
+ fileName: str
14
+ valueType: Literal['base64']
15
+ value: str
16
+
17
+
18
+ from hercules.internal.schema import register_schema
19
+ register_schema(File, "FILE")
@@ -0,0 +1,18 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::file::size")
9
+ @Signature("<M extends TEXT>(file: FILE<M>): NUMBER")
10
+ @Name({"code": "en-US", "content": "File Size"})
11
+ @Description({"code": "en-US", "content": "Returns the size of the given file in bytes."})
12
+ @DisplayMessage({"code": "en-US", "content": "Size of ${file}"})
13
+ @Alias({"code": "en-US", "content": "size;file;bytes;length;document;blob;std"})
14
+ @DisplayIcon("tabler:file")
15
+ @Parameter({"runtime_name": "file", "name": [{"code": "en-US", "content": "File"}], "description": [{"code": "en-US", "content": "The file whose size in bytes is to be returned."}]})
16
+ class StdFileSize(RuntimeFunctionRunnable):
17
+ def run(self, *args):
18
+ raise NotImplementedError("StdFileSize.run() is not implemented")
File without changes
@@ -0,0 +1,12 @@
1
+ from __future__ import annotations
2
+
3
+ from enum import Enum
4
+
5
+
6
+ class HttpAuthPlace(Enum):
7
+ Header = 'Header'
8
+ Url = 'Url'
9
+
10
+
11
+ from hercules.internal.schema import register_schema
12
+ register_schema(HttpAuthPlace, "HTTP_AUTH_PLACE")
@@ -0,0 +1,17 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Literal
4
+
5
+ from pydantic import RootModel
6
+
7
+
8
+ class HttpAuthType(
9
+ RootModel[
10
+ Literal['Bearer'] | Literal['Basic'] | Literal['X-API-Key'] | str | Any | None
11
+ ]
12
+ ):
13
+ root: Literal['Bearer'] | Literal['Basic'] | Literal['X-API-Key'] | str | Any | None
14
+
15
+
16
+ from hercules.internal.schema import register_schema
17
+ register_schema(HttpAuthType, "HTTP_AUTH_TYPE")
@@ -0,0 +1,11 @@
1
+ from __future__ import annotations
2
+
3
+ from pydantic import RootModel
4
+
5
+
6
+ class HttpAuthValue(RootModel[str]):
7
+ root: str
8
+
9
+
10
+ from hercules.internal.schema import register_schema
11
+ register_schema(HttpAuthValue, "HTTP_AUTH_VALUE")
@@ -0,0 +1,16 @@
1
+ from __future__ import annotations
2
+
3
+ from enum import Enum
4
+
5
+
6
+ class HttpMethod(Enum):
7
+ GET = 'GET'
8
+ POST = 'POST'
9
+ PUT = 'PUT'
10
+ DELETE = 'DELETE'
11
+ PATCH = 'PATCH'
12
+ HEAD = 'HEAD'
13
+
14
+
15
+ from hercules.internal.schema import register_schema
16
+ register_schema(HttpMethod, "HTTP_METHOD")
@@ -0,0 +1,11 @@
1
+ from __future__ import annotations
2
+
3
+ from pydantic import RootModel
4
+
5
+
6
+ class HttpPayload(RootModel[str]):
7
+ root: str
8
+
9
+
10
+ from hercules.internal.schema import register_schema
11
+ register_schema(HttpPayload, "HTTP_PAYLOAD")
@@ -0,0 +1,19 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from pydantic import BaseModel, ConfigDict
6
+
7
+
8
+ class HttpRequest(BaseModel):
9
+ model_config = ConfigDict(
10
+ extra='forbid',
11
+ )
12
+ http_method: Any
13
+ url: Any
14
+ payload: Any
15
+ headers: Any
16
+
17
+
18
+ from hercules.internal.schema import register_schema
19
+ register_schema(HttpRequest, "HTTP_REQUEST")
@@ -0,0 +1,18 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from pydantic import BaseModel, ConfigDict
6
+
7
+
8
+ class HttpResponse(BaseModel):
9
+ model_config = ConfigDict(
10
+ extra='forbid',
11
+ )
12
+ payload: Any
13
+ headers: Any
14
+ http_status_code: Any
15
+
16
+
17
+ from hercules.internal.schema import register_schema
18
+ register_schema(HttpResponse, "HTTP_RESPONSE")
@@ -0,0 +1,31 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, Literal
4
+
5
+ from pydantic import RootModel
6
+
7
+
8
+ class HttpSchema(
9
+ RootModel[
10
+ Literal['application/json']
11
+ | Literal['application/xml']
12
+ | Literal['text/plain']
13
+ | Literal['text/csv']
14
+ | str
15
+ | Any
16
+ | None
17
+ ]
18
+ ):
19
+ root: (
20
+ Literal['application/json']
21
+ | Literal['application/xml']
22
+ | Literal['text/plain']
23
+ | Literal['text/csv']
24
+ | str
25
+ | Any
26
+ | None
27
+ )
28
+
29
+
30
+ from hercules.internal.schema import register_schema
31
+ register_schema(HttpSchema, "HTTP_SCHEMA")
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from pydantic import RootModel
6
+
7
+
8
+ class HttpStatusCode(RootModel[Any]):
9
+ root: Any
10
+
11
+
12
+ from hercules.internal.schema import register_schema
13
+ register_schema(HttpStatusCode, "HTTP_STATUS_CODE")
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from pydantic import RootModel
6
+
7
+
8
+ class HttpUrl(RootModel[Any]):
9
+ root: Any
10
+
11
+
12
+ from hercules.internal.schema import register_schema
13
+ register_schema(HttpUrl, "HTTP_URL")
@@ -0,0 +1,26 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import ThrowsError, Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("http::request::send")
9
+ @Signature("<A extends HTTP_AUTH_TYPE, S extends HTTP_SCHEMA>(http_method: HTTP_METHOD, url: HTTP_URL, http_auth: A, http_auth_value: HTTP_AUTH_VALUE<A>, http_auth_place: HTTP_AUTH_PLACE<A>, http_schema: S, payload: HTTP_PAYLOAD<S>, headers?: OBJECT<{}>): HTTP_RESPONSE<any>")
10
+ @Name({"code": "en-US", "content": "Send HTTP request"})
11
+ @Description({"code": "en-US", "content": "Sends a request to the specified url with the given method, headers and payload, and returns the response as an HTTP_RESPONSE object. This function initiates an HTTP request to a specified endpoint, allowing you to interact with web services or APIs by sending data and receiving responses."})
12
+ @DisplayMessage({"code": "en-US", "content": "Send request to ${url} with ${payload}"})
13
+ @Alias({"code": "en-US", "content": "send;sends;execute;request;http"})
14
+ @DisplayIcon("tabler:world-www")
15
+ @ThrowsError()
16
+ @Parameter({"runtime_name": "http_method", "name": [{"code": "en-US", "content": "HTTP Method"}], "description": [{"code": "en-US", "content": "Defines the HTTP method to be used, such as GET, POST, PUT, or DELETE."}]})
17
+ @Parameter({"runtime_name": "url", "name": [{"code": "en-US", "content": "Request URL"}], "description": [{"code": "en-US", "content": "Specifies the endpoint address, including protocol, host, path, and query parameters, where the request is directed."}]})
18
+ @Parameter({"runtime_name": "http_auth", "name": [{"code": "en-US", "content": "Auth Type"}], "description": [{"code": "en-US", "content": "Specifies the authentication variant to use, such as Bearer, Basic, X-API-Key, or a custom scheme. Use undefined to send the request without authentication."}]})
19
+ @Parameter({"runtime_name": "http_auth_value", "name": [{"code": "en-US", "content": "Auth Value"}], "description": [{"code": "en-US", "content": "Provides the credentials for the selected authentication type. For Basic auth, supply an object with username and password; for all other types, provide a token or key string."}]})
20
+ @Parameter({"runtime_name": "http_auth_place", "name": [{"code": "en-US", "content": "Auth Placement"}], "description": [{"code": "en-US", "content": "Defines where the authentication credentials are attached to the request. Bearer and Basic auth always use Header; custom schemes can be placed in the Header or as a URL query parameter."}]})
21
+ @Parameter({"runtime_name": "http_schema", "name": [{"code": "en-US", "content": "Content Type"}], "description": [{"code": "en-US", "content": "Specifies the MIME type of the request payload, such as application/json, application/xml, or text/plain. This determines the expected format of the payload parameter."}]})
22
+ @Parameter({"runtime_name": "payload", "name": [{"code": "en-US", "content": "Request Payload"}], "description": [{"code": "en-US", "content": "Contains the request payload. For application/json the value must be an OBJECT, for all other content types a plain string is expected."}]})
23
+ @Parameter({"runtime_name": "headers", "name": [{"code": "en-US", "content": "HTTP Headers"}], "description": [{"code": "en-US", "content": "An optional collection of key-value pairs containing additional request metadata such as custom headers."}]})
24
+ class HttpRequestSend(RuntimeFunctionRunnable):
25
+ def run(self, *args):
26
+ raise NotImplementedError("HttpRequestSend.run() is not implemented")
File without changes
@@ -0,0 +1,13 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+
5
+ from pydantic import RootModel
6
+
7
+
8
+ class List(RootModel[list[Any]]):
9
+ root: list[Any]
10
+
11
+
12
+ from hercules.internal.schema import register_schema
13
+ register_schema(List, "LIST")
@@ -0,0 +1,20 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import ThrowsError, Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::at")
9
+ @Signature("<T>(list: LIST<T>, index: NUMBER): T")
10
+ @Name({"code": "en-US", "content": "Get Element of List"})
11
+ @Description({"code": "en-US", "content": "Retrieves the element at a specified index from a list."})
12
+ @DisplayMessage({"code": "en-US", "content": "Get element at ${index} of ${list}"})
13
+ @Alias({"code": "en-US", "content": "at;array;list;collection;std;index"})
14
+ @DisplayIcon("tabler:list")
15
+ @ThrowsError()
16
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list from which to retrieve an element."}]})
17
+ @Parameter({"runtime_name": "index", "name": [{"code": "en-US", "content": "Index"}], "description": [{"code": "en-US", "content": "The zero-based index of the element to retrieve."}]})
18
+ class StdListAt(RuntimeFunctionRunnable):
19
+ def run(self, *args):
20
+ raise NotImplementedError("StdListAt.run() is not implemented")
@@ -0,0 +1,20 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import ThrowsError, Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::concat")
9
+ @Signature("<T>(first: LIST<T>, second: LIST<T>): LIST<T>")
10
+ @Name({"code": "en-US", "content": "Combine Lists"})
11
+ @Description({"code": "en-US", "content": "Concatenates/combine two lists into a single list."})
12
+ @DisplayMessage({"code": "en-US", "content": "Combine ${first} with ${second}"})
13
+ @Alias({"code": "en-US", "content": "concat;combine;join;append;array;list;collection;std"})
14
+ @DisplayIcon("tabler:list")
15
+ @ThrowsError()
16
+ @Parameter({"runtime_name": "first", "name": [{"code": "en-US", "content": "First List"}], "description": [{"code": "en-US", "content": "The first list to concatenate."}]})
17
+ @Parameter({"runtime_name": "second", "name": [{"code": "en-US", "content": "Second List"}], "description": [{"code": "en-US", "content": "The second list to concatenate."}]})
18
+ class StdListConcat(RuntimeFunctionRunnable):
19
+ def run(self, *args):
20
+ raise NotImplementedError("StdListConcat.run() is not implemented")
@@ -0,0 +1,19 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::filter")
9
+ @Signature("<T>(list: LIST<T>, predicate: PREDICATE<T>): LIST<T>")
10
+ @Name({"code": "en-US", "content": "Filter List"})
11
+ @Description({"code": "en-US", "content": "Returns a new list containing only the elements from the input list for which the predicate returns true."})
12
+ @DisplayMessage({"code": "en-US", "content": "Filter elements in ${list} matching ${predicate}"})
13
+ @Alias({"code": "en-US", "content": "filter;array;list;collection;std"})
14
+ @DisplayIcon("tabler:arrow-iteration")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list to be filtered."}]})
16
+ @Parameter({"runtime_name": "predicate", "name": [{"code": "en-US", "content": "Filter Predicate"}], "description": [{"code": "en-US", "content": "A function that takes an element of the list and returns a boolean indicating whether the element should be included in the output list."}]})
17
+ class StdListFilter(RuntimeFunctionRunnable):
18
+ def run(self, *args):
19
+ raise NotImplementedError("StdListFilter.run() is not implemented")
@@ -0,0 +1,20 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import ThrowsError, Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::find")
9
+ @Signature("<T>(list: LIST<T>, predicate: PREDICATE<T>): T")
10
+ @Name({"code": "en-US", "content": "Find Element in List"})
11
+ @Description({"code": "en-US", "content": "Returns the first element from the input list for which the predicate returns true. If no element matches, returns null."})
12
+ @DisplayMessage({"code": "en-US", "content": "Find first element in ${list} matching ${predicate}"})
13
+ @Alias({"code": "en-US", "content": "find;array;list;collection;std"})
14
+ @DisplayIcon("tabler:arrow-iteration")
15
+ @ThrowsError()
16
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list in which an element satisfying the predicate will be searched."}]})
17
+ @Parameter({"runtime_name": "predicate", "name": [{"code": "en-US", "content": "Search Predicate"}], "description": [{"code": "en-US", "content": "A function that takes an element of the list and returns a boolean indicating if the element matches the search criteria."}]})
18
+ class StdListFind(RuntimeFunctionRunnable):
19
+ def run(self, *args):
20
+ raise NotImplementedError("StdListFind.run() is not implemented")
@@ -0,0 +1,19 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::find_index")
9
+ @Signature("<T>(list: LIST<T>, predicate: PREDICATE<T>): NUMBER")
10
+ @Name({"code": "en-US", "content": "Find Index of Element in List"})
11
+ @Description({"code": "en-US", "content": "Returns the zero-based index of the first element for which the predicate returns true. If no element matches, returns -1."})
12
+ @DisplayMessage({"code": "en-US", "content": "Index of Element in ${list} matching ${predicate}"})
13
+ @Alias({"code": "en-US", "content": "find index;index of;position;array;list;collection;std;find;index"})
14
+ @DisplayIcon("tabler:arrow-iteration")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list in which to find the index of an element that satisfies the predicate."}]})
16
+ @Parameter({"runtime_name": "predicate", "name": [{"code": "en-US", "content": "Search Predicate"}], "description": [{"code": "en-US", "content": "A function that takes an element of the list and returns a boolean indicating if the element satisfies the search criteria."}]})
17
+ class StdListFindIndex(RuntimeFunctionRunnable):
18
+ def run(self, *args):
19
+ raise NotImplementedError("StdListFindIndex.run() is not implemented")
@@ -0,0 +1,20 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import ThrowsError, Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::find_last")
9
+ @Signature("<T>(list: LIST<T>, predicate: PREDICATE<T>): T")
10
+ @Name({"code": "en-US", "content": "Find Last Element in List"})
11
+ @Description({"code": "en-US", "content": "Returns the last element from the input list for which the predicate returns true. If no element matches, returns null or equivalent."})
12
+ @DisplayMessage({"code": "en-US", "content": "Last Element of ${list} matching ${predicate}"})
13
+ @Alias({"code": "en-US", "content": "find last;last index;last position;array;list;collection;std;find;last"})
14
+ @DisplayIcon("tabler:arrow-iteration")
15
+ @ThrowsError()
16
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list in which an element satisfying the predicate will be searched."}]})
17
+ @Parameter({"runtime_name": "predicate", "name": [{"code": "en-US", "content": "Search Predicate"}], "description": [{"code": "en-US", "content": "A function that takes an element of the list and returns a boolean indicating if the element matches the search criteria."}]})
18
+ class StdListFindLast(RuntimeFunctionRunnable):
19
+ def run(self, *args):
20
+ raise NotImplementedError("StdListFindLast.run() is not implemented")
@@ -0,0 +1,18 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::first")
9
+ @Signature("<T>(list: LIST<T>): T")
10
+ @Name({"code": "en-US", "content": "First Element of List"})
11
+ @Description({"code": "en-US", "content": "Retrieves the first element from the list."})
12
+ @DisplayMessage({"code": "en-US", "content": "Get First Element in ${list}"})
13
+ @Alias({"code": "en-US", "content": "first;array;list;collection;std"})
14
+ @DisplayIcon("tabler:list")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list from which to retrieve the first element."}]})
16
+ class StdListFirst(RuntimeFunctionRunnable):
17
+ def run(self, *args):
18
+ raise NotImplementedError("StdListFirst.run() is not implemented")
@@ -0,0 +1,18 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::flat")
9
+ @Signature("<T>(list: LIST<LIST<T>>): LIST<T>")
10
+ @Name({"code": "en-US", "content": "Flatten List"})
11
+ @Description({"code": "en-US", "content": "Flattens a nested list into a single-level list."})
12
+ @DisplayMessage({"code": "en-US", "content": "Flatten ${list}"})
13
+ @Alias({"code": "en-US", "content": "flat;array;list;collection;std"})
14
+ @DisplayIcon("tabler:list")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Nested List"}], "description": [{"code": "en-US", "content": "A list containing sub-lists that will be flattened into a single-level list."}]})
16
+ class StdListFlat(RuntimeFunctionRunnable):
17
+ def run(self, *args):
18
+ raise NotImplementedError("StdListFlat.run() is not implemented")
@@ -0,0 +1,19 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::for_each")
9
+ @Signature("<T>(list: LIST<T>, consumer: CONSUMER<T>): void")
10
+ @Name({"code": "en-US", "content": "For Each Element"})
11
+ @Description({"code": "en-US", "content": "Executes a consumer function for each element in the list."})
12
+ @DisplayMessage({"code": "en-US", "content": "For each in ${list} do ${consumer}"})
13
+ @Alias({"code": "en-US", "content": "for_each;array;list;collection;std;for;each"})
14
+ @DisplayIcon("tabler:arrow-iteration")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "Each element of this list will be passed to the provided consumer function for processing."}]})
16
+ @Parameter({"runtime_name": "consumer", "name": [{"code": "en-US", "content": "Consumer Function"}], "description": [{"code": "en-US", "content": "This function is invoked once for each element in the list. It is not expected to return a value."}]})
17
+ class StdListForEach(RuntimeFunctionRunnable):
18
+ def run(self, *args):
19
+ raise NotImplementedError("StdListForEach.run() is not implemented")
@@ -0,0 +1,19 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::index_of")
9
+ @Signature("<T>(list: LIST<T>, item: T): NUMBER")
10
+ @Name({"code": "en-US", "content": "Index of Item"})
11
+ @Description({"code": "en-US", "content": "Returns the zero-based index of the first occurrence of a given item in the specified list. If the item is not found, it typically returns -1."})
12
+ @DisplayMessage({"code": "en-US", "content": "Get Index of ${item} in ${list}"})
13
+ @Alias({"code": "en-US", "content": "index_of;array;list;collection;std;index;of"})
14
+ @DisplayIcon("tabler:list")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "List"}], "description": [{"code": "en-US", "content": "A list of elements in which the specified item will be searched for to determine its index."}]})
16
+ @Parameter({"runtime_name": "item", "name": [{"code": "en-US", "content": "Item"}], "description": [{"code": "en-US", "content": "The item for which the function searches in the list and returns the index of its first occurrence."}]})
17
+ class StdListIndexOf(RuntimeFunctionRunnable):
18
+ def run(self, *args):
19
+ raise NotImplementedError("StdListIndexOf.run() is not implemented")
@@ -0,0 +1,18 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::is_empty")
9
+ @Signature("<T>(list: LIST<T>): BOOLEAN")
10
+ @Name({"code": "en-US", "content": "Is List Empty"})
11
+ @Description({"code": "en-US", "content": "Returns true if the list contains no elements, otherwise returns false."})
12
+ @DisplayMessage({"code": "en-US", "content": "Check if ${list} is empty"})
13
+ @Alias({"code": "en-US", "content": "is_empty;array;list;collection;std;is;empty"})
14
+ @DisplayIcon("tabler:list")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "List"}], "description": [{"code": "en-US", "content": "The list to check for emptiness."}]})
16
+ class StdListIsEmpty(RuntimeFunctionRunnable):
17
+ def run(self, *args):
18
+ raise NotImplementedError("StdListIsEmpty.run() is not implemented")
@@ -0,0 +1,19 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::join")
9
+ @Signature("(list: LIST<TEXT>, join_text: TEXT): TEXT")
10
+ @Name({"code": "en-US", "content": "Join Text List"})
11
+ @Description({"code": "en-US", "content": "Returns a single concatenated string of text joined by the provided join text."})
12
+ @DisplayMessage({"code": "en-US", "content": "Joins ${list} using '${join_text}'"})
13
+ @Alias({"code": "en-US", "content": "join;array;list;collection;std"})
14
+ @DisplayIcon("tabler:list")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "List of Text"}], "description": [{"code": "en-US", "content": "A list of text elements to combined into a single word."}]})
16
+ @Parameter({"runtime_name": "join_text", "name": [{"code": "en-US", "content": "Join Text"}], "description": [{"code": "en-US", "content": "The text that will be used to join the list elements into a single string."}]})
17
+ class StdListJoin(RuntimeFunctionRunnable):
18
+ def run(self, *args):
19
+ raise NotImplementedError("StdListJoin.run() is not implemented")
@@ -0,0 +1,18 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::last")
9
+ @Signature("<T>(list: LIST<T>): T")
10
+ @Name({"code": "en-US", "content": "Last Element of List"})
11
+ @Description({"code": "en-US", "content": "Retrieves the last element from the list."})
12
+ @DisplayMessage({"code": "en-US", "content": "Get Last Element of ${list}"})
13
+ @Alias({"code": "en-US", "content": "last;array;list;collection;std"})
14
+ @DisplayIcon("tabler:list")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "The list from which to retrieve the last element."}]})
16
+ class StdListLast(RuntimeFunctionRunnable):
17
+ def run(self, *args):
18
+ raise NotImplementedError("StdListLast.run() is not implemented")
@@ -0,0 +1,19 @@
1
+ from hercules.models.runtime_function import RuntimeFunctionRunnable
2
+ from hercules.decorators.meta import Alias, Description, DisplayIcon, DisplayMessage, Identifier, Name, Signature
3
+ from hercules.decorators.runtime_function import OmitRuntimeFunction
4
+ from hercules.decorators.function import Parameter
5
+
6
+
7
+ @OmitRuntimeFunction()
8
+ @Identifier("std::list::map")
9
+ @Signature("<T, R>(list: LIST<T>, transform: TRANSFORM<T, R>): LIST<R>")
10
+ @Name({"code": "en-US", "content": "Map List"})
11
+ @Description({"code": "en-US", "content": "Transforms each element in the list using the provided function. This will create a new list of new elements which will be returned."})
12
+ @DisplayMessage({"code": "en-US", "content": "Apply ${transform} for each in ${list}"})
13
+ @Alias({"code": "en-US", "content": "map;array;list;collection;std"})
14
+ @DisplayIcon("tabler:arrow-iteration")
15
+ @Parameter({"runtime_name": "list", "name": [{"code": "en-US", "content": "Input List"}], "description": [{"code": "en-US", "content": "Each element of this list will be passed through the transform function."}]})
16
+ @Parameter({"runtime_name": "transform", "name": [{"code": "en-US", "content": "Transform Function"}], "description": [{"code": "en-US", "content": "The transform function is applied to every element of the list to produce a new list."}]})
17
+ class StdListMap(RuntimeFunctionRunnable):
18
+ def run(self, *args):
19
+ raise NotImplementedError("StdListMap.run() is not implemented")