@contember/engine-actions 2.1.0-alpha.37 → 2.1.0-alpha.39

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 (513) hide show
  1. package/dist/development/index.cjs +118 -0
  2. package/dist/development/index.cjs.map +1 -0
  3. package/dist/development/index.js +118 -0
  4. package/dist/development/index.js.map +1 -0
  5. package/dist/development/src/ActionsExecutionContainerHookFactory.cjs +42 -0
  6. package/dist/development/src/ActionsExecutionContainerHookFactory.cjs.map +1 -0
  7. package/dist/development/src/ActionsExecutionContainerHookFactory.js +42 -0
  8. package/dist/development/src/ActionsExecutionContainerHookFactory.js.map +1 -0
  9. package/dist/development/src/ImplementationException.cjs +6 -0
  10. package/dist/development/src/ImplementationException.cjs.map +1 -0
  11. package/dist/development/src/ImplementationException.js +6 -0
  12. package/dist/development/src/ImplementationException.js.map +1 -0
  13. package/dist/development/src/ListenerStoreProvider.cjs +25 -0
  14. package/dist/development/src/ListenerStoreProvider.cjs.map +1 -0
  15. package/dist/development/src/ListenerStoreProvider.js +25 -0
  16. package/dist/development/src/ListenerStoreProvider.js.map +1 -0
  17. package/dist/development/src/authorization/ActionsAuthorizationActions.cjs +17 -0
  18. package/dist/development/src/authorization/ActionsAuthorizationActions.cjs.map +1 -0
  19. package/dist/development/src/authorization/ActionsAuthorizationActions.js +18 -0
  20. package/dist/development/src/authorization/ActionsAuthorizationActions.js.map +1 -0
  21. package/dist/development/src/authorization/ActionsPermissionsFactory.cjs +16 -0
  22. package/dist/development/src/authorization/ActionsPermissionsFactory.cjs.map +1 -0
  23. package/dist/development/src/authorization/ActionsPermissionsFactory.js +16 -0
  24. package/dist/development/src/authorization/ActionsPermissionsFactory.js.map +1 -0
  25. package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs +127 -0
  26. package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -0
  27. package/dist/development/src/dispatch/DispatchWorkerSupervisor.js +127 -0
  28. package/dist/development/src/dispatch/DispatchWorkerSupervisor.js.map +1 -0
  29. package/dist/development/src/dispatch/EventDispatcher.cjs +43 -0
  30. package/dist/development/src/dispatch/EventDispatcher.cjs.map +1 -0
  31. package/dist/development/src/dispatch/EventDispatcher.js +43 -0
  32. package/dist/development/src/dispatch/EventDispatcher.js.map +1 -0
  33. package/dist/development/src/dispatch/EventsRepository.cjs +122 -0
  34. package/dist/development/src/dispatch/EventsRepository.cjs.map +1 -0
  35. package/dist/development/src/dispatch/EventsRepository.js +122 -0
  36. package/dist/development/src/dispatch/EventsRepository.js.map +1 -0
  37. package/dist/development/src/dispatch/ProjectDispatcher.cjs +99 -0
  38. package/dist/development/src/dispatch/ProjectDispatcher.cjs.map +1 -0
  39. package/dist/development/src/dispatch/ProjectDispatcher.js +99 -0
  40. package/dist/development/src/dispatch/ProjectDispatcher.js.map +1 -0
  41. package/dist/development/src/dispatch/TargetHandlerResolver.cjs +16 -0
  42. package/dist/development/src/dispatch/TargetHandlerResolver.cjs.map +1 -0
  43. package/dist/development/src/dispatch/TargetHandlerResolver.js +16 -0
  44. package/dist/development/src/dispatch/TargetHandlerResolver.js.map +1 -0
  45. package/dist/development/src/dispatch/WebhookFetcher.cjs +16 -0
  46. package/dist/development/src/dispatch/WebhookFetcher.cjs.map +1 -0
  47. package/dist/development/src/dispatch/WebhookFetcher.js +16 -0
  48. package/dist/development/src/dispatch/WebhookFetcher.js.map +1 -0
  49. package/dist/development/src/dispatch/WebhookTargetHandler.cjs +198 -0
  50. package/dist/development/src/dispatch/WebhookTargetHandler.cjs.map +1 -0
  51. package/dist/development/src/dispatch/WebhookTargetHandler.js +181 -0
  52. package/dist/development/src/dispatch/WebhookTargetHandler.js.map +1 -0
  53. package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs +39 -0
  54. package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -0
  55. package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js +39 -0
  56. package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -0
  57. package/dist/development/src/graphql/http/ActionsContextResolver.cjs +36 -0
  58. package/dist/development/src/graphql/http/ActionsContextResolver.cjs.map +1 -0
  59. package/dist/development/src/graphql/http/ActionsContextResolver.js +36 -0
  60. package/dist/development/src/graphql/http/ActionsContextResolver.js.map +1 -0
  61. package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +20 -0
  62. package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -0
  63. package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js +20 -0
  64. package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -0
  65. package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs +152 -0
  66. package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -0
  67. package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js +135 -0
  68. package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -0
  69. package/dist/development/src/graphql/resolvers/ResolversFactory.cjs +36 -0
  70. package/dist/development/src/graphql/resolvers/ResolversFactory.cjs.map +1 -0
  71. package/dist/development/src/graphql/resolvers/ResolversFactory.js +36 -0
  72. package/dist/development/src/graphql/resolvers/ResolversFactory.js.map +1 -0
  73. package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +19 -0
  74. package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -0
  75. package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +19 -0
  76. package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -0
  77. package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs +21 -0
  78. package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs.map +1 -0
  79. package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.js +21 -0
  80. package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.js.map +1 -0
  81. package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +19 -0
  82. package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +1 -0
  83. package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +19 -0
  84. package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -0
  85. package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs +19 -0
  86. package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs.map +1 -0
  87. package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.js +19 -0
  88. package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.js.map +1 -0
  89. package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs +61 -0
  90. package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -0
  91. package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js +61 -0
  92. package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -0
  93. package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs +19 -0
  94. package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -0
  95. package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js +19 -0
  96. package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -0
  97. package/dist/development/src/graphql/schema/actions.graphql.cjs +107 -0
  98. package/dist/development/src/graphql/schema/actions.graphql.cjs.map +1 -0
  99. package/dist/development/src/graphql/schema/actions.graphql.js +107 -0
  100. package/dist/development/src/graphql/schema/actions.graphql.js.map +1 -0
  101. package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs +16 -0
  102. package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -0
  103. package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js +17 -0
  104. package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -0
  105. package/dist/development/src/migrations/2025-05-28-160000-action-event-user.cjs +16 -0
  106. package/dist/development/src/migrations/2025-05-28-160000-action-event-user.cjs.map +1 -0
  107. package/dist/development/src/migrations/2025-05-28-160000-action-event-user.js +17 -0
  108. package/dist/development/src/migrations/2025-05-28-160000-action-event-user.js.map +1 -0
  109. package/dist/development/src/migrations/index.cjs +12 -0
  110. package/dist/development/src/migrations/index.cjs.map +1 -0
  111. package/dist/development/src/migrations/index.js +12 -0
  112. package/dist/development/src/migrations/index.js.map +1 -0
  113. package/dist/development/src/migrations/snapshot.cjs +51 -0
  114. package/dist/development/src/migrations/snapshot.cjs.map +1 -0
  115. package/dist/development/src/migrations/snapshot.js +52 -0
  116. package/dist/development/src/migrations/snapshot.js.map +1 -0
  117. package/dist/development/src/model/EventByIdQuery.cjs +17 -0
  118. package/dist/development/src/model/EventByIdQuery.cjs.map +1 -0
  119. package/dist/development/src/model/EventByIdQuery.js +17 -0
  120. package/dist/development/src/model/EventByIdQuery.js.map +1 -0
  121. package/dist/development/src/model/EventsInProcessingQuery.cjs +14 -0
  122. package/dist/development/src/model/EventsInProcessingQuery.cjs.map +1 -0
  123. package/dist/development/src/model/EventsInProcessingQuery.js +14 -0
  124. package/dist/development/src/model/EventsInProcessingQuery.js.map +1 -0
  125. package/dist/development/src/model/EventsToProcessQuery.cjs +15 -0
  126. package/dist/development/src/model/EventsToProcessQuery.cjs.map +1 -0
  127. package/dist/development/src/model/EventsToProcessQuery.js +15 -0
  128. package/dist/development/src/model/EventsToProcessQuery.js.map +1 -0
  129. package/dist/development/src/model/EventsToProcessSpecification.cjs +8 -0
  130. package/dist/development/src/model/EventsToProcessSpecification.cjs.map +1 -0
  131. package/dist/development/src/model/EventsToProcessSpecification.js +8 -0
  132. package/dist/development/src/model/EventsToProcessSpecification.js.map +1 -0
  133. package/dist/development/src/model/FailedEventsQuery.cjs +14 -0
  134. package/dist/development/src/model/FailedEventsQuery.cjs.map +1 -0
  135. package/dist/development/src/model/FailedEventsQuery.js +14 -0
  136. package/dist/development/src/model/FailedEventsQuery.js.map +1 -0
  137. package/dist/development/src/model/SetVariableCommand.cjs +21 -0
  138. package/dist/development/src/model/SetVariableCommand.cjs.map +1 -0
  139. package/dist/development/src/model/SetVariableCommand.js +21 -0
  140. package/dist/development/src/model/SetVariableCommand.js.map +1 -0
  141. package/dist/development/src/model/VariablesManager.cjs +41 -0
  142. package/dist/development/src/model/VariablesManager.cjs.map +1 -0
  143. package/dist/development/src/model/VariablesManager.js +41 -0
  144. package/dist/development/src/model/VariablesManager.js.map +1 -0
  145. package/dist/development/src/model/VariablesQuery.cjs +10 -0
  146. package/dist/development/src/model/VariablesQuery.cjs.map +1 -0
  147. package/dist/development/src/model/VariablesQuery.js +10 -0
  148. package/dist/development/src/model/VariablesQuery.js.map +1 -0
  149. package/dist/development/src/triggers/TriggerHandler.cjs +129 -0
  150. package/dist/development/src/triggers/TriggerHandler.cjs.map +1 -0
  151. package/dist/development/src/triggers/TriggerHandler.js +129 -0
  152. package/dist/development/src/triggers/TriggerHandler.js.map +1 -0
  153. package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs +63 -0
  154. package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -0
  155. package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js +63 -0
  156. package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -0
  157. package/dist/development/src/triggers/TriggerListenersBuilder.cjs +169 -0
  158. package/dist/development/src/triggers/TriggerListenersBuilder.cjs.map +1 -0
  159. package/dist/development/src/triggers/TriggerListenersBuilder.js +169 -0
  160. package/dist/development/src/triggers/TriggerListenersBuilder.js.map +1 -0
  161. package/dist/development/src/triggers/TriggerListenersFactory.cjs +17 -0
  162. package/dist/development/src/triggers/TriggerListenersFactory.cjs.map +1 -0
  163. package/dist/development/src/triggers/TriggerListenersFactory.js +17 -0
  164. package/dist/development/src/triggers/TriggerListenersFactory.js.map +1 -0
  165. package/dist/development/src/triggers/TriggerListenersStore.cjs +24 -0
  166. package/dist/development/src/triggers/TriggerListenersStore.cjs.map +1 -0
  167. package/dist/development/src/triggers/TriggerListenersStore.js +24 -0
  168. package/dist/development/src/triggers/TriggerListenersStore.js.map +1 -0
  169. package/dist/development/src/triggers/TriggerPayloadBuilder.cjs +163 -0
  170. package/dist/development/src/triggers/TriggerPayloadBuilder.cjs.map +1 -0
  171. package/dist/development/src/triggers/TriggerPayloadBuilder.js +163 -0
  172. package/dist/development/src/triggers/TriggerPayloadBuilder.js.map +1 -0
  173. package/dist/development/src/triggers/TriggerPayloadManager.cjs +27 -0
  174. package/dist/development/src/triggers/TriggerPayloadManager.cjs.map +1 -0
  175. package/dist/development/src/triggers/TriggerPayloadManager.js +27 -0
  176. package/dist/development/src/triggers/TriggerPayloadManager.js.map +1 -0
  177. package/dist/development/src/triggers/TriggerPayloadPersister.cjs +47 -0
  178. package/dist/development/src/triggers/TriggerPayloadPersister.cjs.map +1 -0
  179. package/dist/development/src/triggers/TriggerPayloadPersister.js +47 -0
  180. package/dist/development/src/triggers/TriggerPayloadPersister.js.map +1 -0
  181. package/dist/development/src/utils/assertNever.cjs +7 -0
  182. package/dist/development/src/utils/assertNever.cjs.map +1 -0
  183. package/dist/development/src/utils/assertNever.js +7 -0
  184. package/dist/development/src/utils/assertNever.js.map +1 -0
  185. package/dist/development/src/utils/map.cjs +13 -0
  186. package/dist/development/src/utils/map.cjs.map +1 -0
  187. package/dist/development/src/utils/map.js +13 -0
  188. package/dist/development/src/utils/map.js.map +1 -0
  189. package/dist/development/src/utils/notifyChannel.cjs +9 -0
  190. package/dist/development/src/utils/notifyChannel.cjs.map +1 -0
  191. package/dist/development/src/utils/notifyChannel.js +9 -0
  192. package/dist/development/src/utils/notifyChannel.js.map +1 -0
  193. package/dist/production/index.cjs +118 -0
  194. package/dist/production/index.cjs.map +1 -0
  195. package/dist/production/index.js +118 -0
  196. package/dist/production/index.js.map +1 -0
  197. package/dist/production/src/ActionsExecutionContainerHookFactory.cjs +42 -0
  198. package/dist/production/src/ActionsExecutionContainerHookFactory.cjs.map +1 -0
  199. package/dist/production/src/ActionsExecutionContainerHookFactory.js +42 -0
  200. package/dist/production/src/ActionsExecutionContainerHookFactory.js.map +1 -0
  201. package/dist/production/src/ImplementationException.cjs +6 -0
  202. package/dist/production/src/ImplementationException.cjs.map +1 -0
  203. package/dist/production/src/ImplementationException.js +6 -0
  204. package/dist/production/src/ImplementationException.js.map +1 -0
  205. package/dist/production/src/ListenerStoreProvider.cjs +25 -0
  206. package/dist/production/src/ListenerStoreProvider.cjs.map +1 -0
  207. package/dist/production/src/ListenerStoreProvider.js +25 -0
  208. package/dist/production/src/ListenerStoreProvider.js.map +1 -0
  209. package/dist/production/src/authorization/ActionsAuthorizationActions.cjs +17 -0
  210. package/dist/production/src/authorization/ActionsAuthorizationActions.cjs.map +1 -0
  211. package/dist/production/src/authorization/ActionsAuthorizationActions.js +18 -0
  212. package/dist/production/src/authorization/ActionsAuthorizationActions.js.map +1 -0
  213. package/dist/production/src/authorization/ActionsPermissionsFactory.cjs +16 -0
  214. package/dist/production/src/authorization/ActionsPermissionsFactory.cjs.map +1 -0
  215. package/dist/production/src/authorization/ActionsPermissionsFactory.js +16 -0
  216. package/dist/production/src/authorization/ActionsPermissionsFactory.js.map +1 -0
  217. package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs +127 -0
  218. package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -0
  219. package/dist/production/src/dispatch/DispatchWorkerSupervisor.js +127 -0
  220. package/dist/production/src/dispatch/DispatchWorkerSupervisor.js.map +1 -0
  221. package/dist/production/src/dispatch/EventDispatcher.cjs +43 -0
  222. package/dist/production/src/dispatch/EventDispatcher.cjs.map +1 -0
  223. package/dist/production/src/dispatch/EventDispatcher.js +43 -0
  224. package/dist/production/src/dispatch/EventDispatcher.js.map +1 -0
  225. package/dist/production/src/dispatch/EventsRepository.cjs +122 -0
  226. package/dist/production/src/dispatch/EventsRepository.cjs.map +1 -0
  227. package/dist/production/src/dispatch/EventsRepository.js +122 -0
  228. package/dist/production/src/dispatch/EventsRepository.js.map +1 -0
  229. package/dist/production/src/dispatch/ProjectDispatcher.cjs +99 -0
  230. package/dist/production/src/dispatch/ProjectDispatcher.cjs.map +1 -0
  231. package/dist/production/src/dispatch/ProjectDispatcher.js +99 -0
  232. package/dist/production/src/dispatch/ProjectDispatcher.js.map +1 -0
  233. package/dist/production/src/dispatch/TargetHandlerResolver.cjs +16 -0
  234. package/dist/production/src/dispatch/TargetHandlerResolver.cjs.map +1 -0
  235. package/dist/production/src/dispatch/TargetHandlerResolver.js +16 -0
  236. package/dist/production/src/dispatch/TargetHandlerResolver.js.map +1 -0
  237. package/dist/production/src/dispatch/WebhookFetcher.cjs +16 -0
  238. package/dist/production/src/dispatch/WebhookFetcher.cjs.map +1 -0
  239. package/dist/production/src/dispatch/WebhookFetcher.js +16 -0
  240. package/dist/production/src/dispatch/WebhookFetcher.js.map +1 -0
  241. package/dist/production/src/dispatch/WebhookTargetHandler.cjs +198 -0
  242. package/dist/production/src/dispatch/WebhookTargetHandler.cjs.map +1 -0
  243. package/dist/production/src/dispatch/WebhookTargetHandler.js +181 -0
  244. package/dist/production/src/dispatch/WebhookTargetHandler.js.map +1 -0
  245. package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs +39 -0
  246. package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -0
  247. package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js +39 -0
  248. package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -0
  249. package/dist/production/src/graphql/http/ActionsContextResolver.cjs +36 -0
  250. package/dist/production/src/graphql/http/ActionsContextResolver.cjs.map +1 -0
  251. package/dist/production/src/graphql/http/ActionsContextResolver.js +36 -0
  252. package/dist/production/src/graphql/http/ActionsContextResolver.js.map +1 -0
  253. package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +20 -0
  254. package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -0
  255. package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js +20 -0
  256. package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -0
  257. package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs +152 -0
  258. package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -0
  259. package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js +135 -0
  260. package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -0
  261. package/dist/production/src/graphql/resolvers/ResolversFactory.cjs +36 -0
  262. package/dist/production/src/graphql/resolvers/ResolversFactory.cjs.map +1 -0
  263. package/dist/production/src/graphql/resolvers/ResolversFactory.js +36 -0
  264. package/dist/production/src/graphql/resolvers/ResolversFactory.js.map +1 -0
  265. package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +19 -0
  266. package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -0
  267. package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +19 -0
  268. package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -0
  269. package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs +21 -0
  270. package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs.map +1 -0
  271. package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.js +21 -0
  272. package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.js.map +1 -0
  273. package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +19 -0
  274. package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +1 -0
  275. package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +19 -0
  276. package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -0
  277. package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs +19 -0
  278. package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs.map +1 -0
  279. package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.js +19 -0
  280. package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.js.map +1 -0
  281. package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs +61 -0
  282. package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -0
  283. package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js +61 -0
  284. package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -0
  285. package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs +19 -0
  286. package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -0
  287. package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js +19 -0
  288. package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -0
  289. package/dist/production/src/graphql/schema/actions.graphql.cjs +107 -0
  290. package/dist/production/src/graphql/schema/actions.graphql.cjs.map +1 -0
  291. package/dist/production/src/graphql/schema/actions.graphql.js +107 -0
  292. package/dist/production/src/graphql/schema/actions.graphql.js.map +1 -0
  293. package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs +16 -0
  294. package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -0
  295. package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js +17 -0
  296. package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -0
  297. package/dist/production/src/migrations/2025-05-28-160000-action-event-user.cjs +16 -0
  298. package/dist/production/src/migrations/2025-05-28-160000-action-event-user.cjs.map +1 -0
  299. package/dist/production/src/migrations/2025-05-28-160000-action-event-user.js +17 -0
  300. package/dist/production/src/migrations/2025-05-28-160000-action-event-user.js.map +1 -0
  301. package/dist/production/src/migrations/index.cjs +12 -0
  302. package/dist/production/src/migrations/index.cjs.map +1 -0
  303. package/dist/production/src/migrations/index.js +12 -0
  304. package/dist/production/src/migrations/index.js.map +1 -0
  305. package/dist/production/src/migrations/snapshot.cjs +51 -0
  306. package/dist/production/src/migrations/snapshot.cjs.map +1 -0
  307. package/dist/production/src/migrations/snapshot.js +52 -0
  308. package/dist/production/src/migrations/snapshot.js.map +1 -0
  309. package/dist/production/src/model/EventByIdQuery.cjs +17 -0
  310. package/dist/production/src/model/EventByIdQuery.cjs.map +1 -0
  311. package/dist/production/src/model/EventByIdQuery.js +17 -0
  312. package/dist/production/src/model/EventByIdQuery.js.map +1 -0
  313. package/dist/production/src/model/EventsInProcessingQuery.cjs +14 -0
  314. package/dist/production/src/model/EventsInProcessingQuery.cjs.map +1 -0
  315. package/dist/production/src/model/EventsInProcessingQuery.js +14 -0
  316. package/dist/production/src/model/EventsInProcessingQuery.js.map +1 -0
  317. package/dist/production/src/model/EventsToProcessQuery.cjs +15 -0
  318. package/dist/production/src/model/EventsToProcessQuery.cjs.map +1 -0
  319. package/dist/production/src/model/EventsToProcessQuery.js +15 -0
  320. package/dist/production/src/model/EventsToProcessQuery.js.map +1 -0
  321. package/dist/production/src/model/EventsToProcessSpecification.cjs +8 -0
  322. package/dist/production/src/model/EventsToProcessSpecification.cjs.map +1 -0
  323. package/dist/production/src/model/EventsToProcessSpecification.js +8 -0
  324. package/dist/production/src/model/EventsToProcessSpecification.js.map +1 -0
  325. package/dist/production/src/model/FailedEventsQuery.cjs +14 -0
  326. package/dist/production/src/model/FailedEventsQuery.cjs.map +1 -0
  327. package/dist/production/src/model/FailedEventsQuery.js +14 -0
  328. package/dist/production/src/model/FailedEventsQuery.js.map +1 -0
  329. package/dist/production/src/model/SetVariableCommand.cjs +21 -0
  330. package/dist/production/src/model/SetVariableCommand.cjs.map +1 -0
  331. package/dist/production/src/model/SetVariableCommand.js +21 -0
  332. package/dist/production/src/model/SetVariableCommand.js.map +1 -0
  333. package/dist/production/src/model/VariablesManager.cjs +41 -0
  334. package/dist/production/src/model/VariablesManager.cjs.map +1 -0
  335. package/dist/production/src/model/VariablesManager.js +41 -0
  336. package/dist/production/src/model/VariablesManager.js.map +1 -0
  337. package/dist/production/src/model/VariablesQuery.cjs +10 -0
  338. package/dist/production/src/model/VariablesQuery.cjs.map +1 -0
  339. package/dist/production/src/model/VariablesQuery.js +10 -0
  340. package/dist/production/src/model/VariablesQuery.js.map +1 -0
  341. package/dist/production/src/triggers/TriggerHandler.cjs +129 -0
  342. package/dist/production/src/triggers/TriggerHandler.cjs.map +1 -0
  343. package/dist/production/src/triggers/TriggerHandler.js +129 -0
  344. package/dist/production/src/triggers/TriggerHandler.js.map +1 -0
  345. package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs +63 -0
  346. package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -0
  347. package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js +63 -0
  348. package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -0
  349. package/dist/production/src/triggers/TriggerListenersBuilder.cjs +169 -0
  350. package/dist/production/src/triggers/TriggerListenersBuilder.cjs.map +1 -0
  351. package/dist/production/src/triggers/TriggerListenersBuilder.js +169 -0
  352. package/dist/production/src/triggers/TriggerListenersBuilder.js.map +1 -0
  353. package/dist/production/src/triggers/TriggerListenersFactory.cjs +17 -0
  354. package/dist/production/src/triggers/TriggerListenersFactory.cjs.map +1 -0
  355. package/dist/production/src/triggers/TriggerListenersFactory.js +17 -0
  356. package/dist/production/src/triggers/TriggerListenersFactory.js.map +1 -0
  357. package/dist/production/src/triggers/TriggerListenersStore.cjs +24 -0
  358. package/dist/production/src/triggers/TriggerListenersStore.cjs.map +1 -0
  359. package/dist/production/src/triggers/TriggerListenersStore.js +24 -0
  360. package/dist/production/src/triggers/TriggerListenersStore.js.map +1 -0
  361. package/dist/production/src/triggers/TriggerPayloadBuilder.cjs +163 -0
  362. package/dist/production/src/triggers/TriggerPayloadBuilder.cjs.map +1 -0
  363. package/dist/production/src/triggers/TriggerPayloadBuilder.js +163 -0
  364. package/dist/production/src/triggers/TriggerPayloadBuilder.js.map +1 -0
  365. package/dist/production/src/triggers/TriggerPayloadManager.cjs +27 -0
  366. package/dist/production/src/triggers/TriggerPayloadManager.cjs.map +1 -0
  367. package/dist/production/src/triggers/TriggerPayloadManager.js +27 -0
  368. package/dist/production/src/triggers/TriggerPayloadManager.js.map +1 -0
  369. package/dist/production/src/triggers/TriggerPayloadPersister.cjs +47 -0
  370. package/dist/production/src/triggers/TriggerPayloadPersister.cjs.map +1 -0
  371. package/dist/production/src/triggers/TriggerPayloadPersister.js +47 -0
  372. package/dist/production/src/triggers/TriggerPayloadPersister.js.map +1 -0
  373. package/dist/production/src/utils/assertNever.cjs +7 -0
  374. package/dist/production/src/utils/assertNever.cjs.map +1 -0
  375. package/dist/production/src/utils/assertNever.js +7 -0
  376. package/dist/production/src/utils/assertNever.js.map +1 -0
  377. package/dist/production/src/utils/map.cjs +13 -0
  378. package/dist/production/src/utils/map.cjs.map +1 -0
  379. package/dist/production/src/utils/map.js +13 -0
  380. package/dist/production/src/utils/map.js.map +1 -0
  381. package/dist/production/src/utils/notifyChannel.cjs +9 -0
  382. package/dist/production/src/utils/notifyChannel.cjs.map +1 -0
  383. package/dist/production/src/utils/notifyChannel.js +9 -0
  384. package/dist/production/src/utils/notifyChannel.js.map +1 -0
  385. package/dist/tests/cases/unit/generator.test.d.ts +2 -0
  386. package/dist/tests/cases/unit/generator.test.d.ts.map +1 -0
  387. package/dist/tests/cases/unit/webhookHandler.test.d.ts +2 -0
  388. package/dist/tests/cases/unit/webhookHandler.test.d.ts.map +1 -0
  389. package/dist/tests/src/gql.d.ts +2 -0
  390. package/dist/tests/src/gql.d.ts.map +1 -0
  391. package/dist/tests/src/uuid.d.ts +3 -0
  392. package/dist/tests/src/uuid.d.ts.map +1 -0
  393. package/dist/tests/tsconfig.tsbuildinfo +1 -0
  394. package/dist/types/ActionsExecutionContainerHookFactory.d.ts +8 -0
  395. package/dist/types/ActionsExecutionContainerHookFactory.d.ts.map +1 -0
  396. package/dist/types/ImplementationException.d.ts +3 -0
  397. package/dist/types/ImplementationException.d.ts.map +1 -0
  398. package/dist/types/ListenerStoreProvider.d.ts +7 -0
  399. package/dist/types/ListenerStoreProvider.d.ts.map +1 -0
  400. package/dist/types/authorization/ActionsAuthorizationActions.d.ts +38 -0
  401. package/dist/types/authorization/ActionsAuthorizationActions.d.ts.map +1 -0
  402. package/dist/types/authorization/ActionsPermissionsFactory.d.ts +5 -0
  403. package/dist/types/authorization/ActionsPermissionsFactory.d.ts.map +1 -0
  404. package/dist/types/authorization/Identity.d.ts +5 -0
  405. package/dist/types/authorization/Identity.d.ts.map +1 -0
  406. package/dist/types/authorization/index.d.ts +4 -0
  407. package/dist/types/authorization/index.d.ts.map +1 -0
  408. package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts +17 -0
  409. package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts.map +1 -0
  410. package/dist/types/dispatch/EventDispatcher.d.ts +25 -0
  411. package/dist/types/dispatch/EventDispatcher.d.ts.map +1 -0
  412. package/dist/types/dispatch/EventsRepository.d.ts +23 -0
  413. package/dist/types/dispatch/EventsRepository.d.ts.map +1 -0
  414. package/dist/types/dispatch/ProjectDispatcher.d.ts +22 -0
  415. package/dist/types/dispatch/ProjectDispatcher.d.ts.map +1 -0
  416. package/dist/types/dispatch/TargetHandlerResolver.d.ts +9 -0
  417. package/dist/types/dispatch/TargetHandlerResolver.d.ts.map +1 -0
  418. package/dist/types/dispatch/WebhookFetcher.d.ts +14 -0
  419. package/dist/types/dispatch/WebhookFetcher.d.ts.map +1 -0
  420. package/dist/types/dispatch/WebhookTargetHandler.d.ts +16 -0
  421. package/dist/types/dispatch/WebhookTargetHandler.d.ts.map +1 -0
  422. package/dist/types/dispatch/types.d.ts +27 -0
  423. package/dist/types/dispatch/types.d.ts.map +1 -0
  424. package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts +13 -0
  425. package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts.map +1 -0
  426. package/dist/types/graphql/http/ActionsContextResolver.d.ts +14 -0
  427. package/dist/types/graphql/http/ActionsContextResolver.d.ts.map +1 -0
  428. package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts +8 -0
  429. package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts.map +1 -0
  430. package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts +11 -0
  431. package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts.map +1 -0
  432. package/dist/types/graphql/resolvers/ActionsContext.d.ts +14 -0
  433. package/dist/types/graphql/resolvers/ActionsContext.d.ts.map +1 -0
  434. package/dist/types/graphql/resolvers/ResolversFactory.d.ts +15 -0
  435. package/dist/types/graphql/resolvers/ResolversFactory.d.ts.map +1 -0
  436. package/dist/types/graphql/resolvers/index.d.ts +3 -0
  437. package/dist/types/graphql/resolvers/index.d.ts.map +1 -0
  438. package/dist/types/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts +11 -0
  439. package/dist/types/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts.map +1 -0
  440. package/dist/types/graphql/resolvers/mutation/RetryEventMutationResolver.d.ts +11 -0
  441. package/dist/types/graphql/resolvers/mutation/RetryEventMutationResolver.d.ts.map +1 -0
  442. package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts +11 -0
  443. package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts.map +1 -0
  444. package/dist/types/graphql/resolvers/mutation/StopEventMutationResolver.d.ts +11 -0
  445. package/dist/types/graphql/resolvers/mutation/StopEventMutationResolver.d.ts.map +1 -0
  446. package/dist/types/graphql/resolvers/mutation/index.d.ts +5 -0
  447. package/dist/types/graphql/resolvers/mutation/index.d.ts.map +1 -0
  448. package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts +14 -0
  449. package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts.map +1 -0
  450. package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts +12 -0
  451. package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts.map +1 -0
  452. package/dist/types/graphql/resolvers/query/index.d.ts +2 -0
  453. package/dist/types/graphql/resolvers/query/index.d.ts.map +1 -0
  454. package/dist/types/graphql/schema/actions.graphql.d.ts +3 -0
  455. package/dist/types/graphql/schema/actions.graphql.d.ts.map +1 -0
  456. package/dist/types/graphql/schema/index.d.ts +299 -0
  457. package/dist/types/graphql/schema/index.d.ts.map +1 -0
  458. package/dist/types/index.d.ts +13 -0
  459. package/dist/types/index.d.ts.map +1 -0
  460. package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts +3 -0
  461. package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts.map +1 -0
  462. package/dist/types/migrations/2025-05-28-160000-action-event-user.d.ts +3 -0
  463. package/dist/types/migrations/2025-05-28-160000-action-event-user.d.ts.map +1 -0
  464. package/dist/types/migrations/index.d.ts +3 -0
  465. package/dist/types/migrations/index.d.ts.map +1 -0
  466. package/dist/types/migrations/snapshot.d.ts +3 -0
  467. package/dist/types/migrations/snapshot.d.ts.map +1 -0
  468. package/dist/types/model/EventByIdQuery.d.ts +8 -0
  469. package/dist/types/model/EventByIdQuery.d.ts.map +1 -0
  470. package/dist/types/model/EventsInProcessingQuery.d.ts +9 -0
  471. package/dist/types/model/EventsInProcessingQuery.d.ts.map +1 -0
  472. package/dist/types/model/EventsToProcessQuery.d.ts +9 -0
  473. package/dist/types/model/EventsToProcessQuery.d.ts.map +1 -0
  474. package/dist/types/model/EventsToProcessSpecification.d.ts +4 -0
  475. package/dist/types/model/EventsToProcessSpecification.d.ts.map +1 -0
  476. package/dist/types/model/FailedEventsQuery.d.ts +9 -0
  477. package/dist/types/model/FailedEventsQuery.d.ts.map +1 -0
  478. package/dist/types/model/SetVariableCommand.d.ts +8 -0
  479. package/dist/types/model/SetVariableCommand.d.ts.map +1 -0
  480. package/dist/types/model/VariablesManager.d.ts +8 -0
  481. package/dist/types/model/VariablesManager.d.ts.map +1 -0
  482. package/dist/types/model/VariablesQuery.d.ts +12 -0
  483. package/dist/types/model/VariablesQuery.d.ts.map +1 -0
  484. package/dist/types/model/types.d.ts +22 -0
  485. package/dist/types/model/types.d.ts.map +1 -0
  486. package/dist/types/triggers/TriggerHandler.d.ts +26 -0
  487. package/dist/types/triggers/TriggerHandler.d.ts.map +1 -0
  488. package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts +19 -0
  489. package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts.map +1 -0
  490. package/dist/types/triggers/TriggerListeners.d.ts +9 -0
  491. package/dist/types/triggers/TriggerListeners.d.ts.map +1 -0
  492. package/dist/types/triggers/TriggerListenersBuilder.d.ts +15 -0
  493. package/dist/types/triggers/TriggerListenersBuilder.d.ts.map +1 -0
  494. package/dist/types/triggers/TriggerListenersFactory.d.ts +8 -0
  495. package/dist/types/triggers/TriggerListenersFactory.d.ts.map +1 -0
  496. package/dist/types/triggers/TriggerListenersStore.d.ts +48 -0
  497. package/dist/types/triggers/TriggerListenersStore.d.ts.map +1 -0
  498. package/dist/types/triggers/TriggerPayloadBuilder.d.ts +14 -0
  499. package/dist/types/triggers/TriggerPayloadBuilder.d.ts.map +1 -0
  500. package/dist/types/triggers/TriggerPayloadManager.d.ts +22 -0
  501. package/dist/types/triggers/TriggerPayloadManager.d.ts.map +1 -0
  502. package/dist/types/triggers/TriggerPayloadPersister.d.ts +21 -0
  503. package/dist/types/triggers/TriggerPayloadPersister.d.ts.map +1 -0
  504. package/dist/types/triggers/index.d.ts +8 -0
  505. package/dist/types/triggers/index.d.ts.map +1 -0
  506. package/dist/types/tsconfig.tsbuildinfo +1 -0
  507. package/dist/types/utils/assertNever.d.ts +2 -0
  508. package/dist/types/utils/assertNever.d.ts.map +1 -0
  509. package/dist/types/utils/map.d.ts +2 -0
  510. package/dist/types/utils/map.d.ts.map +1 -0
  511. package/dist/types/utils/notifyChannel.d.ts +4 -0
  512. package/dist/types/utils/notifyChannel.d.ts.map +1 -0
  513. package/package.json +22 -22
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariablesQueryResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/VariablesQueryResolver.ts"],"sourcesContent":["import { QueryResolvers } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { VariablesManager } from '../../../model/VariablesManager'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class VariablesQueryResolver implements QueryResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly variablesManager: VariablesManager,\n\t) {\n\t}\n\n\tasync variables(parent: unknown, args: unknown, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_VIEW)\n\n\t\treturn Object.entries(await this.variablesManager.fetchVariables(ctx.db)).map(([name, value]) => ({\n\t\t\tname,\n\t\t\tvalue,\n\t\t}))\n\t}\n}\n"],"names":["ActionsAuthorizationActions"],"mappings":";;;;;AAKO,MAAM,uBAAiE;AAAA,EAC7E,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EAEA,MAAM,UAAU,QAAiB,MAAe,KAAqB;AACpE,UAAM,IAAI,cAAcA,4BAAAA,4BAA4B,cAAc;AAElE,WAAO,OAAO,QAAQ,MAAM,KAAK,iBAAiB,eAAe,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO;AAAA,MACjG;AAAA,MACA;AAAA,IAAA,EACC;AAAA,EACH;AACD;;"}
@@ -0,0 +1,19 @@
1
+ import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
2
+ import "@contember/authorization";
3
+ import "@contember/schema";
4
+ class VariablesQueryResolver {
5
+ constructor(variablesManager) {
6
+ this.variablesManager = variablesManager;
7
+ }
8
+ async variables(parent, args, ctx) {
9
+ await ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_VIEW);
10
+ return Object.entries(await this.variablesManager.fetchVariables(ctx.db)).map(([name, value]) => ({
11
+ name,
12
+ value
13
+ }));
14
+ }
15
+ }
16
+ export {
17
+ VariablesQueryResolver
18
+ };
19
+ //# sourceMappingURL=VariablesQueryResolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariablesQueryResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/VariablesQueryResolver.ts"],"sourcesContent":["import { QueryResolvers } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { VariablesManager } from '../../../model/VariablesManager'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class VariablesQueryResolver implements QueryResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly variablesManager: VariablesManager,\n\t) {\n\t}\n\n\tasync variables(parent: unknown, args: unknown, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_VIEW)\n\n\t\treturn Object.entries(await this.variablesManager.fetchVariables(ctx.db)).map(([name, value]) => ({\n\t\t\tname,\n\t\t\tvalue,\n\t\t}))\n\t}\n}\n"],"names":[],"mappings":";;;AAKO,MAAM,uBAAiE;AAAA,EAC7E,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EAEA,MAAM,UAAU,QAAiB,MAAe,KAAqB;AACpE,UAAM,IAAI,cAAc,4BAA4B,cAAc;AAElE,WAAO,OAAO,QAAQ,MAAM,KAAK,iBAAiB,eAAe,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO;AAAA,MACjG;AAAA,MACA;AAAA,IAAA,EACC;AAAA,EACH;AACD;"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const graphqlTag = require("graphql-tag");
4
+ const schema = graphqlTag.gql`
5
+ scalar DateTime
6
+ scalar Json
7
+ scalar Uuid
8
+
9
+ schema {
10
+ query: Query
11
+ mutation: Mutation
12
+ }
13
+
14
+ type Query {
15
+ failedEvents(args: EventArgs): [Event!]!
16
+ eventsToProcess(args: EventArgs): [Event!]!
17
+ eventsInProcessing(args: EventArgs): [Event!]!
18
+ event(id: Uuid!): Event
19
+ variables: [Variable!]!
20
+ }
21
+
22
+ type Mutation {
23
+ processBatch: ProcessBatchResponse!
24
+ retryEvent(id: Uuid!): RetryEventResponse!
25
+ stopEvent(id: Uuid!): StopEventResponse!
26
+ setVariables(args: SetVariablesArgs!): SetVariablesResponse!
27
+ }
28
+
29
+ input EventArgs {
30
+ offset: Int
31
+ "Max 10000"
32
+ limit: Int
33
+ }
34
+
35
+ type Event {
36
+ id: Uuid!
37
+ transactionId: Uuid!
38
+ identityId: Uuid
39
+ ipAddress: String
40
+ userAgent: String
41
+ createdAt: DateTime!
42
+ lastStateChange: DateTime!
43
+ resolvedAt: DateTime
44
+ visibleAt: DateTime
45
+ numRetries: Int!
46
+ state: EventState!
47
+ stage: String!
48
+ target: String!
49
+ payload: Json!
50
+ log: Json!
51
+ }
52
+
53
+ enum EventState {
54
+ created
55
+ retrying
56
+ processing
57
+ succeed
58
+ failed
59
+ stopped
60
+ }
61
+
62
+ type ProcessBatchResponse {
63
+ ok: Boolean!
64
+ }
65
+
66
+ type RetryEventResponse {
67
+ ok: Boolean!
68
+ }
69
+
70
+ type StopEventResponse {
71
+ ok: Boolean!
72
+ }
73
+
74
+ input SetVariablesArgs {
75
+ variables: [VariableInput!]!
76
+ mode: SetVariablesMode
77
+ }
78
+
79
+ """
80
+ Defines how it handles original variables.
81
+ - MERGE merges with new values (default behaviour)
82
+ - SET replaces all variables
83
+ - APPEND_ONLY_MISSING appends values if not already exist
84
+ """
85
+ enum SetVariablesMode {
86
+ MERGE
87
+ SET
88
+ APPEND_ONLY_MISSING
89
+ }
90
+
91
+ input VariableInput {
92
+ name: String!
93
+ value: String!
94
+ }
95
+
96
+ type SetVariablesResponse {
97
+ ok: Boolean!
98
+ }
99
+
100
+ type Variable {
101
+ name: String!
102
+ value: String!
103
+ }
104
+
105
+ `;
106
+ exports.schema = schema;
107
+ //# sourceMappingURL=actions.graphql.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.graphql.cjs","sources":["../../../../../../packages/engine-actions/src/graphql/schema/actions.graphql.ts"],"sourcesContent":["import { gql } from 'graphql-tag'\nimport { DocumentNode } from 'graphql'\n\nexport const schema: DocumentNode = gql`\n scalar DateTime\n scalar Json\n scalar Uuid\n\n schema {\n query: Query\n mutation: Mutation\n }\n\n type Query {\n failedEvents(args: EventArgs): [Event!]!\n eventsToProcess(args: EventArgs): [Event!]!\n eventsInProcessing(args: EventArgs): [Event!]!\n event(id: Uuid!): Event\n variables: [Variable!]!\n }\n\n type Mutation {\n processBatch: ProcessBatchResponse!\n retryEvent(id: Uuid!): RetryEventResponse!\n stopEvent(id: Uuid!): StopEventResponse!\n setVariables(args: SetVariablesArgs!): SetVariablesResponse!\n }\n\n input EventArgs {\n offset: Int\n \"Max 10000\"\n limit: Int\n }\n\n type Event {\n id: Uuid!\n transactionId: Uuid!\n identityId: Uuid\n ipAddress: String\n userAgent: String\n createdAt: DateTime!\n lastStateChange: DateTime!\n resolvedAt: DateTime\n visibleAt: DateTime\n numRetries: Int!\n state: EventState!\n stage: String!\n target: String!\n payload: Json!\n log: Json!\n }\n\n enum EventState {\n created\n retrying\n processing\n succeed\n failed\n stopped\n }\n\n type ProcessBatchResponse {\n ok: Boolean!\n }\n\n type RetryEventResponse {\n ok: Boolean!\n }\n\n type StopEventResponse {\n ok: Boolean!\n }\n\n input SetVariablesArgs {\n variables: [VariableInput!]!\n mode: SetVariablesMode\n }\n\n\t\"\"\"\n\tDefines how it handles original variables.\n\t- MERGE merges with new values (default behaviour)\n\t- SET replaces all variables\n\t- APPEND_ONLY_MISSING appends values if not already exist\n\t\"\"\"\n\tenum SetVariablesMode {\n\t\tMERGE\n\t\tSET\n\t\tAPPEND_ONLY_MISSING\n\t}\n\n input VariableInput {\n name: String!\n value: String!\n }\n\n\ttype SetVariablesResponse {\n\t\tok: Boolean!\n\t}\n\n type Variable {\n name: String!\n value: String!\n }\n\n`\n"],"names":["gql"],"mappings":";;;AAGO,MAAM,SAAuBA,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;;"}
@@ -0,0 +1,107 @@
1
+ import { gql } from "graphql-tag";
2
+ const schema = gql`
3
+ scalar DateTime
4
+ scalar Json
5
+ scalar Uuid
6
+
7
+ schema {
8
+ query: Query
9
+ mutation: Mutation
10
+ }
11
+
12
+ type Query {
13
+ failedEvents(args: EventArgs): [Event!]!
14
+ eventsToProcess(args: EventArgs): [Event!]!
15
+ eventsInProcessing(args: EventArgs): [Event!]!
16
+ event(id: Uuid!): Event
17
+ variables: [Variable!]!
18
+ }
19
+
20
+ type Mutation {
21
+ processBatch: ProcessBatchResponse!
22
+ retryEvent(id: Uuid!): RetryEventResponse!
23
+ stopEvent(id: Uuid!): StopEventResponse!
24
+ setVariables(args: SetVariablesArgs!): SetVariablesResponse!
25
+ }
26
+
27
+ input EventArgs {
28
+ offset: Int
29
+ "Max 10000"
30
+ limit: Int
31
+ }
32
+
33
+ type Event {
34
+ id: Uuid!
35
+ transactionId: Uuid!
36
+ identityId: Uuid
37
+ ipAddress: String
38
+ userAgent: String
39
+ createdAt: DateTime!
40
+ lastStateChange: DateTime!
41
+ resolvedAt: DateTime
42
+ visibleAt: DateTime
43
+ numRetries: Int!
44
+ state: EventState!
45
+ stage: String!
46
+ target: String!
47
+ payload: Json!
48
+ log: Json!
49
+ }
50
+
51
+ enum EventState {
52
+ created
53
+ retrying
54
+ processing
55
+ succeed
56
+ failed
57
+ stopped
58
+ }
59
+
60
+ type ProcessBatchResponse {
61
+ ok: Boolean!
62
+ }
63
+
64
+ type RetryEventResponse {
65
+ ok: Boolean!
66
+ }
67
+
68
+ type StopEventResponse {
69
+ ok: Boolean!
70
+ }
71
+
72
+ input SetVariablesArgs {
73
+ variables: [VariableInput!]!
74
+ mode: SetVariablesMode
75
+ }
76
+
77
+ """
78
+ Defines how it handles original variables.
79
+ - MERGE merges with new values (default behaviour)
80
+ - SET replaces all variables
81
+ - APPEND_ONLY_MISSING appends values if not already exist
82
+ """
83
+ enum SetVariablesMode {
84
+ MERGE
85
+ SET
86
+ APPEND_ONLY_MISSING
87
+ }
88
+
89
+ input VariableInput {
90
+ name: String!
91
+ value: String!
92
+ }
93
+
94
+ type SetVariablesResponse {
95
+ ok: Boolean!
96
+ }
97
+
98
+ type Variable {
99
+ name: String!
100
+ value: String!
101
+ }
102
+
103
+ `;
104
+ export {
105
+ schema
106
+ };
107
+ //# sourceMappingURL=actions.graphql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.graphql.js","sources":["../../../../../../packages/engine-actions/src/graphql/schema/actions.graphql.ts"],"sourcesContent":["import { gql } from 'graphql-tag'\nimport { DocumentNode } from 'graphql'\n\nexport const schema: DocumentNode = gql`\n scalar DateTime\n scalar Json\n scalar Uuid\n\n schema {\n query: Query\n mutation: Mutation\n }\n\n type Query {\n failedEvents(args: EventArgs): [Event!]!\n eventsToProcess(args: EventArgs): [Event!]!\n eventsInProcessing(args: EventArgs): [Event!]!\n event(id: Uuid!): Event\n variables: [Variable!]!\n }\n\n type Mutation {\n processBatch: ProcessBatchResponse!\n retryEvent(id: Uuid!): RetryEventResponse!\n stopEvent(id: Uuid!): StopEventResponse!\n setVariables(args: SetVariablesArgs!): SetVariablesResponse!\n }\n\n input EventArgs {\n offset: Int\n \"Max 10000\"\n limit: Int\n }\n\n type Event {\n id: Uuid!\n transactionId: Uuid!\n identityId: Uuid\n ipAddress: String\n userAgent: String\n createdAt: DateTime!\n lastStateChange: DateTime!\n resolvedAt: DateTime\n visibleAt: DateTime\n numRetries: Int!\n state: EventState!\n stage: String!\n target: String!\n payload: Json!\n log: Json!\n }\n\n enum EventState {\n created\n retrying\n processing\n succeed\n failed\n stopped\n }\n\n type ProcessBatchResponse {\n ok: Boolean!\n }\n\n type RetryEventResponse {\n ok: Boolean!\n }\n\n type StopEventResponse {\n ok: Boolean!\n }\n\n input SetVariablesArgs {\n variables: [VariableInput!]!\n mode: SetVariablesMode\n }\n\n\t\"\"\"\n\tDefines how it handles original variables.\n\t- MERGE merges with new values (default behaviour)\n\t- SET replaces all variables\n\t- APPEND_ONLY_MISSING appends values if not already exist\n\t\"\"\"\n\tenum SetVariablesMode {\n\t\tMERGE\n\t\tSET\n\t\tAPPEND_ONLY_MISSING\n\t}\n\n input VariableInput {\n name: String!\n value: String!\n }\n\n\ttype SetVariablesResponse {\n\t\tok: Boolean!\n\t}\n\n type Variable {\n name: String!\n value: String!\n }\n\n`\n"],"names":[],"mappings":";AAGO,MAAM,SAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ const sql = `
3
+ CREATE TABLE actions_variable
4
+ (
5
+ id UUID PRIMARY KEY NOT NULL,
6
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
7
+ updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
8
+ name TEXT NOT NULL UNIQUE,
9
+ value TEXT NOT NULL
10
+ )
11
+ `;
12
+ async function _20230310145000actionsvariables(builder) {
13
+ builder.sql(sql);
14
+ }
15
+ module.exports = _20230310145000actionsvariables;
16
+ //# sourceMappingURL=2023-03-10-145000-actions-variables.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2023-03-10-145000-actions-variables.cjs","sources":["../../../../../packages/engine-actions/src/migrations/2023-03-10-145000-actions-variables.ts"],"sourcesContent":["import { MigrationBuilder } from '@contember/database-migrations'\n\nconst sql = `\n CREATE TABLE actions_variable\n (\n id UUID PRIMARY KEY NOT NULL,\n created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n name TEXT NOT NULL UNIQUE,\n value TEXT NOT NULL\n )\n`\n\nexport default async function(builder: MigrationBuilder) {\n\tbuilder.sql(sql)\n}\n"],"names":[],"mappings":";AAEA,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWZ,eAAA,gCAA8B,SAA2B;AACxD,UAAQ,IAAI,GAAG;AAChB;;"}
@@ -0,0 +1,17 @@
1
+ const sql = `
2
+ CREATE TABLE actions_variable
3
+ (
4
+ id UUID PRIMARY KEY NOT NULL,
5
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
6
+ updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
7
+ name TEXT NOT NULL UNIQUE,
8
+ value TEXT NOT NULL
9
+ )
10
+ `;
11
+ async function _20230310145000actionsvariables(builder) {
12
+ builder.sql(sql);
13
+ }
14
+ export {
15
+ _20230310145000actionsvariables as default
16
+ };
17
+ //# sourceMappingURL=2023-03-10-145000-actions-variables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2023-03-10-145000-actions-variables.js","sources":["../../../../../packages/engine-actions/src/migrations/2023-03-10-145000-actions-variables.ts"],"sourcesContent":["import { MigrationBuilder } from '@contember/database-migrations'\n\nconst sql = `\n CREATE TABLE actions_variable\n (\n id UUID PRIMARY KEY NOT NULL,\n created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n name TEXT NOT NULL UNIQUE,\n value TEXT NOT NULL\n )\n`\n\nexport default async function(builder: MigrationBuilder) {\n\tbuilder.sql(sql)\n}\n"],"names":[],"mappings":"AAEA,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWZ,eAAA,gCAA8B,SAA2B;AACxD,UAAQ,IAAI,GAAG;AAChB;"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ const sql = `
3
+ ALTER TABLE actions_event
4
+ ADD COLUMN IF NOT EXISTS identity_id UUID DEFAULT NULL;
5
+
6
+ ALTER TABLE actions_event
7
+ ADD COLUMN IF NOT EXISTS ip_address INET DEFAULT NULL;
8
+
9
+ ALTER TABLE actions_event
10
+ ADD COLUMN IF NOT EXISTS user_agent TEXT DEFAULT NULL;
11
+ `;
12
+ async function _20250528160000actioneventuser(builder) {
13
+ builder.sql(sql);
14
+ }
15
+ module.exports = _20250528160000actioneventuser;
16
+ //# sourceMappingURL=2025-05-28-160000-action-event-user.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2025-05-28-160000-action-event-user.cjs","sources":["../../../../../packages/engine-actions/src/migrations/2025-05-28-160000-action-event-user.ts"],"sourcesContent":["import { MigrationBuilder } from '@contember/database-migrations'\n\nconst sql = `\nALTER TABLE actions_event\nADD COLUMN IF NOT EXISTS identity_id UUID DEFAULT NULL;\n\nALTER TABLE actions_event\nADD COLUMN IF NOT EXISTS ip_address INET DEFAULT NULL;\n\nALTER TABLE actions_event\nADD COLUMN IF NOT EXISTS user_agent TEXT DEFAULT NULL;\n`\n\nexport default async function(builder: MigrationBuilder) {\n\tbuilder.sql(sql)\n}\n"],"names":[],"mappings":";AAEA,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWZ,eAAA,+BAA8B,SAA2B;AACxD,UAAQ,IAAI,GAAG;AAChB;;"}
@@ -0,0 +1,17 @@
1
+ const sql = `
2
+ ALTER TABLE actions_event
3
+ ADD COLUMN IF NOT EXISTS identity_id UUID DEFAULT NULL;
4
+
5
+ ALTER TABLE actions_event
6
+ ADD COLUMN IF NOT EXISTS ip_address INET DEFAULT NULL;
7
+
8
+ ALTER TABLE actions_event
9
+ ADD COLUMN IF NOT EXISTS user_agent TEXT DEFAULT NULL;
10
+ `;
11
+ async function _20250528160000actioneventuser(builder) {
12
+ builder.sql(sql);
13
+ }
14
+ export {
15
+ _20250528160000actioneventuser as default
16
+ };
17
+ //# sourceMappingURL=2025-05-28-160000-action-event-user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2025-05-28-160000-action-event-user.js","sources":["../../../../../packages/engine-actions/src/migrations/2025-05-28-160000-action-event-user.ts"],"sourcesContent":["import { MigrationBuilder } from '@contember/database-migrations'\n\nconst sql = `\nALTER TABLE actions_event\nADD COLUMN IF NOT EXISTS identity_id UUID DEFAULT NULL;\n\nALTER TABLE actions_event\nADD COLUMN IF NOT EXISTS ip_address INET DEFAULT NULL;\n\nALTER TABLE actions_event\nADD COLUMN IF NOT EXISTS user_agent TEXT DEFAULT NULL;\n`\n\nexport default async function(builder: MigrationBuilder) {\n\tbuilder.sql(sql)\n}\n"],"names":[],"mappings":"AAEA,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWZ,eAAA,+BAA8B,SAA2B;AACxD,UAAQ,IAAI,GAAG;AAChB;"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const snapshot = require("./snapshot.cjs");
4
+ const databaseMigrations = require("@contember/database-migrations");
5
+ const _20230310145000ActionsVariables = require("./2023-03-10-145000-actions-variables.cjs");
6
+ const _20250528160000ActionEventUser = require("./2025-05-28-160000-action-event-user.cjs");
7
+ const migrationsGroup = new databaseMigrations.MigrationGroup(snapshot, {
8
+ "2023-03-10-145000-actions-variables": _20230310145000ActionsVariables,
9
+ "2025-05-28-160000-action-event-user": _20250528160000ActionEventUser
10
+ });
11
+ exports.migrationsGroup = migrationsGroup;
12
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../packages/engine-actions/src/migrations/index.ts"],"sourcesContent":["import snapshot from './snapshot'\nimport { MigrationGroup } from '@contember/database-migrations'\nimport _20230310145000actionsvariables from './2023-03-10-145000-actions-variables'\nimport _20250528160000actioneventuser from './2025-05-28-160000-action-event-user'\n\nexport const migrationsGroup = new MigrationGroup(snapshot, {\n\t'2023-03-10-145000-actions-variables': _20230310145000actionsvariables,\n\t'2025-05-28-160000-action-event-user': _20250528160000actioneventuser,\n})\n"],"names":["MigrationGroup","_20230310145000actionsvariables","_20250528160000actioneventuser"],"mappings":";;;;;;AAKO,MAAM,kBAAkB,IAAIA,mBAAAA,eAAe,UAAU;AAAA,EAC3D,uCAAuCC;AAAAA,EACvC,uCAAuCC;AACxC,CAAC;;"}
@@ -0,0 +1,12 @@
1
+ import snapshot from "./snapshot.js";
2
+ import { MigrationGroup } from "@contember/database-migrations";
3
+ import _20230310145000actionsvariables from "./2023-03-10-145000-actions-variables.js";
4
+ import _20250528160000actioneventuser from "./2025-05-28-160000-action-event-user.js";
5
+ const migrationsGroup = new MigrationGroup(snapshot, {
6
+ "2023-03-10-145000-actions-variables": _20230310145000actionsvariables,
7
+ "2025-05-28-160000-action-event-user": _20250528160000actioneventuser
8
+ });
9
+ export {
10
+ migrationsGroup
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../packages/engine-actions/src/migrations/index.ts"],"sourcesContent":["import snapshot from './snapshot'\nimport { MigrationGroup } from '@contember/database-migrations'\nimport _20230310145000actionsvariables from './2023-03-10-145000-actions-variables'\nimport _20250528160000actioneventuser from './2025-05-28-160000-action-event-user'\n\nexport const migrationsGroup = new MigrationGroup(snapshot, {\n\t'2023-03-10-145000-actions-variables': _20230310145000actionsvariables,\n\t'2025-05-28-160000-action-event-user': _20250528160000actioneventuser,\n})\n"],"names":[],"mappings":";;;;AAKO,MAAM,kBAAkB,IAAI,eAAe,UAAU;AAAA,EAC3D,uCAAuC;AAAA,EACvC,uCAAuC;AACxC,CAAC;"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ async function snapshot(builder) {
3
+ builder.sql(`
4
+ CREATE TYPE ACTIONS_TRIGGER_STATE AS ENUM (
5
+ 'created' ,
6
+ 'retrying',
7
+ 'processing',
8
+ 'succeed',
9
+ 'failed',
10
+ 'stopped'
11
+ );
12
+
13
+ CREATE TABLE actions_event
14
+ (
15
+ id UUID PRIMARY KEY NOT NULL,
16
+ transaction_id UUID NOT NULL,
17
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
18
+ resolved_at TIMESTAMPTZ,
19
+ visible_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
20
+ num_retries INT NOT NULL,
21
+ state ACTIONS_TRIGGER_STATE NOT NULL DEFAULT 'created',
22
+ last_state_change TIMESTAMPTZ NOT NULL DEFAULT NOW(),
23
+ stage_id UUID NOT NULL
24
+ REFERENCES stage
25
+ ON DELETE CASCADE,
26
+ schema_id INTEGER NOT NULL
27
+ REFERENCES schema_migration,
28
+ target TEXT NOT NULL,
29
+ trigger TEXT NOT NULL,
30
+ priority INT NOT NULL DEFAULT 0,
31
+ payload JSONB NOT NULL,
32
+ log JSONB NOT NULL DEFAULT '[]',
33
+ identity_id UUID DEFAULT NULL,
34
+ ip_address INET DEFAULT NULL,
35
+ user_agent TEXT DEFAULT NULL
36
+ );
37
+
38
+ CREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');
39
+
40
+ CREATE TABLE actions_variable
41
+ (
42
+ id UUID PRIMARY KEY NOT NULL,
43
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
44
+ updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
45
+ name TEXT NOT NULL UNIQUE,
46
+ value TEXT NOT NULL
47
+ )
48
+ `);
49
+ }
50
+ module.exports = snapshot;
51
+ //# sourceMappingURL=snapshot.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.cjs","sources":["../../../../../packages/engine-actions/src/migrations/snapshot.ts"],"sourcesContent":["import { MigrationBuilder } from '@contember/database-migrations'\n\nexport default async function(builder: MigrationBuilder) {\n\tbuilder.sql(`\n\t\tCREATE TYPE ACTIONS_TRIGGER_STATE AS ENUM (\n\t\t\t'created' ,\n\t\t\t'retrying',\n\t\t\t'processing',\n\t\t\t'succeed',\n\t\t\t'failed',\n\t\t\t'stopped'\n\t\t);\n\n\t\tCREATE TABLE actions_event\n\t\t(\n\t\t\tid UUID PRIMARY KEY NOT NULL,\n\t\t\ttransaction_id UUID NOT NULL,\n\t\t\tcreated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\t\t\tresolved_at TIMESTAMPTZ,\n\t\t\tvisible_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\t\t\tnum_retries INT NOT NULL,\n\t\t\tstate ACTIONS_TRIGGER_STATE NOT NULL DEFAULT 'created',\n\t\t\tlast_state_change TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\t\t\tstage_id UUID NOT NULL\n\t\t\t\tREFERENCES stage\n\t\t\t\t\tON DELETE CASCADE,\n\t\t\tschema_id INTEGER NOT NULL\n\t\t\t\tREFERENCES schema_migration,\n\t\t\ttarget TEXT NOT NULL,\n\t\t\ttrigger TEXT NOT NULL,\n\t\t\tpriority INT NOT NULL DEFAULT 0,\n\t\t\tpayload JSONB NOT NULL,\n\t\t\tlog JSONB NOT NULL DEFAULT '[]',\n\t\t\tidentity_id UUID DEFAULT NULL,\n\t\t\tip_address INET DEFAULT NULL,\n\t\t\tuser_agent TEXT DEFAULT NULL\n\t\t);\n\n\t\tCREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');\n\n\t\tCREATE TABLE actions_variable\n \t(\n \tid UUID PRIMARY KEY NOT NULL,\n \tcreated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n \tupdated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n \tname TEXT NOT NULL UNIQUE,\n \tvalue TEXT NOT NULL\n \t)\n\t`)\n}\n"],"names":[],"mappings":";AAEA,eAAA,SAA8B,SAA2B;AACxD,UAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6CX;AACF;;"}
@@ -0,0 +1,52 @@
1
+ async function snapshot(builder) {
2
+ builder.sql(`
3
+ CREATE TYPE ACTIONS_TRIGGER_STATE AS ENUM (
4
+ 'created' ,
5
+ 'retrying',
6
+ 'processing',
7
+ 'succeed',
8
+ 'failed',
9
+ 'stopped'
10
+ );
11
+
12
+ CREATE TABLE actions_event
13
+ (
14
+ id UUID PRIMARY KEY NOT NULL,
15
+ transaction_id UUID NOT NULL,
16
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
17
+ resolved_at TIMESTAMPTZ,
18
+ visible_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
19
+ num_retries INT NOT NULL,
20
+ state ACTIONS_TRIGGER_STATE NOT NULL DEFAULT 'created',
21
+ last_state_change TIMESTAMPTZ NOT NULL DEFAULT NOW(),
22
+ stage_id UUID NOT NULL
23
+ REFERENCES stage
24
+ ON DELETE CASCADE,
25
+ schema_id INTEGER NOT NULL
26
+ REFERENCES schema_migration,
27
+ target TEXT NOT NULL,
28
+ trigger TEXT NOT NULL,
29
+ priority INT NOT NULL DEFAULT 0,
30
+ payload JSONB NOT NULL,
31
+ log JSONB NOT NULL DEFAULT '[]',
32
+ identity_id UUID DEFAULT NULL,
33
+ ip_address INET DEFAULT NULL,
34
+ user_agent TEXT DEFAULT NULL
35
+ );
36
+
37
+ CREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');
38
+
39
+ CREATE TABLE actions_variable
40
+ (
41
+ id UUID PRIMARY KEY NOT NULL,
42
+ created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
43
+ updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
44
+ name TEXT NOT NULL UNIQUE,
45
+ value TEXT NOT NULL
46
+ )
47
+ `);
48
+ }
49
+ export {
50
+ snapshot as default
51
+ };
52
+ //# sourceMappingURL=snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.js","sources":["../../../../../packages/engine-actions/src/migrations/snapshot.ts"],"sourcesContent":["import { MigrationBuilder } from '@contember/database-migrations'\n\nexport default async function(builder: MigrationBuilder) {\n\tbuilder.sql(`\n\t\tCREATE TYPE ACTIONS_TRIGGER_STATE AS ENUM (\n\t\t\t'created' ,\n\t\t\t'retrying',\n\t\t\t'processing',\n\t\t\t'succeed',\n\t\t\t'failed',\n\t\t\t'stopped'\n\t\t);\n\n\t\tCREATE TABLE actions_event\n\t\t(\n\t\t\tid UUID PRIMARY KEY NOT NULL,\n\t\t\ttransaction_id UUID NOT NULL,\n\t\t\tcreated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\t\t\tresolved_at TIMESTAMPTZ,\n\t\t\tvisible_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\t\t\tnum_retries INT NOT NULL,\n\t\t\tstate ACTIONS_TRIGGER_STATE NOT NULL DEFAULT 'created',\n\t\t\tlast_state_change TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n\t\t\tstage_id UUID NOT NULL\n\t\t\t\tREFERENCES stage\n\t\t\t\t\tON DELETE CASCADE,\n\t\t\tschema_id INTEGER NOT NULL\n\t\t\t\tREFERENCES schema_migration,\n\t\t\ttarget TEXT NOT NULL,\n\t\t\ttrigger TEXT NOT NULL,\n\t\t\tpriority INT NOT NULL DEFAULT 0,\n\t\t\tpayload JSONB NOT NULL,\n\t\t\tlog JSONB NOT NULL DEFAULT '[]',\n\t\t\tidentity_id UUID DEFAULT NULL,\n\t\t\tip_address INET DEFAULT NULL,\n\t\t\tuser_agent TEXT DEFAULT NULL\n\t\t);\n\n\t\tCREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');\n\n\t\tCREATE TABLE actions_variable\n \t(\n \tid UUID PRIMARY KEY NOT NULL,\n \tcreated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n \tupdated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),\n \tname TEXT NOT NULL UNIQUE,\n \tvalue TEXT NOT NULL\n \t)\n\t`)\n}\n"],"names":[],"mappings":"AAEA,eAAA,SAA8B,SAA2B;AACxD,UAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA6CX;AACF;"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ class EventByIdQuery extends Database.DatabaseQuery {
5
+ constructor(id) {
6
+ super();
7
+ this.id = id;
8
+ }
9
+ async fetch(queryable) {
10
+ const result = await Database.SelectBuilder.create().from("actions_event").select("*").where({
11
+ id: this.id
12
+ }).getResult(queryable.db);
13
+ return this.fetchOneOrNull(result);
14
+ }
15
+ }
16
+ exports.EventByIdQuery = EventByIdQuery;
17
+ //# sourceMappingURL=EventByIdQuery.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventByIdQuery.cjs","sources":["../../../../../packages/engine-actions/src/model/EventByIdQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\n\nexport class EventByIdQuery extends DatabaseQuery<EventRow | null> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<EventRow | null> {\n\t\tconst result = await SelectBuilder.create<EventRow>()\n\t\t\t.from('actions_event')\n\t\t\t.select('*')\n\t\t\t.where({\n\t\t\t\tid: this.id,\n\t\t\t})\n\t\t\t.getResult(queryable.db)\n\t\treturn this.fetchOneOrNull(result)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAGO,MAAM,uBAAuBA,SAAAA,cAA+B;AAAA,EAClE,YACkB,IAChB;AACD,UAAA;AAFiB,SAAA,KAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAAwD;AACnE,UAAM,SAAS,MAAMC,uBAAc,SACjC,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,UAAU,UAAU,EAAE;AACxB,WAAO,KAAK,eAAe,MAAM;AAAA,EAClC;AACD;;"}
@@ -0,0 +1,17 @@
1
+ import { DatabaseQuery, SelectBuilder } from "@contember/database";
2
+ class EventByIdQuery extends DatabaseQuery {
3
+ constructor(id) {
4
+ super();
5
+ this.id = id;
6
+ }
7
+ async fetch(queryable) {
8
+ const result = await SelectBuilder.create().from("actions_event").select("*").where({
9
+ id: this.id
10
+ }).getResult(queryable.db);
11
+ return this.fetchOneOrNull(result);
12
+ }
13
+ }
14
+ export {
15
+ EventByIdQuery
16
+ };
17
+ //# sourceMappingURL=EventByIdQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventByIdQuery.js","sources":["../../../../../packages/engine-actions/src/model/EventByIdQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\n\nexport class EventByIdQuery extends DatabaseQuery<EventRow | null> {\n\tconstructor(\n\t\tprivate readonly id: string,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<EventRow | null> {\n\t\tconst result = await SelectBuilder.create<EventRow>()\n\t\t\t.from('actions_event')\n\t\t\t.select('*')\n\t\t\t.where({\n\t\t\t\tid: this.id,\n\t\t\t})\n\t\t\t.getResult(queryable.db)\n\t\treturn this.fetchOneOrNull(result)\n\t}\n}\n"],"names":[],"mappings":";AAGO,MAAM,uBAAuB,cAA+B;AAAA,EAClE,YACkB,IAChB;AACD,UAAA;AAFiB,SAAA,KAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAAwD;AACnE,UAAM,SAAS,MAAM,cAAc,SACjC,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,UAAU,UAAU,EAAE;AACxB,WAAO,KAAK,eAAe,MAAM;AAAA,EAClC;AACD;"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ class EventsInProcessingQuery extends Database.DatabaseQuery {
5
+ constructor(args) {
6
+ super();
7
+ this.args = args;
8
+ }
9
+ async fetch(queryable) {
10
+ return Database.SelectBuilder.create().from("actions_event").select("*").where((it) => it.in("state", ["processing"])).orderBy("last_state_change", "asc").limit(this.args.limit ?? 100, this.args.offset ?? 0).getResult(queryable.db);
11
+ }
12
+ }
13
+ exports.EventsInProcessingQuery = EventsInProcessingQuery;
14
+ //# sourceMappingURL=EventsInProcessingQuery.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsInProcessingQuery.cjs","sources":["../../../../../packages/engine-actions/src/model/EventsInProcessingQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\nimport { EventArgs } from '../graphql/schema'\n\nexport class EventsInProcessingQuery extends DatabaseQuery<EventRow[]> {\n\tconstructor(\n\t\tprivate readonly args: EventArgs,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<EventRow[]> {\n\t\treturn SelectBuilder.create<EventRow>()\n\t\t\t.from('actions_event')\n\t\t\t.select('*')\n\t\t\t.where(it => it.in('state', ['processing']))\n\t\t\t.orderBy('last_state_change', 'asc')\n\t\t\t.limit(this.args.limit ?? 100, this.args.offset ?? 0)\n\t\t\t.getResult(queryable.db)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder"],"mappings":";;;AAIO,MAAM,gCAAgCA,SAAAA,cAA0B;AAAA,EACtE,YACkB,MAChB;AACD,UAAA;AAFiB,SAAA,OAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAAmD;AAC9D,WAAOC,SAAAA,cAAc,OAAA,EACnB,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,CAAA,OAAM,GAAG,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,EAC1C,QAAQ,qBAAqB,KAAK,EAClC,MAAM,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,UAAU,CAAC,EACnD,UAAU,UAAU,EAAE;AAAA,EACzB;AACD;;"}
@@ -0,0 +1,14 @@
1
+ import { DatabaseQuery, SelectBuilder } from "@contember/database";
2
+ class EventsInProcessingQuery extends DatabaseQuery {
3
+ constructor(args) {
4
+ super();
5
+ this.args = args;
6
+ }
7
+ async fetch(queryable) {
8
+ return SelectBuilder.create().from("actions_event").select("*").where((it) => it.in("state", ["processing"])).orderBy("last_state_change", "asc").limit(this.args.limit ?? 100, this.args.offset ?? 0).getResult(queryable.db);
9
+ }
10
+ }
11
+ export {
12
+ EventsInProcessingQuery
13
+ };
14
+ //# sourceMappingURL=EventsInProcessingQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsInProcessingQuery.js","sources":["../../../../../packages/engine-actions/src/model/EventsInProcessingQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\nimport { EventArgs } from '../graphql/schema'\n\nexport class EventsInProcessingQuery extends DatabaseQuery<EventRow[]> {\n\tconstructor(\n\t\tprivate readonly args: EventArgs,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<EventRow[]> {\n\t\treturn SelectBuilder.create<EventRow>()\n\t\t\t.from('actions_event')\n\t\t\t.select('*')\n\t\t\t.where(it => it.in('state', ['processing']))\n\t\t\t.orderBy('last_state_change', 'asc')\n\t\t\t.limit(this.args.limit ?? 100, this.args.offset ?? 0)\n\t\t\t.getResult(queryable.db)\n\t}\n}\n"],"names":[],"mappings":";AAIO,MAAM,gCAAgC,cAA0B;AAAA,EACtE,YACkB,MAChB;AACD,UAAA;AAFiB,SAAA,OAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAAmD;AAC9D,WAAO,cAAc,OAAA,EACnB,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,CAAA,OAAM,GAAG,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,EAC1C,QAAQ,qBAAqB,KAAK,EAClC,MAAM,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,UAAU,CAAC,EACnD,UAAU,UAAU,EAAE;AAAA,EACzB;AACD;"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const Database = require("@contember/database");
4
+ const EventsToProcessSpecification = require("./EventsToProcessSpecification.cjs");
5
+ class EventsToProcessQuery extends Database.DatabaseQuery {
6
+ constructor(args) {
7
+ super();
8
+ this.args = args;
9
+ }
10
+ async fetch(queryable) {
11
+ return Database.SelectBuilder.create().from("actions_event").select("*").match(EventsToProcessSpecification.eventsToProcessSpecification).limit(this.args.limit ?? 100, this.args.offset ?? 0).getResult(queryable.db);
12
+ }
13
+ }
14
+ exports.EventsToProcessQuery = EventsToProcessQuery;
15
+ //# sourceMappingURL=EventsToProcessQuery.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsToProcessQuery.cjs","sources":["../../../../../packages/engine-actions/src/model/EventsToProcessQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\nimport { EventArgs } from '../graphql/schema'\nimport { eventsToProcessSpecification } from './EventsToProcessSpecification'\n\nexport class EventsToProcessQuery extends DatabaseQuery<EventRow[]> {\n\tconstructor(\n\t\tprivate readonly args: EventArgs,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<EventRow[]> {\n\t\treturn SelectBuilder.create<EventRow>()\n\t\t\t.from('actions_event')\n\t\t\t.select('*')\n\t\t\t.match(eventsToProcessSpecification)\n\t\t\t.limit(this.args.limit ?? 100, this.args.offset ?? 0)\n\t\t\t.getResult(queryable.db)\n\t}\n}\n"],"names":["DatabaseQuery","SelectBuilder","eventsToProcessSpecification"],"mappings":";;;;AAKO,MAAM,6BAA6BA,SAAAA,cAA0B;AAAA,EACnE,YACkB,MAChB;AACD,UAAA;AAFiB,SAAA,OAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAAmD;AAC9D,WAAOC,uBAAc,SACnB,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAMC,6BAAAA,4BAA4B,EAClC,MAAM,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,UAAU,CAAC,EACnD,UAAU,UAAU,EAAE;AAAA,EACzB;AACD;;"}
@@ -0,0 +1,15 @@
1
+ import { DatabaseQuery, SelectBuilder } from "@contember/database";
2
+ import { eventsToProcessSpecification } from "./EventsToProcessSpecification.js";
3
+ class EventsToProcessQuery extends DatabaseQuery {
4
+ constructor(args) {
5
+ super();
6
+ this.args = args;
7
+ }
8
+ async fetch(queryable) {
9
+ return SelectBuilder.create().from("actions_event").select("*").match(eventsToProcessSpecification).limit(this.args.limit ?? 100, this.args.offset ?? 0).getResult(queryable.db);
10
+ }
11
+ }
12
+ export {
13
+ EventsToProcessQuery
14
+ };
15
+ //# sourceMappingURL=EventsToProcessQuery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventsToProcessQuery.js","sources":["../../../../../packages/engine-actions/src/model/EventsToProcessQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\nimport { EventArgs } from '../graphql/schema'\nimport { eventsToProcessSpecification } from './EventsToProcessSpecification'\n\nexport class EventsToProcessQuery extends DatabaseQuery<EventRow[]> {\n\tconstructor(\n\t\tprivate readonly args: EventArgs,\n\t) {\n\t\tsuper()\n\t}\n\n\tasync fetch(queryable: DatabaseQueryable): Promise<EventRow[]> {\n\t\treturn SelectBuilder.create<EventRow>()\n\t\t\t.from('actions_event')\n\t\t\t.select('*')\n\t\t\t.match(eventsToProcessSpecification)\n\t\t\t.limit(this.args.limit ?? 100, this.args.offset ?? 0)\n\t\t\t.getResult(queryable.db)\n\t}\n}\n"],"names":[],"mappings":";;AAKO,MAAM,6BAA6B,cAA0B;AAAA,EACnE,YACkB,MAChB;AACD,UAAA;AAFiB,SAAA,OAAA;AAAA,EAGlB;AAAA,EAEA,MAAM,MAAM,WAAmD;AAC9D,WAAO,cAAc,SACnB,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,4BAA4B,EAClC,MAAM,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,UAAU,CAAC,EACnD,UAAU,UAAU,EAAE;AAAA,EACzB;AACD;"}