@contember/engine-actions 2.1.0-alpha.30 → 2.1.0-alpha.36
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/graphql.codegen.yml +1 -1
- package/package.json +27 -22
- package/src/ActionsExecutionContainerHookFactory.ts +23 -11
- package/src/dispatch/DispatchWorkerSupervisor.ts +17 -16
- package/src/dispatch/EventDispatcher.ts +0 -2
- package/src/dispatch/EventsRepository.ts +41 -40
- package/src/dispatch/ProjectDispatcher.ts +5 -10
- package/src/dispatch/WebhookTargetHandler.ts +15 -9
- package/src/dispatch/types.ts +1 -2
- package/src/graphql/http/ActionsApiMiddlewareFactory.ts +6 -5
- package/src/graphql/http/ActionsContextResolver.ts +1 -2
- package/src/graphql/http/ActionsGraphQLHandlerFactory.ts +0 -1
- package/src/graphql/http/ActionsWebsocketControllerFactory.ts +7 -5
- package/src/graphql/resolvers/ResolversFactory.ts +3 -1
- package/src/graphql/resolvers/mutation/SetVariablesMutationResolver.ts +0 -1
- package/src/graphql/resolvers/query/EventsQueryResolver.ts +1 -8
- package/src/graphql/resolvers/query/VariablesQueryResolver.ts +0 -1
- package/src/graphql/schema/index.ts +37 -36
- package/src/index.ts +50 -29
- package/src/migrations/2023-03-10-145000-actions-variables.ts +1 -1
- package/src/migrations/2025-05-28-160000-action-event-user.ts +1 -1
- package/src/migrations/snapshot.ts +1 -1
- package/src/model/EventsToProcessSpecification.ts +9 -8
- package/src/model/SetVariableCommand.ts +0 -1
- package/src/triggers/TriggerHandler.ts +5 -5
- package/src/triggers/TriggerListeners.ts +1 -8
- package/src/triggers/TriggerListenersBuilder.ts +3 -6
- package/src/triggers/TriggerPayloadBuilder.ts +25 -12
- package/src/triggers/TriggerPayloadManager.ts +0 -3
- package/src/triggers/TriggerPayloadPersister.ts +0 -1
- package/tests/cases/unit/generator.test.ts +132 -135
- package/tests/cases/unit/webhookHandler.test.ts +44 -41
- package/dist/development/index.cjs +0 -99
- package/dist/development/index.cjs.map +0 -1
- package/dist/development/index.js +0 -99
- package/dist/development/index.js.map +0 -1
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs +0 -30
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs.map +0 -1
- package/dist/development/src/ActionsExecutionContainerHookFactory.js +0 -30
- package/dist/development/src/ActionsExecutionContainerHookFactory.js.map +0 -1
- package/dist/development/src/ImplementationException.cjs +0 -6
- package/dist/development/src/ImplementationException.cjs.map +0 -1
- package/dist/development/src/ImplementationException.js +0 -6
- package/dist/development/src/ImplementationException.js.map +0 -1
- package/dist/development/src/ListenerStoreProvider.cjs +0 -25
- package/dist/development/src/ListenerStoreProvider.cjs.map +0 -1
- package/dist/development/src/ListenerStoreProvider.js +0 -25
- package/dist/development/src/ListenerStoreProvider.js.map +0 -1
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs +0 -17
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs.map +0 -1
- package/dist/development/src/authorization/ActionsAuthorizationActions.js +0 -18
- package/dist/development/src/authorization/ActionsAuthorizationActions.js.map +0 -1
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs +0 -16
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs.map +0 -1
- package/dist/development/src/authorization/ActionsPermissionsFactory.js +0 -16
- package/dist/development/src/authorization/ActionsPermissionsFactory.js.map +0 -1
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs +0 -125
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs.map +0 -1
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js +0 -125
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js.map +0 -1
- package/dist/development/src/dispatch/EventDispatcher.cjs +0 -43
- package/dist/development/src/dispatch/EventDispatcher.cjs.map +0 -1
- package/dist/development/src/dispatch/EventDispatcher.js +0 -43
- package/dist/development/src/dispatch/EventDispatcher.js.map +0 -1
- package/dist/development/src/dispatch/EventsRepository.cjs +0 -117
- package/dist/development/src/dispatch/EventsRepository.cjs.map +0 -1
- package/dist/development/src/dispatch/EventsRepository.js +0 -117
- package/dist/development/src/dispatch/EventsRepository.js.map +0 -1
- package/dist/development/src/dispatch/ProjectDispatcher.cjs +0 -99
- package/dist/development/src/dispatch/ProjectDispatcher.cjs.map +0 -1
- package/dist/development/src/dispatch/ProjectDispatcher.js +0 -99
- package/dist/development/src/dispatch/ProjectDispatcher.js.map +0 -1
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs +0 -16
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs.map +0 -1
- package/dist/development/src/dispatch/TargetHandlerResolver.js +0 -16
- package/dist/development/src/dispatch/TargetHandlerResolver.js.map +0 -1
- package/dist/development/src/dispatch/WebhookFetcher.cjs +0 -16
- package/dist/development/src/dispatch/WebhookFetcher.cjs.map +0 -1
- package/dist/development/src/dispatch/WebhookFetcher.js +0 -16
- package/dist/development/src/dispatch/WebhookFetcher.js.map +0 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs +0 -196
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs.map +0 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.js +0 -179
- package/dist/development/src/dispatch/WebhookTargetHandler.js.map +0 -1
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs +0 -39
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +0 -1
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js +0 -39
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js.map +0 -1
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs +0 -39
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs.map +0 -1
- package/dist/development/src/graphql/http/ActionsContextResolver.js +0 -39
- package/dist/development/src/graphql/http/ActionsContextResolver.js.map +0 -1
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +0 -20
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +0 -1
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js +0 -20
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +0 -1
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs +0 -149
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +0 -1
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js +0 -132
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js.map +0 -1
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs +0 -36
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/ResolversFactory.js +0 -36
- package/dist/development/src/graphql/resolvers/ResolversFactory.js.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +0 -19
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +0 -19
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs +0 -21
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.js +0 -21
- package/dist/development/src/graphql/resolvers/mutation/RetryEventMutationResolver.js.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +0 -19
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +0 -19
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs +0 -19
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.js +0 -19
- package/dist/development/src/graphql/resolvers/mutation/StopEventMutationResolver.js.map +0 -1
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs +0 -61
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js +0 -61
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js.map +0 -1
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs +0 -19
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js +0 -19
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js.map +0 -1
- package/dist/development/src/graphql/schema/actions.graphql.cjs +0 -107
- package/dist/development/src/graphql/schema/actions.graphql.cjs.map +0 -1
- package/dist/development/src/graphql/schema/actions.graphql.js +0 -107
- package/dist/development/src/graphql/schema/actions.graphql.js.map +0 -1
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs +0 -16
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs.map +0 -1
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js +0 -17
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js.map +0 -1
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.cjs +0 -16
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.cjs.map +0 -1
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.js +0 -17
- package/dist/development/src/migrations/2025-05-28-160000-action-event-user.js.map +0 -1
- package/dist/development/src/migrations/index.cjs +0 -12
- package/dist/development/src/migrations/index.cjs.map +0 -1
- package/dist/development/src/migrations/index.js +0 -12
- package/dist/development/src/migrations/index.js.map +0 -1
- package/dist/development/src/migrations/snapshot.cjs +0 -51
- package/dist/development/src/migrations/snapshot.cjs.map +0 -1
- package/dist/development/src/migrations/snapshot.js +0 -52
- package/dist/development/src/migrations/snapshot.js.map +0 -1
- package/dist/development/src/model/EventByIdQuery.cjs +0 -17
- package/dist/development/src/model/EventByIdQuery.cjs.map +0 -1
- package/dist/development/src/model/EventByIdQuery.js +0 -17
- package/dist/development/src/model/EventByIdQuery.js.map +0 -1
- package/dist/development/src/model/EventsInProcessingQuery.cjs +0 -14
- package/dist/development/src/model/EventsInProcessingQuery.cjs.map +0 -1
- package/dist/development/src/model/EventsInProcessingQuery.js +0 -14
- package/dist/development/src/model/EventsInProcessingQuery.js.map +0 -1
- package/dist/development/src/model/EventsToProcessQuery.cjs +0 -15
- package/dist/development/src/model/EventsToProcessQuery.cjs.map +0 -1
- package/dist/development/src/model/EventsToProcessQuery.js +0 -15
- package/dist/development/src/model/EventsToProcessQuery.js.map +0 -1
- package/dist/development/src/model/EventsToProcessSpecification.cjs +0 -8
- package/dist/development/src/model/EventsToProcessSpecification.cjs.map +0 -1
- package/dist/development/src/model/EventsToProcessSpecification.js +0 -8
- package/dist/development/src/model/EventsToProcessSpecification.js.map +0 -1
- package/dist/development/src/model/FailedEventsQuery.cjs +0 -14
- package/dist/development/src/model/FailedEventsQuery.cjs.map +0 -1
- package/dist/development/src/model/FailedEventsQuery.js +0 -14
- package/dist/development/src/model/FailedEventsQuery.js.map +0 -1
- package/dist/development/src/model/SetVariableCommand.cjs +0 -21
- package/dist/development/src/model/SetVariableCommand.cjs.map +0 -1
- package/dist/development/src/model/SetVariableCommand.js +0 -21
- package/dist/development/src/model/SetVariableCommand.js.map +0 -1
- package/dist/development/src/model/VariablesManager.cjs +0 -41
- package/dist/development/src/model/VariablesManager.cjs.map +0 -1
- package/dist/development/src/model/VariablesManager.js +0 -41
- package/dist/development/src/model/VariablesManager.js.map +0 -1
- package/dist/development/src/model/VariablesQuery.cjs +0 -10
- package/dist/development/src/model/VariablesQuery.cjs.map +0 -1
- package/dist/development/src/model/VariablesQuery.js +0 -10
- package/dist/development/src/model/VariablesQuery.js.map +0 -1
- package/dist/development/src/triggers/TriggerHandler.cjs +0 -127
- package/dist/development/src/triggers/TriggerHandler.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerHandler.js +0 -127
- package/dist/development/src/triggers/TriggerHandler.js.map +0 -1
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs +0 -63
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js +0 -63
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js.map +0 -1
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs +0 -169
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerListenersBuilder.js +0 -169
- package/dist/development/src/triggers/TriggerListenersBuilder.js.map +0 -1
- package/dist/development/src/triggers/TriggerListenersFactory.cjs +0 -17
- package/dist/development/src/triggers/TriggerListenersFactory.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerListenersFactory.js +0 -17
- package/dist/development/src/triggers/TriggerListenersFactory.js.map +0 -1
- package/dist/development/src/triggers/TriggerListenersStore.cjs +0 -24
- package/dist/development/src/triggers/TriggerListenersStore.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerListenersStore.js +0 -24
- package/dist/development/src/triggers/TriggerListenersStore.js.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs +0 -149
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadBuilder.js +0 -149
- package/dist/development/src/triggers/TriggerPayloadBuilder.js.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadManager.cjs +0 -27
- package/dist/development/src/triggers/TriggerPayloadManager.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadManager.js +0 -27
- package/dist/development/src/triggers/TriggerPayloadManager.js.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs +0 -47
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadPersister.js +0 -47
- package/dist/development/src/triggers/TriggerPayloadPersister.js.map +0 -1
- package/dist/development/src/utils/assertNever.cjs +0 -7
- package/dist/development/src/utils/assertNever.cjs.map +0 -1
- package/dist/development/src/utils/assertNever.js +0 -7
- package/dist/development/src/utils/assertNever.js.map +0 -1
- package/dist/development/src/utils/map.cjs +0 -13
- package/dist/development/src/utils/map.cjs.map +0 -1
- package/dist/development/src/utils/map.js +0 -13
- package/dist/development/src/utils/map.js.map +0 -1
- package/dist/development/src/utils/notifyChannel.cjs +0 -9
- package/dist/development/src/utils/notifyChannel.cjs.map +0 -1
- package/dist/development/src/utils/notifyChannel.js +0 -9
- package/dist/development/src/utils/notifyChannel.js.map +0 -1
- package/dist/production/index.cjs +0 -99
- package/dist/production/index.cjs.map +0 -1
- package/dist/production/index.js +0 -99
- package/dist/production/index.js.map +0 -1
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs +0 -30
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs.map +0 -1
- package/dist/production/src/ActionsExecutionContainerHookFactory.js +0 -30
- package/dist/production/src/ActionsExecutionContainerHookFactory.js.map +0 -1
- package/dist/production/src/ImplementationException.cjs +0 -6
- package/dist/production/src/ImplementationException.cjs.map +0 -1
- package/dist/production/src/ImplementationException.js +0 -6
- package/dist/production/src/ImplementationException.js.map +0 -1
- package/dist/production/src/ListenerStoreProvider.cjs +0 -25
- package/dist/production/src/ListenerStoreProvider.cjs.map +0 -1
- package/dist/production/src/ListenerStoreProvider.js +0 -25
- package/dist/production/src/ListenerStoreProvider.js.map +0 -1
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs +0 -17
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs.map +0 -1
- package/dist/production/src/authorization/ActionsAuthorizationActions.js +0 -18
- package/dist/production/src/authorization/ActionsAuthorizationActions.js.map +0 -1
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs +0 -16
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs.map +0 -1
- package/dist/production/src/authorization/ActionsPermissionsFactory.js +0 -16
- package/dist/production/src/authorization/ActionsPermissionsFactory.js.map +0 -1
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs +0 -125
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs.map +0 -1
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js +0 -125
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js.map +0 -1
- package/dist/production/src/dispatch/EventDispatcher.cjs +0 -43
- package/dist/production/src/dispatch/EventDispatcher.cjs.map +0 -1
- package/dist/production/src/dispatch/EventDispatcher.js +0 -43
- package/dist/production/src/dispatch/EventDispatcher.js.map +0 -1
- package/dist/production/src/dispatch/EventsRepository.cjs +0 -117
- package/dist/production/src/dispatch/EventsRepository.cjs.map +0 -1
- package/dist/production/src/dispatch/EventsRepository.js +0 -117
- package/dist/production/src/dispatch/EventsRepository.js.map +0 -1
- package/dist/production/src/dispatch/ProjectDispatcher.cjs +0 -99
- package/dist/production/src/dispatch/ProjectDispatcher.cjs.map +0 -1
- package/dist/production/src/dispatch/ProjectDispatcher.js +0 -99
- package/dist/production/src/dispatch/ProjectDispatcher.js.map +0 -1
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs +0 -16
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs.map +0 -1
- package/dist/production/src/dispatch/TargetHandlerResolver.js +0 -16
- package/dist/production/src/dispatch/TargetHandlerResolver.js.map +0 -1
- package/dist/production/src/dispatch/WebhookFetcher.cjs +0 -16
- package/dist/production/src/dispatch/WebhookFetcher.cjs.map +0 -1
- package/dist/production/src/dispatch/WebhookFetcher.js +0 -16
- package/dist/production/src/dispatch/WebhookFetcher.js.map +0 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs +0 -196
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs.map +0 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.js +0 -179
- package/dist/production/src/dispatch/WebhookTargetHandler.js.map +0 -1
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs +0 -39
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +0 -1
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js +0 -39
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js.map +0 -1
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs +0 -39
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs.map +0 -1
- package/dist/production/src/graphql/http/ActionsContextResolver.js +0 -39
- package/dist/production/src/graphql/http/ActionsContextResolver.js.map +0 -1
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs +0 -20
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +0 -1
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js +0 -20
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +0 -1
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs +0 -149
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +0 -1
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js +0 -132
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js.map +0 -1
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs +0 -36
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/ResolversFactory.js +0 -36
- package/dist/production/src/graphql/resolvers/ResolversFactory.js.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs +0 -19
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js +0 -19
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs +0 -21
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.js +0 -21
- package/dist/production/src/graphql/resolvers/mutation/RetryEventMutationResolver.js.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs +0 -19
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js +0 -19
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs +0 -19
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.js +0 -19
- package/dist/production/src/graphql/resolvers/mutation/StopEventMutationResolver.js.map +0 -1
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs +0 -61
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js +0 -61
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js.map +0 -1
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs +0 -19
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js +0 -19
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js.map +0 -1
- package/dist/production/src/graphql/schema/actions.graphql.cjs +0 -107
- package/dist/production/src/graphql/schema/actions.graphql.cjs.map +0 -1
- package/dist/production/src/graphql/schema/actions.graphql.js +0 -107
- package/dist/production/src/graphql/schema/actions.graphql.js.map +0 -1
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs +0 -16
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs.map +0 -1
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js +0 -17
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js.map +0 -1
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.cjs +0 -16
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.cjs.map +0 -1
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.js +0 -17
- package/dist/production/src/migrations/2025-05-28-160000-action-event-user.js.map +0 -1
- package/dist/production/src/migrations/index.cjs +0 -12
- package/dist/production/src/migrations/index.cjs.map +0 -1
- package/dist/production/src/migrations/index.js +0 -12
- package/dist/production/src/migrations/index.js.map +0 -1
- package/dist/production/src/migrations/snapshot.cjs +0 -51
- package/dist/production/src/migrations/snapshot.cjs.map +0 -1
- package/dist/production/src/migrations/snapshot.js +0 -52
- package/dist/production/src/migrations/snapshot.js.map +0 -1
- package/dist/production/src/model/EventByIdQuery.cjs +0 -17
- package/dist/production/src/model/EventByIdQuery.cjs.map +0 -1
- package/dist/production/src/model/EventByIdQuery.js +0 -17
- package/dist/production/src/model/EventByIdQuery.js.map +0 -1
- package/dist/production/src/model/EventsInProcessingQuery.cjs +0 -14
- package/dist/production/src/model/EventsInProcessingQuery.cjs.map +0 -1
- package/dist/production/src/model/EventsInProcessingQuery.js +0 -14
- package/dist/production/src/model/EventsInProcessingQuery.js.map +0 -1
- package/dist/production/src/model/EventsToProcessQuery.cjs +0 -15
- package/dist/production/src/model/EventsToProcessQuery.cjs.map +0 -1
- package/dist/production/src/model/EventsToProcessQuery.js +0 -15
- package/dist/production/src/model/EventsToProcessQuery.js.map +0 -1
- package/dist/production/src/model/EventsToProcessSpecification.cjs +0 -8
- package/dist/production/src/model/EventsToProcessSpecification.cjs.map +0 -1
- package/dist/production/src/model/EventsToProcessSpecification.js +0 -8
- package/dist/production/src/model/EventsToProcessSpecification.js.map +0 -1
- package/dist/production/src/model/FailedEventsQuery.cjs +0 -14
- package/dist/production/src/model/FailedEventsQuery.cjs.map +0 -1
- package/dist/production/src/model/FailedEventsQuery.js +0 -14
- package/dist/production/src/model/FailedEventsQuery.js.map +0 -1
- package/dist/production/src/model/SetVariableCommand.cjs +0 -21
- package/dist/production/src/model/SetVariableCommand.cjs.map +0 -1
- package/dist/production/src/model/SetVariableCommand.js +0 -21
- package/dist/production/src/model/SetVariableCommand.js.map +0 -1
- package/dist/production/src/model/VariablesManager.cjs +0 -41
- package/dist/production/src/model/VariablesManager.cjs.map +0 -1
- package/dist/production/src/model/VariablesManager.js +0 -41
- package/dist/production/src/model/VariablesManager.js.map +0 -1
- package/dist/production/src/model/VariablesQuery.cjs +0 -10
- package/dist/production/src/model/VariablesQuery.cjs.map +0 -1
- package/dist/production/src/model/VariablesQuery.js +0 -10
- package/dist/production/src/model/VariablesQuery.js.map +0 -1
- package/dist/production/src/triggers/TriggerHandler.cjs +0 -127
- package/dist/production/src/triggers/TriggerHandler.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerHandler.js +0 -127
- package/dist/production/src/triggers/TriggerHandler.js.map +0 -1
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs +0 -63
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js +0 -63
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js.map +0 -1
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs +0 -169
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerListenersBuilder.js +0 -169
- package/dist/production/src/triggers/TriggerListenersBuilder.js.map +0 -1
- package/dist/production/src/triggers/TriggerListenersFactory.cjs +0 -17
- package/dist/production/src/triggers/TriggerListenersFactory.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerListenersFactory.js +0 -17
- package/dist/production/src/triggers/TriggerListenersFactory.js.map +0 -1
- package/dist/production/src/triggers/TriggerListenersStore.cjs +0 -24
- package/dist/production/src/triggers/TriggerListenersStore.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerListenersStore.js +0 -24
- package/dist/production/src/triggers/TriggerListenersStore.js.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs +0 -149
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadBuilder.js +0 -149
- package/dist/production/src/triggers/TriggerPayloadBuilder.js.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadManager.cjs +0 -27
- package/dist/production/src/triggers/TriggerPayloadManager.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadManager.js +0 -27
- package/dist/production/src/triggers/TriggerPayloadManager.js.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs +0 -47
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadPersister.js +0 -47
- package/dist/production/src/triggers/TriggerPayloadPersister.js.map +0 -1
- package/dist/production/src/utils/assertNever.cjs +0 -7
- package/dist/production/src/utils/assertNever.cjs.map +0 -1
- package/dist/production/src/utils/assertNever.js +0 -7
- package/dist/production/src/utils/assertNever.js.map +0 -1
- package/dist/production/src/utils/map.cjs +0 -13
- package/dist/production/src/utils/map.cjs.map +0 -1
- package/dist/production/src/utils/map.js +0 -13
- package/dist/production/src/utils/map.js.map +0 -1
- package/dist/production/src/utils/notifyChannel.cjs +0 -9
- package/dist/production/src/utils/notifyChannel.cjs.map +0 -1
- package/dist/production/src/utils/notifyChannel.js +0 -9
- package/dist/production/src/utils/notifyChannel.js.map +0 -1
- package/dist/tests/cases/unit/generator.test.d.ts +0 -2
- package/dist/tests/cases/unit/generator.test.d.ts.map +0 -1
- package/dist/tests/cases/unit/webhookHandler.test.d.ts +0 -2
- package/dist/tests/cases/unit/webhookHandler.test.d.ts.map +0 -1
- package/dist/tests/src/gql.d.ts +0 -2
- package/dist/tests/src/gql.d.ts.map +0 -1
- package/dist/tests/src/uuid.d.ts +0 -3
- package/dist/tests/src/uuid.d.ts.map +0 -1
- package/dist/tests/tsconfig.tsbuildinfo +0 -1
- package/dist/types/ActionsExecutionContainerHookFactory.d.ts +0 -8
- package/dist/types/ActionsExecutionContainerHookFactory.d.ts.map +0 -1
- package/dist/types/ImplementationException.d.ts +0 -3
- package/dist/types/ImplementationException.d.ts.map +0 -1
- package/dist/types/ListenerStoreProvider.d.ts +0 -7
- package/dist/types/ListenerStoreProvider.d.ts.map +0 -1
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts +0 -38
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts.map +0 -1
- package/dist/types/authorization/ActionsPermissionsFactory.d.ts +0 -5
- package/dist/types/authorization/ActionsPermissionsFactory.d.ts.map +0 -1
- package/dist/types/authorization/Identity.d.ts +0 -5
- package/dist/types/authorization/Identity.d.ts.map +0 -1
- package/dist/types/authorization/index.d.ts +0 -4
- package/dist/types/authorization/index.d.ts.map +0 -1
- package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts +0 -17
- package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts.map +0 -1
- package/dist/types/dispatch/EventDispatcher.d.ts +0 -25
- package/dist/types/dispatch/EventDispatcher.d.ts.map +0 -1
- package/dist/types/dispatch/EventsRepository.d.ts +0 -23
- package/dist/types/dispatch/EventsRepository.d.ts.map +0 -1
- package/dist/types/dispatch/ProjectDispatcher.d.ts +0 -22
- package/dist/types/dispatch/ProjectDispatcher.d.ts.map +0 -1
- package/dist/types/dispatch/TargetHandlerResolver.d.ts +0 -9
- package/dist/types/dispatch/TargetHandlerResolver.d.ts.map +0 -1
- package/dist/types/dispatch/WebhookFetcher.d.ts +0 -14
- package/dist/types/dispatch/WebhookFetcher.d.ts.map +0 -1
- package/dist/types/dispatch/WebhookTargetHandler.d.ts +0 -16
- package/dist/types/dispatch/WebhookTargetHandler.d.ts.map +0 -1
- package/dist/types/dispatch/types.d.ts +0 -27
- package/dist/types/dispatch/types.d.ts.map +0 -1
- package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts +0 -13
- package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts.map +0 -1
- package/dist/types/graphql/http/ActionsContextResolver.d.ts +0 -14
- package/dist/types/graphql/http/ActionsContextResolver.d.ts.map +0 -1
- package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts +0 -8
- package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts.map +0 -1
- package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts +0 -11
- package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/ActionsContext.d.ts +0 -14
- package/dist/types/graphql/resolvers/ActionsContext.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts +0 -15
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/index.d.ts +0 -3
- package/dist/types/graphql/resolvers/index.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts +0 -11
- package/dist/types/graphql/resolvers/mutation/ProcessBatchMutationResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/mutation/RetryEventMutationResolver.d.ts +0 -11
- package/dist/types/graphql/resolvers/mutation/RetryEventMutationResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts +0 -11
- package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/mutation/StopEventMutationResolver.d.ts +0 -11
- package/dist/types/graphql/resolvers/mutation/StopEventMutationResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/mutation/index.d.ts +0 -5
- package/dist/types/graphql/resolvers/mutation/index.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts +0 -14
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts +0 -12
- package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/query/index.d.ts +0 -2
- package/dist/types/graphql/resolvers/query/index.d.ts.map +0 -1
- package/dist/types/graphql/schema/actions.graphql.d.ts +0 -3
- package/dist/types/graphql/schema/actions.graphql.d.ts.map +0 -1
- package/dist/types/graphql/schema/index.d.ts +0 -299
- package/dist/types/graphql/schema/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts +0 -3
- package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts.map +0 -1
- package/dist/types/migrations/2025-05-28-160000-action-event-user.d.ts +0 -3
- package/dist/types/migrations/2025-05-28-160000-action-event-user.d.ts.map +0 -1
- package/dist/types/migrations/index.d.ts +0 -3
- package/dist/types/migrations/index.d.ts.map +0 -1
- package/dist/types/migrations/snapshot.d.ts +0 -3
- package/dist/types/migrations/snapshot.d.ts.map +0 -1
- package/dist/types/model/EventByIdQuery.d.ts +0 -8
- package/dist/types/model/EventByIdQuery.d.ts.map +0 -1
- package/dist/types/model/EventsInProcessingQuery.d.ts +0 -9
- package/dist/types/model/EventsInProcessingQuery.d.ts.map +0 -1
- package/dist/types/model/EventsToProcessQuery.d.ts +0 -9
- package/dist/types/model/EventsToProcessQuery.d.ts.map +0 -1
- package/dist/types/model/EventsToProcessSpecification.d.ts +0 -4
- package/dist/types/model/EventsToProcessSpecification.d.ts.map +0 -1
- package/dist/types/model/FailedEventsQuery.d.ts +0 -9
- package/dist/types/model/FailedEventsQuery.d.ts.map +0 -1
- package/dist/types/model/SetVariableCommand.d.ts +0 -8
- package/dist/types/model/SetVariableCommand.d.ts.map +0 -1
- package/dist/types/model/VariablesManager.d.ts +0 -8
- package/dist/types/model/VariablesManager.d.ts.map +0 -1
- package/dist/types/model/VariablesQuery.d.ts +0 -12
- package/dist/types/model/VariablesQuery.d.ts.map +0 -1
- package/dist/types/model/types.d.ts +0 -22
- package/dist/types/model/types.d.ts.map +0 -1
- package/dist/types/triggers/TriggerHandler.d.ts +0 -26
- package/dist/types/triggers/TriggerHandler.d.ts.map +0 -1
- package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts +0 -19
- package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts.map +0 -1
- package/dist/types/triggers/TriggerListeners.d.ts +0 -9
- package/dist/types/triggers/TriggerListeners.d.ts.map +0 -1
- package/dist/types/triggers/TriggerListenersBuilder.d.ts +0 -15
- package/dist/types/triggers/TriggerListenersBuilder.d.ts.map +0 -1
- package/dist/types/triggers/TriggerListenersFactory.d.ts +0 -8
- package/dist/types/triggers/TriggerListenersFactory.d.ts.map +0 -1
- package/dist/types/triggers/TriggerListenersStore.d.ts +0 -48
- package/dist/types/triggers/TriggerListenersStore.d.ts.map +0 -1
- package/dist/types/triggers/TriggerPayloadBuilder.d.ts +0 -14
- package/dist/types/triggers/TriggerPayloadBuilder.d.ts.map +0 -1
- package/dist/types/triggers/TriggerPayloadManager.d.ts +0 -22
- package/dist/types/triggers/TriggerPayloadManager.d.ts.map +0 -1
- package/dist/types/triggers/TriggerPayloadPersister.d.ts +0 -21
- package/dist/types/triggers/TriggerPayloadPersister.d.ts.map +0 -1
- package/dist/types/triggers/index.d.ts +0 -8
- package/dist/types/triggers/index.d.ts.map +0 -1
- package/dist/types/tsconfig.tsbuildinfo +0 -1
- package/dist/types/utils/assertNever.d.ts +0 -2
- package/dist/types/utils/assertNever.d.ts.map +0 -1
- package/dist/types/utils/map.d.ts +0 -2
- package/dist/types/utils/map.d.ts.map +0 -1
- package/dist/types/utils/notifyChannel.d.ts +0 -4
- package/dist/types/utils/notifyChannel.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
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;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,gCAA+B,SAA2B;AACzD,UAAQ,IAAI,GAAG;AAChB;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,gCAA+B,SAA2B;AACzD,UAAQ,IAAI,GAAG;AAChB;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,+BAA+B,SAA2B;AACzD,UAAQ,IAAI,GAAG;AAChB;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,+BAA+B,SAA2B;AACzD,UAAQ,IAAI,GAAG;AAChB;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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":";;;;;;AAKa,MAAA,kBAAkB,IAAIA,mBAAA,eAAe,UAAU;AAAA,EAC3D,uCAAuCC;AAAAA,EACvC,uCAAuCC;AACxC,CAAC;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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":";;;;AAKa,MAAA,kBAAkB,IAAI,eAAe,UAAU;AAAA,EAC3D,uCAAuC;AAAA,EACvC,uCAAuC;AACxC,CAAC;"}
|
|
@@ -1,51 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,SAA+B,SAA2B;AACzD,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;;"}
|
|
@@ -1,52 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,SAA+B,SAA2B;AACzD,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;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACK,UAAA;AAFW,SAAA,KAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAwD;AAC7D,UAAA,SAAS,MAAMC,uBAAc,SACjC,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,UAAU,UAAU,EAAE;AACjB,WAAA,KAAK,eAAe,MAAM;AAAA,EAAA;AAEnC;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACK,UAAA;AAFW,SAAA,KAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAwD;AAC7D,UAAA,SAAS,MAAM,cAAc,SACjC,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM;AAAA,MACN,IAAI,KAAK;AAAA,IAAA,CACT,EACA,UAAU,UAAU,EAAE;AACjB,WAAA,KAAK,eAAe,MAAM;AAAA,EAAA;AAEnC;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACK,UAAA;AAFW,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAmD;AAC9D,WAAOC,SAAAA,cAAc,OACnB,EAAA,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,CAAM,OAAA,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,EAAA;AAE1B;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACK,UAAA;AAFW,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAmD;AAC9D,WAAO,cAAc,OACnB,EAAA,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,CAAM,OAAA,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,EAAA;AAE1B;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACK,UAAA;AAFW,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAmD;AACvD,WAAAC,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,EAAA;AAE1B;;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AACK,UAAA;AAFW,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAmD;AACvD,WAAA,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,EAAA;AAE1B;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Database = require("@contember/database");
|
|
4
|
-
const eventsToProcessStateSpecification = (qb) => qb.where((it) => it.in("state", ["retrying", "created", "processing"]));
|
|
5
|
-
const eventsToProcessSpecification = (qb) => qb.match(eventsToProcessStateSpecification).where((it) => it.compare("visible_at", Database.Operator.lte, "now")).orderBy("priority", "desc").orderBy("visible_at");
|
|
6
|
-
exports.eventsToProcessSpecification = eventsToProcessSpecification;
|
|
7
|
-
exports.eventsToProcessStateSpecification = eventsToProcessStateSpecification;
|
|
8
|
-
//# sourceMappingURL=EventsToProcessSpecification.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventsToProcessSpecification.cjs","sources":["../../../../../packages/engine-actions/src/model/EventsToProcessSpecification.ts"],"sourcesContent":["import { Operator, SelectBuilderSpecification } from '@contember/database'\n\n\nexport const eventsToProcessStateSpecification: SelectBuilderSpecification = qb => qb\n\t.where(it => it.in('state', ['retrying', 'created', 'processing']))\n\nexport const eventsToProcessSpecification: SelectBuilderSpecification = qb => qb\n\t.match(eventsToProcessStateSpecification)\n\t.where(it => it.compare('visible_at', Operator.lte, 'now'))\n\t.orderBy('priority', 'desc')\n\t.orderBy('visible_at')\n"],"names":["Operator"],"mappings":";;;AAGO,MAAM,oCAAgE,CAAA,OAAM,GACjF,MAAM,CAAM,OAAA,GAAG,GAAG,SAAS,CAAC,YAAY,WAAW,YAAY,CAAC,CAAC;AAEtD,MAAA,+BAA2D,QAAM,GAC5E,MAAM,iCAAiC,EACvC,MAAM,QAAM,GAAG,QAAQ,cAAcA,SAAS,SAAA,KAAK,KAAK,CAAC,EACzD,QAAQ,YAAY,MAAM,EAC1B,QAAQ,YAAY;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Operator } from "@contember/database";
|
|
2
|
-
const eventsToProcessStateSpecification = (qb) => qb.where((it) => it.in("state", ["retrying", "created", "processing"]));
|
|
3
|
-
const eventsToProcessSpecification = (qb) => qb.match(eventsToProcessStateSpecification).where((it) => it.compare("visible_at", Operator.lte, "now")).orderBy("priority", "desc").orderBy("visible_at");
|
|
4
|
-
export {
|
|
5
|
-
eventsToProcessSpecification,
|
|
6
|
-
eventsToProcessStateSpecification
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=EventsToProcessSpecification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventsToProcessSpecification.js","sources":["../../../../../packages/engine-actions/src/model/EventsToProcessSpecification.ts"],"sourcesContent":["import { Operator, SelectBuilderSpecification } from '@contember/database'\n\n\nexport const eventsToProcessStateSpecification: SelectBuilderSpecification = qb => qb\n\t.where(it => it.in('state', ['retrying', 'created', 'processing']))\n\nexport const eventsToProcessSpecification: SelectBuilderSpecification = qb => qb\n\t.match(eventsToProcessStateSpecification)\n\t.where(it => it.compare('visible_at', Operator.lte, 'now'))\n\t.orderBy('priority', 'desc')\n\t.orderBy('visible_at')\n"],"names":[],"mappings":";AAGO,MAAM,oCAAgE,CAAA,OAAM,GACjF,MAAM,CAAM,OAAA,GAAG,GAAG,SAAS,CAAC,YAAY,WAAW,YAAY,CAAC,CAAC;AAEtD,MAAA,+BAA2D,QAAM,GAC5E,MAAM,iCAAiC,EACvC,MAAM,QAAM,GAAG,QAAQ,cAAc,SAAS,KAAK,KAAK,CAAC,EACzD,QAAQ,YAAY,MAAM,EAC1B,QAAQ,YAAY;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Database = require("@contember/database");
|
|
4
|
-
class FailedEventsQuery 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", ["failed", "retrying"])).orderBy("last_state_change", "desc").limit(this.args.limit ?? 100, this.args.offset ?? 0).getResult(queryable.db);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.FailedEventsQuery = FailedEventsQuery;
|
|
14
|
-
//# sourceMappingURL=FailedEventsQuery.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FailedEventsQuery.cjs","sources":["../../../../../packages/engine-actions/src/model/FailedEventsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\nimport { EventArgs } from '../graphql/schema'\n\nexport class FailedEventsQuery 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', ['failed', 'retrying']))\n\t\t\t.orderBy('last_state_change', 'desc')\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,0BAA0BA,SAAAA,cAA0B;AAAA,EAChE,YACkB,MAChB;AACK,UAAA;AAFW,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAmD;AAC9D,WAAOC,SAAAA,cAAc,OAAiB,EACpC,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,QAAM,GAAG,GAAG,SAAS,CAAC,UAAU,UAAU,CAAC,CAAC,EAClD,QAAQ,qBAAqB,MAAM,EACnC,MAAM,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,UAAU,CAAC,EACnD,UAAU,UAAU,EAAE;AAAA,EAAA;AAE1B;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DatabaseQuery, SelectBuilder } from "@contember/database";
|
|
2
|
-
class FailedEventsQuery 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", ["failed", "retrying"])).orderBy("last_state_change", "desc").limit(this.args.limit ?? 100, this.args.offset ?? 0).getResult(queryable.db);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
FailedEventsQuery
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=FailedEventsQuery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FailedEventsQuery.js","sources":["../../../../../packages/engine-actions/src/model/FailedEventsQuery.ts"],"sourcesContent":["import { DatabaseQuery, DatabaseQueryable, SelectBuilder } from '@contember/database'\nimport { EventRow } from './types'\nimport { EventArgs } from '../graphql/schema'\n\nexport class FailedEventsQuery 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', ['failed', 'retrying']))\n\t\t\t.orderBy('last_state_change', 'desc')\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,0BAA0B,cAA0B;AAAA,EAChE,YACkB,MAChB;AACK,UAAA;AAFW,SAAA,OAAA;AAAA,EAAA;AAAA,EAKlB,MAAM,MAAM,WAAmD;AAC9D,WAAO,cAAc,OAAiB,EACpC,KAAK,eAAe,EACpB,OAAO,GAAG,EACV,MAAM,QAAM,GAAG,GAAG,SAAS,CAAC,UAAU,UAAU,CAAC,CAAC,EAClD,QAAQ,qBAAqB,MAAM,EACnC,MAAM,KAAK,KAAK,SAAS,KAAK,KAAK,KAAK,UAAU,CAAC,EACnD,UAAU,UAAU,EAAE;AAAA,EAAA;AAE1B;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const Database = require("@contember/database");
|
|
4
|
-
class SetVariableCommand {
|
|
5
|
-
constructor(name, value) {
|
|
6
|
-
this.name = name;
|
|
7
|
-
this.value = value;
|
|
8
|
-
}
|
|
9
|
-
async execute({ providers, db }) {
|
|
10
|
-
await Database.InsertBuilder.create().into("actions_variable").values({
|
|
11
|
-
id: providers.uuid(),
|
|
12
|
-
name: this.name,
|
|
13
|
-
value: this.value
|
|
14
|
-
}).onConflict(Database.ConflictActionType.update, ["name"], {
|
|
15
|
-
value: this.value,
|
|
16
|
-
updated_at: new Database.Literal("NOW()")
|
|
17
|
-
}).execute(db);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.SetVariableCommand = SetVariableCommand;
|
|
21
|
-
//# sourceMappingURL=SetVariableCommand.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetVariableCommand.cjs","sources":["../../../../../packages/engine-actions/src/model/SetVariableCommand.ts"],"sourcesContent":["import { Command } from '@contember/engine-system-api'\nimport { ConflictActionType, InsertBuilder, Literal } from '@contember/database'\n\nexport class SetVariableCommand implements Command<void> {\n\n\tconstructor(\n\t\tprivate readonly name: string,\n\t\tprivate readonly value: string,\n\t) {\n\t}\n\n\tasync execute({ providers, db }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('actions_variable')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tname: this.name,\n\t\t\t\tvalue: this.value,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['name'], {\n\t\t\t\tvalue: this.value,\n\t\t\t\tupdated_at: new Literal('NOW()'),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder","ConflictActionType","Literal"],"mappings":";;;AAGO,MAAM,mBAA4C;AAAA,EAExD,YACkB,MACA,OAChB;AAFgB,SAAA,OAAA;AACA,SAAA,QAAA;AAAA,EAAA;AAAA,EAIlB,MAAM,QAAQ,EAAE,WAAW,MAAmC;AAC7D,UAAMA,SAAAA,cAAc,OAAO,EACzB,KAAK,kBAAkB,EACvB,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,MAAM,KAAK;AAAA,MACX,OAAO,KAAK;AAAA,IACZ,CAAA,EACA,WAAWC,SAAAA,mBAAmB,QAAQ,CAAC,MAAM,GAAG;AAAA,MAChD,OAAO,KAAK;AAAA,MACZ,YAAY,IAAIC,SAAAA,QAAQ,OAAO;AAAA,IAAA,CAC/B,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { InsertBuilder as InsertBuilder$1, ConflictActionType, Literal } from "@contember/database";
|
|
2
|
-
class SetVariableCommand {
|
|
3
|
-
constructor(name, value) {
|
|
4
|
-
this.name = name;
|
|
5
|
-
this.value = value;
|
|
6
|
-
}
|
|
7
|
-
async execute({ providers, db }) {
|
|
8
|
-
await InsertBuilder$1.create().into("actions_variable").values({
|
|
9
|
-
id: providers.uuid(),
|
|
10
|
-
name: this.name,
|
|
11
|
-
value: this.value
|
|
12
|
-
}).onConflict(ConflictActionType.update, ["name"], {
|
|
13
|
-
value: this.value,
|
|
14
|
-
updated_at: new Literal("NOW()")
|
|
15
|
-
}).execute(db);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export {
|
|
19
|
-
SetVariableCommand
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=SetVariableCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SetVariableCommand.js","sources":["../../../../../packages/engine-actions/src/model/SetVariableCommand.ts"],"sourcesContent":["import { Command } from '@contember/engine-system-api'\nimport { ConflictActionType, InsertBuilder, Literal } from '@contember/database'\n\nexport class SetVariableCommand implements Command<void> {\n\n\tconstructor(\n\t\tprivate readonly name: string,\n\t\tprivate readonly value: string,\n\t) {\n\t}\n\n\tasync execute({ providers, db }: Command.Args): Promise<void> {\n\t\tawait InsertBuilder.create()\n\t\t\t.into('actions_variable')\n\t\t\t.values({\n\t\t\t\tid: providers.uuid(),\n\t\t\t\tname: this.name,\n\t\t\t\tvalue: this.value,\n\t\t\t})\n\t\t\t.onConflict(ConflictActionType.update, ['name'], {\n\t\t\t\tvalue: this.value,\n\t\t\t\tupdated_at: new Literal('NOW()'),\n\t\t\t})\n\t\t\t.execute(db)\n\t}\n}\n"],"names":["InsertBuilder"],"mappings":";AAGO,MAAM,mBAA4C;AAAA,EAExD,YACkB,MACA,OAChB;AAFgB,SAAA,OAAA;AACA,SAAA,QAAA;AAAA,EAAA;AAAA,EAIlB,MAAM,QAAQ,EAAE,WAAW,MAAmC;AAC7D,UAAMA,gBAAc,OAAO,EACzB,KAAK,kBAAkB,EACvB,OAAO;AAAA,MACP,IAAI,UAAU,KAAK;AAAA,MACnB,MAAM,KAAK;AAAA,MACX,OAAO,KAAK;AAAA,IACZ,CAAA,EACA,WAAW,mBAAmB,QAAQ,CAAC,MAAM,GAAG;AAAA,MAChD,OAAO,KAAK;AAAA,MACZ,YAAY,IAAI,QAAQ,OAAO;AAAA,IAAA,CAC/B,EACA,QAAQ,EAAE;AAAA,EAAA;AAEd;"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const VariablesQuery = require("./VariablesQuery.cjs");
|
|
4
|
-
const Database = require("@contember/database");
|
|
5
|
-
const SetVariableCommand = require("./SetVariableCommand.cjs");
|
|
6
|
-
class VariablesManager {
|
|
7
|
-
async fetchVariables(db) {
|
|
8
|
-
return Object.fromEntries((await db.queryHandler.fetch(new VariablesQuery.VariablesQuery())).map((it) => [it.name, it.value]));
|
|
9
|
-
}
|
|
10
|
-
async setVariables(db, args) {
|
|
11
|
-
return await db.transaction(async (db2) => {
|
|
12
|
-
const current = await this.fetchVariables(db2);
|
|
13
|
-
const mode = args.mode ?? "MERGE";
|
|
14
|
-
const inputVariables = Object.fromEntries(args.variables.map((it) => [it.name, it.value]));
|
|
15
|
-
let newVariables = {};
|
|
16
|
-
switch (mode) {
|
|
17
|
-
case "APPEND_ONLY_MISSING":
|
|
18
|
-
newVariables = { ...inputVariables, ...current };
|
|
19
|
-
break;
|
|
20
|
-
case "MERGE":
|
|
21
|
-
newVariables = { ...current, ...inputVariables };
|
|
22
|
-
break;
|
|
23
|
-
case "SET":
|
|
24
|
-
newVariables = inputVariables;
|
|
25
|
-
break;
|
|
26
|
-
}
|
|
27
|
-
const toDelete = Object.keys(current).filter((it) => !(it in newVariables));
|
|
28
|
-
if (toDelete.length > 0) {
|
|
29
|
-
await Database.DeleteBuilder.create().from("actions_variable").where((it) => it.in("name", toDelete)).execute(db2.client);
|
|
30
|
-
}
|
|
31
|
-
for (const [name, value] of Object.entries(newVariables)) {
|
|
32
|
-
if (value === current[name]) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
await db2.commandBus.execute(new SetVariableCommand.SetVariableCommand(name, value));
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.VariablesManager = VariablesManager;
|
|
41
|
-
//# sourceMappingURL=VariablesManager.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VariablesManager.cjs","sources":["../../../../../packages/engine-actions/src/model/VariablesManager.ts"],"sourcesContent":["import { DatabaseContext } from '@contember/engine-system-api'\nimport { VariablesQuery } from './VariablesQuery'\nimport { SetVariablesArgs } from '../graphql/schema'\nimport { DeleteBuilder } from '@contember/database'\nimport { SetVariableCommand } from './SetVariableCommand'\n\nexport type VariablesMap = Record<string, string>\n\nexport class VariablesManager {\n\tpublic async fetchVariables(db: DatabaseContext): Promise<VariablesMap> {\n\t\treturn Object.fromEntries((await db.queryHandler.fetch(new VariablesQuery())).map(it => [it.name, it.value]))\n\t}\n\n\tpublic async setVariables(db: DatabaseContext, args: SetVariablesArgs) {\n\t\treturn await db.transaction(async db => {\n\t\t\tconst current = await this.fetchVariables(db)\n\t\t\tconst mode = args.mode ?? 'MERGE'\n\t\t\tconst inputVariables = Object.fromEntries(args.variables.map(it => [it.name, it.value]))\n\n\t\t\tlet newVariables: VariablesMap = {}\n\t\t\tswitch (mode) {\n\t\t\t\tcase 'APPEND_ONLY_MISSING':\n\t\t\t\t\tnewVariables = { ...inputVariables, ...current }\n\t\t\t\t\tbreak\n\t\t\t\tcase 'MERGE':\n\t\t\t\t\tnewVariables = { ...current, ...inputVariables }\n\t\t\t\t\tbreak\n\t\t\t\tcase 'SET':\n\t\t\t\t\tnewVariables = inputVariables\n\t\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tconst toDelete = Object.keys(current).filter(it => !(it in newVariables))\n\t\t\tif (toDelete.length > 0) {\n\t\t\t\tawait DeleteBuilder.create()\n\t\t\t\t\t.from('actions_variable')\n\t\t\t\t\t.where(it => it.in('name', toDelete))\n\t\t\t\t\t.execute(db.client)\n\t\t\t}\n\n\t\t\tfor (const [name, value] of Object.entries(newVariables)) {\n\t\t\t\tif (value === current[name]) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tawait db.commandBus.execute(new SetVariableCommand(name, value))\n\t\t\t}\n\t\t})\n\t}\n}\n"],"names":["VariablesQuery","db","DeleteBuilder","SetVariableCommand"],"mappings":";;;;;AAQO,MAAM,iBAAiB;AAAA,EAC7B,MAAa,eAAe,IAA4C;AACvE,WAAO,OAAO,aAAa,MAAM,GAAG,aAAa,MAAM,IAAIA,eAAe,eAAA,CAAC,GAAG,IAAI,QAAM,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,CAAC;AAAA,EAAA;AAAA,EAG7G,MAAa,aAAa,IAAqB,MAAwB;AACtE,WAAO,MAAM,GAAG,YAAY,OAAMC,QAAM;AACvC,YAAM,UAAU,MAAM,KAAK,eAAeA,GAAE;AACtC,YAAA,OAAO,KAAK,QAAQ;AAC1B,YAAM,iBAAiB,OAAO,YAAY,KAAK,UAAU,IAAI,CAAM,OAAA,CAAC,GAAG,MAAM,GAAG,KAAK,CAAC,CAAC;AAEvF,UAAI,eAA6B,CAAC;AAClC,cAAQ,MAAM;AAAA,QACb,KAAK;AACJ,yBAAe,EAAE,GAAG,gBAAgB,GAAG,QAAQ;AAC/C;AAAA,QACD,KAAK;AACJ,yBAAe,EAAE,GAAG,SAAS,GAAG,eAAe;AAC/C;AAAA,QACD,KAAK;AACW,yBAAA;AACf;AAAA,MAAA;AAGI,YAAA,WAAW,OAAO,KAAK,OAAO,EAAE,OAAO,CAAA,OAAM,EAAE,MAAM,aAAa;AACpE,UAAA,SAAS,SAAS,GAAG;AACxB,cAAMC,SAAAA,cAAc,OAAO,EACzB,KAAK,kBAAkB,EACvB,MAAM,CAAA,OAAM,GAAG,GAAG,QAAQ,QAAQ,CAAC,EACnC,QAAQD,IAAG,MAAM;AAAA,MAAA;AAGpB,iBAAW,CAAC,MAAM,KAAK,KAAK,OAAO,QAAQ,YAAY,GAAG;AACrD,YAAA,UAAU,QAAQ,IAAI,GAAG;AAC5B;AAAA,QAAA;AAED,cAAMA,IAAG,WAAW,QAAQ,IAAIE,mBAAAA,mBAAmB,MAAM,KAAK,CAAC;AAAA,MAAA;AAAA,IAChE,CACA;AAAA,EAAA;AAEH;;"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { VariablesQuery } from "./VariablesQuery.js";
|
|
2
|
-
import { DeleteBuilder } from "@contember/database";
|
|
3
|
-
import { SetVariableCommand } from "./SetVariableCommand.js";
|
|
4
|
-
class VariablesManager {
|
|
5
|
-
async fetchVariables(db) {
|
|
6
|
-
return Object.fromEntries((await db.queryHandler.fetch(new VariablesQuery())).map((it) => [it.name, it.value]));
|
|
7
|
-
}
|
|
8
|
-
async setVariables(db, args) {
|
|
9
|
-
return await db.transaction(async (db2) => {
|
|
10
|
-
const current = await this.fetchVariables(db2);
|
|
11
|
-
const mode = args.mode ?? "MERGE";
|
|
12
|
-
const inputVariables = Object.fromEntries(args.variables.map((it) => [it.name, it.value]));
|
|
13
|
-
let newVariables = {};
|
|
14
|
-
switch (mode) {
|
|
15
|
-
case "APPEND_ONLY_MISSING":
|
|
16
|
-
newVariables = { ...inputVariables, ...current };
|
|
17
|
-
break;
|
|
18
|
-
case "MERGE":
|
|
19
|
-
newVariables = { ...current, ...inputVariables };
|
|
20
|
-
break;
|
|
21
|
-
case "SET":
|
|
22
|
-
newVariables = inputVariables;
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
const toDelete = Object.keys(current).filter((it) => !(it in newVariables));
|
|
26
|
-
if (toDelete.length > 0) {
|
|
27
|
-
await DeleteBuilder.create().from("actions_variable").where((it) => it.in("name", toDelete)).execute(db2.client);
|
|
28
|
-
}
|
|
29
|
-
for (const [name, value] of Object.entries(newVariables)) {
|
|
30
|
-
if (value === current[name]) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
await db2.commandBus.execute(new SetVariableCommand(name, value));
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
VariablesManager
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=VariablesManager.js.map
|