@contember/engine-actions 2.1.0-alpha.36 → 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.
- package/dist/development/index.cjs +118 -0
- package/dist/development/index.cjs.map +1 -0
- package/dist/development/index.js +118 -0
- package/dist/development/index.js.map +1 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs +42 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs.map +1 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.js +42 -0
- package/dist/development/src/ActionsExecutionContainerHookFactory.js.map +1 -0
- package/dist/development/src/ImplementationException.cjs +6 -0
- package/dist/development/src/ImplementationException.cjs.map +1 -0
- package/dist/development/src/ImplementationException.js +6 -0
- package/dist/development/src/ImplementationException.js.map +1 -0
- package/dist/development/src/ListenerStoreProvider.cjs +25 -0
- package/dist/development/src/ListenerStoreProvider.cjs.map +1 -0
- package/dist/development/src/ListenerStoreProvider.js +25 -0
- package/dist/development/src/ListenerStoreProvider.js.map +1 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs +17 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs.map +1 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.js +18 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.js.map +1 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs +16 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs.map +1 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.js +16 -0
- package/dist/development/src/authorization/ActionsPermissionsFactory.js.map +1 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs +127 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js +127 -0
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js.map +1 -0
- package/dist/development/src/dispatch/EventDispatcher.cjs +43 -0
- package/dist/development/src/dispatch/EventDispatcher.cjs.map +1 -0
- package/dist/development/src/dispatch/EventDispatcher.js +43 -0
- package/dist/development/src/dispatch/EventDispatcher.js.map +1 -0
- package/dist/development/src/dispatch/EventsRepository.cjs +122 -0
- package/dist/development/src/dispatch/EventsRepository.cjs.map +1 -0
- package/dist/development/src/dispatch/EventsRepository.js +122 -0
- package/dist/development/src/dispatch/EventsRepository.js.map +1 -0
- package/dist/development/src/dispatch/ProjectDispatcher.cjs +99 -0
- package/dist/development/src/dispatch/ProjectDispatcher.cjs.map +1 -0
- package/dist/development/src/dispatch/ProjectDispatcher.js +99 -0
- package/dist/development/src/dispatch/ProjectDispatcher.js.map +1 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs +16 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs.map +1 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.js +16 -0
- package/dist/development/src/dispatch/TargetHandlerResolver.js.map +1 -0
- package/dist/development/src/dispatch/WebhookFetcher.cjs +16 -0
- package/dist/development/src/dispatch/WebhookFetcher.cjs.map +1 -0
- package/dist/development/src/dispatch/WebhookFetcher.js +16 -0
- package/dist/development/src/dispatch/WebhookFetcher.js.map +1 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs +198 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs.map +1 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.js +181 -0
- package/dist/development/src/dispatch/WebhookTargetHandler.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs +39 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js +39 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs +36 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.js +36 -0
- package/dist/development/src/graphql/http/ActionsContextResolver.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +20 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js +20 -0
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs +152 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js +135 -0
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs +36 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.js +36 -0
- package/dist/development/src/graphql/resolvers/ResolversFactory.js.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs +21 -0
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.js +21 -0
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs +61 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js +61 -0
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs +19 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js +19 -0
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -0
- package/dist/development/src/graphql/schema/actions.graphql.cjs +107 -0
- package/dist/development/src/graphql/schema/actions.graphql.cjs.map +1 -0
- package/dist/development/src/graphql/schema/actions.graphql.js +107 -0
- package/dist/development/src/graphql/schema/actions.graphql.js.map +1 -0
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs +16 -0
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -0
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js +17 -0
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -0
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.cjs +16 -0
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.cjs.map +1 -0
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.js +17 -0
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.js.map +1 -0
- package/dist/development/src/migrations/index.cjs +12 -0
- package/dist/development/src/migrations/index.cjs.map +1 -0
- package/dist/development/src/migrations/index.js +12 -0
- package/dist/development/src/migrations/index.js.map +1 -0
- package/dist/development/src/migrations/snapshot.cjs +51 -0
- package/dist/development/src/migrations/snapshot.cjs.map +1 -0
- package/dist/development/src/migrations/snapshot.js +52 -0
- package/dist/development/src/migrations/snapshot.js.map +1 -0
- package/dist/development/src/model/EventByIdQuery.cjs +17 -0
- package/dist/development/src/model/EventByIdQuery.cjs.map +1 -0
- package/dist/development/src/model/EventByIdQuery.js +17 -0
- package/dist/development/src/model/EventByIdQuery.js.map +1 -0
- package/dist/development/src/model/EventsInProcessingQuery.cjs +14 -0
- package/dist/development/src/model/EventsInProcessingQuery.cjs.map +1 -0
- package/dist/development/src/model/EventsInProcessingQuery.js +14 -0
- package/dist/development/src/model/EventsInProcessingQuery.js.map +1 -0
- package/dist/development/src/model/EventsToProcessQuery.cjs +15 -0
- package/dist/development/src/model/EventsToProcessQuery.cjs.map +1 -0
- package/dist/development/src/model/EventsToProcessQuery.js +15 -0
- package/dist/development/src/model/EventsToProcessQuery.js.map +1 -0
- package/dist/development/src/model/EventsToProcessSpecification.cjs +8 -0
- package/dist/development/src/model/EventsToProcessSpecification.cjs.map +1 -0
- package/dist/development/src/model/EventsToProcessSpecification.js +8 -0
- package/dist/development/src/model/EventsToProcessSpecification.js.map +1 -0
- package/dist/development/src/model/FailedEventsQuery.cjs +14 -0
- package/dist/development/src/model/FailedEventsQuery.cjs.map +1 -0
- package/dist/development/src/model/FailedEventsQuery.js +14 -0
- package/dist/development/src/model/FailedEventsQuery.js.map +1 -0
- package/dist/development/src/model/SetVariableCommand.cjs +21 -0
- package/dist/development/src/model/SetVariableCommand.cjs.map +1 -0
- package/dist/development/src/model/SetVariableCommand.js +21 -0
- package/dist/development/src/model/SetVariableCommand.js.map +1 -0
- package/dist/development/src/model/VariablesManager.cjs +41 -0
- package/dist/development/src/model/VariablesManager.cjs.map +1 -0
- package/dist/development/src/model/VariablesManager.js +41 -0
- package/dist/development/src/model/VariablesManager.js.map +1 -0
- package/dist/development/src/model/VariablesQuery.cjs +10 -0
- package/dist/development/src/model/VariablesQuery.cjs.map +1 -0
- package/dist/development/src/model/VariablesQuery.js +10 -0
- package/dist/development/src/model/VariablesQuery.js.map +1 -0
- package/dist/development/src/triggers/TriggerHandler.cjs +129 -0
- package/dist/development/src/triggers/TriggerHandler.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerHandler.js +129 -0
- package/dist/development/src/triggers/TriggerHandler.js.map +1 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs +63 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js +63 -0
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs +169 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.js +169 -0
- package/dist/development/src/triggers/TriggerListenersBuilder.js.map +1 -0
- package/dist/development/src/triggers/TriggerListenersFactory.cjs +17 -0
- package/dist/development/src/triggers/TriggerListenersFactory.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerListenersFactory.js +17 -0
- package/dist/development/src/triggers/TriggerListenersFactory.js.map +1 -0
- package/dist/development/src/triggers/TriggerListenersStore.cjs +24 -0
- package/dist/development/src/triggers/TriggerListenersStore.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerListenersStore.js +24 -0
- package/dist/development/src/triggers/TriggerListenersStore.js.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs +163 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.js +163 -0
- package/dist/development/src/triggers/TriggerPayloadBuilder.js.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadManager.cjs +27 -0
- package/dist/development/src/triggers/TriggerPayloadManager.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadManager.js +27 -0
- package/dist/development/src/triggers/TriggerPayloadManager.js.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs +47 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs.map +1 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.js +47 -0
- package/dist/development/src/triggers/TriggerPayloadPersister.js.map +1 -0
- package/dist/development/src/utils/assertNever.cjs +7 -0
- package/dist/development/src/utils/assertNever.cjs.map +1 -0
- package/dist/development/src/utils/assertNever.js +7 -0
- package/dist/development/src/utils/assertNever.js.map +1 -0
- package/dist/development/src/utils/map.cjs +13 -0
- package/dist/development/src/utils/map.cjs.map +1 -0
- package/dist/development/src/utils/map.js +13 -0
- package/dist/development/src/utils/map.js.map +1 -0
- package/dist/development/src/utils/notifyChannel.cjs +9 -0
- package/dist/development/src/utils/notifyChannel.cjs.map +1 -0
- package/dist/development/src/utils/notifyChannel.js +9 -0
- package/dist/development/src/utils/notifyChannel.js.map +1 -0
- package/dist/production/index.cjs +118 -0
- package/dist/production/index.cjs.map +1 -0
- package/dist/production/index.js +118 -0
- package/dist/production/index.js.map +1 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs +42 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs.map +1 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.js +42 -0
- package/dist/production/src/ActionsExecutionContainerHookFactory.js.map +1 -0
- package/dist/production/src/ImplementationException.cjs +6 -0
- package/dist/production/src/ImplementationException.cjs.map +1 -0
- package/dist/production/src/ImplementationException.js +6 -0
- package/dist/production/src/ImplementationException.js.map +1 -0
- package/dist/production/src/ListenerStoreProvider.cjs +25 -0
- package/dist/production/src/ListenerStoreProvider.cjs.map +1 -0
- package/dist/production/src/ListenerStoreProvider.js +25 -0
- package/dist/production/src/ListenerStoreProvider.js.map +1 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs +17 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs.map +1 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.js +18 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.js.map +1 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs +16 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs.map +1 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.js +16 -0
- package/dist/production/src/authorization/ActionsPermissionsFactory.js.map +1 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs +127 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js +127 -0
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js.map +1 -0
- package/dist/production/src/dispatch/EventDispatcher.cjs +43 -0
- package/dist/production/src/dispatch/EventDispatcher.cjs.map +1 -0
- package/dist/production/src/dispatch/EventDispatcher.js +43 -0
- package/dist/production/src/dispatch/EventDispatcher.js.map +1 -0
- package/dist/production/src/dispatch/EventsRepository.cjs +122 -0
- package/dist/production/src/dispatch/EventsRepository.cjs.map +1 -0
- package/dist/production/src/dispatch/EventsRepository.js +122 -0
- package/dist/production/src/dispatch/EventsRepository.js.map +1 -0
- package/dist/production/src/dispatch/ProjectDispatcher.cjs +99 -0
- package/dist/production/src/dispatch/ProjectDispatcher.cjs.map +1 -0
- package/dist/production/src/dispatch/ProjectDispatcher.js +99 -0
- package/dist/production/src/dispatch/ProjectDispatcher.js.map +1 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs +16 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs.map +1 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.js +16 -0
- package/dist/production/src/dispatch/TargetHandlerResolver.js.map +1 -0
- package/dist/production/src/dispatch/WebhookFetcher.cjs +16 -0
- package/dist/production/src/dispatch/WebhookFetcher.cjs.map +1 -0
- package/dist/production/src/dispatch/WebhookFetcher.js +16 -0
- package/dist/production/src/dispatch/WebhookFetcher.js.map +1 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs +198 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs.map +1 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.js +181 -0
- package/dist/production/src/dispatch/WebhookTargetHandler.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs +39 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js +39 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs +36 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.js +36 -0
- package/dist/production/src/graphql/http/ActionsContextResolver.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +20 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js +20 -0
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs +152 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js +135 -0
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs +36 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.js +36 -0
- package/dist/production/src/graphql/resolvers/ResolversFactory.js.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs +21 -0
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.js +21 -0
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs +61 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js +61 -0
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs +19 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js +19 -0
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -0
- package/dist/production/src/graphql/schema/actions.graphql.cjs +107 -0
- package/dist/production/src/graphql/schema/actions.graphql.cjs.map +1 -0
- package/dist/production/src/graphql/schema/actions.graphql.js +107 -0
- package/dist/production/src/graphql/schema/actions.graphql.js.map +1 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs +16 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js +17 -0
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -0
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.cjs +16 -0
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.cjs.map +1 -0
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.js +17 -0
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.js.map +1 -0
- package/dist/production/src/migrations/index.cjs +12 -0
- package/dist/production/src/migrations/index.cjs.map +1 -0
- package/dist/production/src/migrations/index.js +12 -0
- package/dist/production/src/migrations/index.js.map +1 -0
- package/dist/production/src/migrations/snapshot.cjs +51 -0
- package/dist/production/src/migrations/snapshot.cjs.map +1 -0
- package/dist/production/src/migrations/snapshot.js +52 -0
- package/dist/production/src/migrations/snapshot.js.map +1 -0
- package/dist/production/src/model/EventByIdQuery.cjs +17 -0
- package/dist/production/src/model/EventByIdQuery.cjs.map +1 -0
- package/dist/production/src/model/EventByIdQuery.js +17 -0
- package/dist/production/src/model/EventByIdQuery.js.map +1 -0
- package/dist/production/src/model/EventsInProcessingQuery.cjs +14 -0
- package/dist/production/src/model/EventsInProcessingQuery.cjs.map +1 -0
- package/dist/production/src/model/EventsInProcessingQuery.js +14 -0
- package/dist/production/src/model/EventsInProcessingQuery.js.map +1 -0
- package/dist/production/src/model/EventsToProcessQuery.cjs +15 -0
- package/dist/production/src/model/EventsToProcessQuery.cjs.map +1 -0
- package/dist/production/src/model/EventsToProcessQuery.js +15 -0
- package/dist/production/src/model/EventsToProcessQuery.js.map +1 -0
- package/dist/production/src/model/EventsToProcessSpecification.cjs +8 -0
- package/dist/production/src/model/EventsToProcessSpecification.cjs.map +1 -0
- package/dist/production/src/model/EventsToProcessSpecification.js +8 -0
- package/dist/production/src/model/EventsToProcessSpecification.js.map +1 -0
- package/dist/production/src/model/FailedEventsQuery.cjs +14 -0
- package/dist/production/src/model/FailedEventsQuery.cjs.map +1 -0
- package/dist/production/src/model/FailedEventsQuery.js +14 -0
- package/dist/production/src/model/FailedEventsQuery.js.map +1 -0
- package/dist/production/src/model/SetVariableCommand.cjs +21 -0
- package/dist/production/src/model/SetVariableCommand.cjs.map +1 -0
- package/dist/production/src/model/SetVariableCommand.js +21 -0
- package/dist/production/src/model/SetVariableCommand.js.map +1 -0
- package/dist/production/src/model/VariablesManager.cjs +41 -0
- package/dist/production/src/model/VariablesManager.cjs.map +1 -0
- package/dist/production/src/model/VariablesManager.js +41 -0
- package/dist/production/src/model/VariablesManager.js.map +1 -0
- package/dist/production/src/model/VariablesQuery.cjs +10 -0
- package/dist/production/src/model/VariablesQuery.cjs.map +1 -0
- package/dist/production/src/model/VariablesQuery.js +10 -0
- package/dist/production/src/model/VariablesQuery.js.map +1 -0
- package/dist/production/src/triggers/TriggerHandler.cjs +129 -0
- package/dist/production/src/triggers/TriggerHandler.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerHandler.js +129 -0
- package/dist/production/src/triggers/TriggerHandler.js.map +1 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs +63 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js +63 -0
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs +169 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.js +169 -0
- package/dist/production/src/triggers/TriggerListenersBuilder.js.map +1 -0
- package/dist/production/src/triggers/TriggerListenersFactory.cjs +17 -0
- package/dist/production/src/triggers/TriggerListenersFactory.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerListenersFactory.js +17 -0
- package/dist/production/src/triggers/TriggerListenersFactory.js.map +1 -0
- package/dist/production/src/triggers/TriggerListenersStore.cjs +24 -0
- package/dist/production/src/triggers/TriggerListenersStore.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerListenersStore.js +24 -0
- package/dist/production/src/triggers/TriggerListenersStore.js.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs +163 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.js +163 -0
- package/dist/production/src/triggers/TriggerPayloadBuilder.js.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadManager.cjs +27 -0
- package/dist/production/src/triggers/TriggerPayloadManager.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadManager.js +27 -0
- package/dist/production/src/triggers/TriggerPayloadManager.js.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs +47 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs.map +1 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.js +47 -0
- package/dist/production/src/triggers/TriggerPayloadPersister.js.map +1 -0
- package/dist/production/src/utils/assertNever.cjs +7 -0
- package/dist/production/src/utils/assertNever.cjs.map +1 -0
- package/dist/production/src/utils/assertNever.js +7 -0
- package/dist/production/src/utils/assertNever.js.map +1 -0
- package/dist/production/src/utils/map.cjs +13 -0
- package/dist/production/src/utils/map.cjs.map +1 -0
- package/dist/production/src/utils/map.js +13 -0
- package/dist/production/src/utils/map.js.map +1 -0
- package/dist/production/src/utils/notifyChannel.cjs +9 -0
- package/dist/production/src/utils/notifyChannel.cjs.map +1 -0
- package/dist/production/src/utils/notifyChannel.js +9 -0
- package/dist/production/src/utils/notifyChannel.js.map +1 -0
- package/dist/tests/cases/unit/generator.test.d.ts +2 -0
- package/dist/tests/cases/unit/generator.test.d.ts.map +1 -0
- package/dist/tests/cases/unit/webhookHandler.test.d.ts +2 -0
- package/dist/tests/cases/unit/webhookHandler.test.d.ts.map +1 -0
- package/dist/tests/src/gql.d.ts +2 -0
- package/dist/tests/src/gql.d.ts.map +1 -0
- package/dist/tests/src/uuid.d.ts +3 -0
- package/dist/tests/src/uuid.d.ts.map +1 -0
- package/dist/tests/tsconfig.tsbuildinfo +1 -0
- package/dist/types/ActionsExecutionContainerHookFactory.d.ts +8 -0
- package/dist/types/ActionsExecutionContainerHookFactory.d.ts.map +1 -0
- package/dist/types/ImplementationException.d.ts +3 -0
- package/dist/types/ImplementationException.d.ts.map +1 -0
- package/dist/types/ListenerStoreProvider.d.ts +7 -0
- package/dist/types/ListenerStoreProvider.d.ts.map +1 -0
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts +38 -0
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts.map +1 -0
- package/dist/types/authorization/ActionsPermissionsFactory.d.ts +5 -0
- package/dist/types/authorization/ActionsPermissionsFactory.d.ts.map +1 -0
- package/dist/types/authorization/Identity.d.ts +5 -0
- package/dist/types/authorization/Identity.d.ts.map +1 -0
- package/dist/types/authorization/index.d.ts +4 -0
- package/dist/types/authorization/index.d.ts.map +1 -0
- package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts +17 -0
- package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts.map +1 -0
- package/dist/types/dispatch/EventDispatcher.d.ts +25 -0
- package/dist/types/dispatch/EventDispatcher.d.ts.map +1 -0
- package/dist/types/dispatch/EventsRepository.d.ts +23 -0
- package/dist/types/dispatch/EventsRepository.d.ts.map +1 -0
- package/dist/types/dispatch/ProjectDispatcher.d.ts +22 -0
- package/dist/types/dispatch/ProjectDispatcher.d.ts.map +1 -0
- package/dist/types/dispatch/TargetHandlerResolver.d.ts +9 -0
- package/dist/types/dispatch/TargetHandlerResolver.d.ts.map +1 -0
- package/dist/types/dispatch/WebhookFetcher.d.ts +14 -0
- package/dist/types/dispatch/WebhookFetcher.d.ts.map +1 -0
- package/dist/types/dispatch/WebhookTargetHandler.d.ts +16 -0
- package/dist/types/dispatch/WebhookTargetHandler.d.ts.map +1 -0
- package/dist/types/dispatch/types.d.ts +27 -0
- package/dist/types/dispatch/types.d.ts.map +1 -0
- package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts +13 -0
- package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts.map +1 -0
- package/dist/types/graphql/http/ActionsContextResolver.d.ts +14 -0
- package/dist/types/graphql/http/ActionsContextResolver.d.ts.map +1 -0
- package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts +8 -0
- package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts.map +1 -0
- package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts +11 -0
- package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/ActionsContext.d.ts +14 -0
- package/dist/types/graphql/resolvers/ActionsContext.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts +15 -0
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/index.d.ts +3 -0
- package/dist/types/graphql/resolvers/index.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts +11 -0
- package/dist/types/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/mutation/RetryEventMutationResolver.d.ts +11 -0
- package/dist/types/graphql/resolvers/mutation/RetryEventMutationResolver.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts +11 -0
- package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/mutation/StopEventMutationResolver.d.ts +11 -0
- package/dist/types/graphql/resolvers/mutation/StopEventMutationResolver.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/mutation/index.d.ts +5 -0
- package/dist/types/graphql/resolvers/mutation/index.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts +14 -0
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts +12 -0
- package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts.map +1 -0
- package/dist/types/graphql/resolvers/query/index.d.ts +2 -0
- package/dist/types/graphql/resolvers/query/index.d.ts.map +1 -0
- package/dist/types/graphql/schema/actions.graphql.d.ts +3 -0
- package/dist/types/graphql/schema/actions.graphql.d.ts.map +1 -0
- package/dist/types/graphql/schema/index.d.ts +299 -0
- package/dist/types/graphql/schema/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts +3 -0
- package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts.map +1 -0
- package/dist/types/migrations/2025-05-28-160000-action-event-user.d.ts +3 -0
- package/dist/types/migrations/2025-05-28-160000-action-event-user.d.ts.map +1 -0
- package/dist/types/migrations/index.d.ts +3 -0
- package/dist/types/migrations/index.d.ts.map +1 -0
- package/dist/types/migrations/snapshot.d.ts +3 -0
- package/dist/types/migrations/snapshot.d.ts.map +1 -0
- package/dist/types/model/EventByIdQuery.d.ts +8 -0
- package/dist/types/model/EventByIdQuery.d.ts.map +1 -0
- package/dist/types/model/EventsInProcessingQuery.d.ts +9 -0
- package/dist/types/model/EventsInProcessingQuery.d.ts.map +1 -0
- package/dist/types/model/EventsToProcessQuery.d.ts +9 -0
- package/dist/types/model/EventsToProcessQuery.d.ts.map +1 -0
- package/dist/types/model/EventsToProcessSpecification.d.ts +4 -0
- package/dist/types/model/EventsToProcessSpecification.d.ts.map +1 -0
- package/dist/types/model/FailedEventsQuery.d.ts +9 -0
- package/dist/types/model/FailedEventsQuery.d.ts.map +1 -0
- package/dist/types/model/SetVariableCommand.d.ts +8 -0
- package/dist/types/model/SetVariableCommand.d.ts.map +1 -0
- package/dist/types/model/VariablesManager.d.ts +8 -0
- package/dist/types/model/VariablesManager.d.ts.map +1 -0
- package/dist/types/model/VariablesQuery.d.ts +12 -0
- package/dist/types/model/VariablesQuery.d.ts.map +1 -0
- package/dist/types/model/types.d.ts +22 -0
- package/dist/types/model/types.d.ts.map +1 -0
- package/dist/types/triggers/TriggerHandler.d.ts +26 -0
- package/dist/types/triggers/TriggerHandler.d.ts.map +1 -0
- package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts +19 -0
- package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts.map +1 -0
- package/dist/types/triggers/TriggerListeners.d.ts +9 -0
- package/dist/types/triggers/TriggerListeners.d.ts.map +1 -0
- package/dist/types/triggers/TriggerListenersBuilder.d.ts +15 -0
- package/dist/types/triggers/TriggerListenersBuilder.d.ts.map +1 -0
- package/dist/types/triggers/TriggerListenersFactory.d.ts +8 -0
- package/dist/types/triggers/TriggerListenersFactory.d.ts.map +1 -0
- package/dist/types/triggers/TriggerListenersStore.d.ts +48 -0
- package/dist/types/triggers/TriggerListenersStore.d.ts.map +1 -0
- package/dist/types/triggers/TriggerPayloadBuilder.d.ts +14 -0
- package/dist/types/triggers/TriggerPayloadBuilder.d.ts.map +1 -0
- package/dist/types/triggers/TriggerPayloadManager.d.ts +22 -0
- package/dist/types/triggers/TriggerPayloadManager.d.ts.map +1 -0
- package/dist/types/triggers/TriggerPayloadPersister.d.ts +21 -0
- package/dist/types/triggers/TriggerPayloadPersister.d.ts.map +1 -0
- package/dist/types/triggers/index.d.ts +8 -0
- package/dist/types/triggers/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/dist/types/utils/assertNever.d.ts +2 -0
- package/dist/types/utils/assertNever.d.ts.map +1 -0
- package/dist/types/utils/map.d.ts +2 -0
- package/dist/types/utils/map.d.ts.map +1 -0
- package/dist/types/utils/notifyChannel.d.ts +4 -0
- package/dist/types/utils/notifyChannel.d.ts.map +1 -0
- 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;"}
|