@contember/engine-actions 2.1.0-alpha.8 → 2.1.0-beta.1
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/CLAUDE.md +47 -0
- package/dist/development/index.cjs +45 -21
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +45 -21
- package/dist/development/index.js.map +1 -1
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs +23 -11
- package/dist/development/src/ActionsExecutionContainerHookFactory.cjs.map +1 -1
- package/dist/development/src/ActionsExecutionContainerHookFactory.js +23 -11
- package/dist/development/src/ActionsExecutionContainerHookFactory.js.map +1 -1
- package/dist/development/src/ListenerStoreProvider.cjs.map +1 -1
- package/dist/development/src/ListenerStoreProvider.js.map +1 -1
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs +2 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs.map +1 -1
- package/dist/development/src/authorization/ActionsAuthorizationActions.js +2 -0
- package/dist/development/src/authorization/ActionsAuthorizationActions.js.map +1 -1
- package/dist/development/src/authorization/ActionsPermissionsFactory.cjs.map +1 -1
- package/dist/development/src/authorization/ActionsPermissionsFactory.js.map +1 -1
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs +16 -14
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -1
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js +16 -14
- package/dist/development/src/dispatch/DispatchWorkerSupervisor.js.map +1 -1
- package/dist/development/src/dispatch/EventDispatcher.cjs.map +1 -1
- package/dist/development/src/dispatch/EventDispatcher.js.map +1 -1
- package/dist/development/src/dispatch/EventsRepository.cjs +33 -15
- package/dist/development/src/dispatch/EventsRepository.cjs.map +1 -1
- package/dist/development/src/dispatch/EventsRepository.js +33 -15
- package/dist/development/src/dispatch/EventsRepository.js.map +1 -1
- package/dist/development/src/dispatch/ProjectDispatcher.cjs +3 -3
- package/dist/development/src/dispatch/ProjectDispatcher.cjs.map +1 -1
- package/dist/development/src/dispatch/ProjectDispatcher.js +2 -2
- package/dist/development/src/dispatch/ProjectDispatcher.js.map +1 -1
- package/dist/development/src/dispatch/TargetHandlerResolver.cjs.map +1 -1
- package/dist/development/src/dispatch/TargetHandlerResolver.js.map +1 -1
- package/dist/development/src/dispatch/WebhookFetcher.cjs.map +1 -1
- package/dist/development/src/dispatch/WebhookFetcher.js.map +1 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs +6 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs.map +1 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.js +6 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.js.map +1 -1
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs +1 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -1
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js +1 -0
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -1
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs +8 -11
- package/dist/development/src/graphql/http/ActionsContextResolver.cjs.map +1 -1
- package/dist/development/src/graphql/http/ActionsContextResolver.js +8 -11
- package/dist/development/src/graphql/http/ActionsContextResolver.js.map +1 -1
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -1
- package/dist/development/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -1
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs +6 -3
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -1
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js +6 -3
- package/dist/development/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -1
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs +7 -2
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs.map +1 -1
- package/dist/development/src/graphql/resolvers/ResolversFactory.js +8 -3
- package/dist/development/src/graphql/resolvers/ResolversFactory.js.map +1 -1
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -1
- package/dist/development/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -1
- 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.map +1 -1
- package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -1
- 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 +14 -1
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -1
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js +14 -1
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -1
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -1
- package/dist/development/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -1
- package/dist/development/src/graphql/schema/actions.graphql.cjs +18 -4
- package/dist/development/src/graphql/schema/actions.graphql.cjs.map +1 -1
- package/dist/development/src/graphql/schema/actions.graphql.js +18 -4
- package/dist/development/src/graphql/schema/actions.graphql.js.map +1 -1
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -1
- package/dist/development/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -1
- 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 +3 -1
- package/dist/development/src/migrations/index.cjs.map +1 -1
- package/dist/development/src/migrations/index.js +3 -1
- package/dist/development/src/migrations/index.js.map +1 -1
- package/dist/development/src/migrations/snapshot.cjs +5 -2
- package/dist/development/src/migrations/snapshot.cjs.map +1 -1
- package/dist/development/src/migrations/snapshot.js +5 -2
- package/dist/development/src/migrations/snapshot.js.map +1 -1
- 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.map +1 -1
- package/dist/development/src/model/EventsInProcessingQuery.js.map +1 -1
- package/dist/development/src/model/EventsToProcessQuery.cjs.map +1 -1
- package/dist/development/src/model/EventsToProcessQuery.js.map +1 -1
- package/dist/development/src/model/EventsToProcessSpecification.cjs.map +1 -1
- package/dist/development/src/model/EventsToProcessSpecification.js.map +1 -1
- package/dist/development/src/model/FailedEventsQuery.cjs.map +1 -1
- package/dist/development/src/model/FailedEventsQuery.js.map +1 -1
- package/dist/development/src/model/SetVariableCommand.cjs.map +1 -1
- package/dist/development/src/model/SetVariableCommand.js.map +1 -1
- package/dist/development/src/model/VariablesManager.cjs.map +1 -1
- package/dist/development/src/model/VariablesManager.js.map +1 -1
- package/dist/development/src/model/VariablesQuery.cjs.map +1 -1
- package/dist/development/src/model/VariablesQuery.js.map +1 -1
- package/dist/development/src/triggers/TriggerHandler.cjs +17 -14
- package/dist/development/src/triggers/TriggerHandler.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerHandler.js +17 -14
- package/dist/development/src/triggers/TriggerHandler.js.map +1 -1
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs +44 -2
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js +44 -2
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -1
- package/dist/development/src/triggers/TriggerListenersBuilder.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerListenersBuilder.js.map +1 -1
- package/dist/development/src/triggers/TriggerListenersFactory.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerListenersFactory.js.map +1 -1
- package/dist/development/src/triggers/TriggerListenersStore.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerListenersStore.js.map +1 -1
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs +45 -16
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerPayloadBuilder.js +45 -16
- package/dist/development/src/triggers/TriggerPayloadBuilder.js.map +1 -1
- package/dist/development/src/triggers/TriggerPayloadManager.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerPayloadManager.js.map +1 -1
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs +9 -5
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs.map +1 -1
- package/dist/development/src/triggers/TriggerPayloadPersister.js +9 -5
- package/dist/development/src/triggers/TriggerPayloadPersister.js.map +1 -1
- package/dist/development/src/utils/assertNever.cjs.map +1 -1
- package/dist/development/src/utils/assertNever.js.map +1 -1
- package/dist/development/src/utils/map.cjs.map +1 -1
- package/dist/development/src/utils/map.js.map +1 -1
- 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 +45 -21
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.js +45 -21
- package/dist/production/index.js.map +1 -1
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs +23 -11
- package/dist/production/src/ActionsExecutionContainerHookFactory.cjs.map +1 -1
- package/dist/production/src/ActionsExecutionContainerHookFactory.js +23 -11
- package/dist/production/src/ActionsExecutionContainerHookFactory.js.map +1 -1
- package/dist/production/src/ListenerStoreProvider.cjs.map +1 -1
- package/dist/production/src/ListenerStoreProvider.js.map +1 -1
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs +2 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs.map +1 -1
- package/dist/production/src/authorization/ActionsAuthorizationActions.js +2 -0
- package/dist/production/src/authorization/ActionsAuthorizationActions.js.map +1 -1
- package/dist/production/src/authorization/ActionsPermissionsFactory.cjs.map +1 -1
- package/dist/production/src/authorization/ActionsPermissionsFactory.js.map +1 -1
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs +16 -14
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.cjs.map +1 -1
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js +16 -14
- package/dist/production/src/dispatch/DispatchWorkerSupervisor.js.map +1 -1
- package/dist/production/src/dispatch/EventDispatcher.cjs.map +1 -1
- package/dist/production/src/dispatch/EventDispatcher.js.map +1 -1
- package/dist/production/src/dispatch/EventsRepository.cjs +33 -15
- package/dist/production/src/dispatch/EventsRepository.cjs.map +1 -1
- package/dist/production/src/dispatch/EventsRepository.js +33 -15
- package/dist/production/src/dispatch/EventsRepository.js.map +1 -1
- package/dist/production/src/dispatch/ProjectDispatcher.cjs +3 -3
- package/dist/production/src/dispatch/ProjectDispatcher.cjs.map +1 -1
- package/dist/production/src/dispatch/ProjectDispatcher.js +2 -2
- package/dist/production/src/dispatch/ProjectDispatcher.js.map +1 -1
- package/dist/production/src/dispatch/TargetHandlerResolver.cjs.map +1 -1
- package/dist/production/src/dispatch/TargetHandlerResolver.js.map +1 -1
- package/dist/production/src/dispatch/WebhookFetcher.cjs.map +1 -1
- package/dist/production/src/dispatch/WebhookFetcher.js.map +1 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs +6 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs.map +1 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.js +6 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.js.map +1 -1
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs +1 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +1 -1
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js +1 -0
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js.map +1 -1
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs +8 -11
- package/dist/production/src/graphql/http/ActionsContextResolver.cjs.map +1 -1
- package/dist/production/src/graphql/http/ActionsContextResolver.js +8 -11
- package/dist/production/src/graphql/http/ActionsContextResolver.js.map +1 -1
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.cjs.map +1 -1
- package/dist/production/src/graphql/http/ActionsGraphQLHandlerFactory.js.map +1 -1
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs +6 -3
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.cjs.map +1 -1
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js +6 -3
- package/dist/production/src/graphql/http/ActionsWebsocketControllerFactory.js.map +1 -1
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs +7 -2
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs.map +1 -1
- package/dist/production/src/graphql/resolvers/ResolversFactory.js +8 -3
- package/dist/production/src/graphql/resolvers/ResolversFactory.js.map +1 -1
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.cjs.map +1 -1
- package/dist/production/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.js.map +1 -1
- 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.map +1 -1
- package/dist/production/src/graphql/resolvers/mutation/SetVariablesMutationResolver.js.map +1 -1
- 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 +14 -1
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +1 -1
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js +14 -1
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js.map +1 -1
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.cjs.map +1 -1
- package/dist/production/src/graphql/resolvers/query/VariablesQueryResolver.js.map +1 -1
- package/dist/production/src/graphql/schema/actions.graphql.cjs +18 -4
- package/dist/production/src/graphql/schema/actions.graphql.cjs.map +1 -1
- package/dist/production/src/graphql/schema/actions.graphql.js +18 -4
- package/dist/production/src/graphql/schema/actions.graphql.js.map +1 -1
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.cjs.map +1 -1
- package/dist/production/src/migrations/2023-03-10-145000-actions-variables.js.map +1 -1
- 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 +3 -1
- package/dist/production/src/migrations/index.cjs.map +1 -1
- package/dist/production/src/migrations/index.js +3 -1
- package/dist/production/src/migrations/index.js.map +1 -1
- package/dist/production/src/migrations/snapshot.cjs +5 -2
- package/dist/production/src/migrations/snapshot.cjs.map +1 -1
- package/dist/production/src/migrations/snapshot.js +5 -2
- package/dist/production/src/migrations/snapshot.js.map +1 -1
- 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.map +1 -1
- package/dist/production/src/model/EventsInProcessingQuery.js.map +1 -1
- package/dist/production/src/model/EventsToProcessQuery.cjs.map +1 -1
- package/dist/production/src/model/EventsToProcessQuery.js.map +1 -1
- package/dist/production/src/model/EventsToProcessSpecification.cjs.map +1 -1
- package/dist/production/src/model/EventsToProcessSpecification.js.map +1 -1
- package/dist/production/src/model/FailedEventsQuery.cjs.map +1 -1
- package/dist/production/src/model/FailedEventsQuery.js.map +1 -1
- package/dist/production/src/model/SetVariableCommand.cjs.map +1 -1
- package/dist/production/src/model/SetVariableCommand.js.map +1 -1
- package/dist/production/src/model/VariablesManager.cjs.map +1 -1
- package/dist/production/src/model/VariablesManager.js.map +1 -1
- package/dist/production/src/model/VariablesQuery.cjs.map +1 -1
- package/dist/production/src/model/VariablesQuery.js.map +1 -1
- package/dist/production/src/triggers/TriggerHandler.cjs +17 -14
- package/dist/production/src/triggers/TriggerHandler.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerHandler.js +17 -14
- package/dist/production/src/triggers/TriggerHandler.js.map +1 -1
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs +44 -2
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js +44 -2
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js.map +1 -1
- package/dist/production/src/triggers/TriggerListenersBuilder.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerListenersBuilder.js.map +1 -1
- package/dist/production/src/triggers/TriggerListenersFactory.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerListenersFactory.js.map +1 -1
- package/dist/production/src/triggers/TriggerListenersStore.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerListenersStore.js.map +1 -1
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs +45 -16
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerPayloadBuilder.js +45 -16
- package/dist/production/src/triggers/TriggerPayloadBuilder.js.map +1 -1
- package/dist/production/src/triggers/TriggerPayloadManager.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerPayloadManager.js.map +1 -1
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs +9 -5
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs.map +1 -1
- package/dist/production/src/triggers/TriggerPayloadPersister.js +9 -5
- package/dist/production/src/triggers/TriggerPayloadPersister.js.map +1 -1
- package/dist/production/src/utils/assertNever.cjs.map +1 -1
- package/dist/production/src/utils/assertNever.js.map +1 -1
- package/dist/production/src/utils/map.cjs.map +1 -1
- package/dist/production/src/utils/map.js.map +1 -1
- 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/tsconfig.tsbuildinfo +1 -1
- package/dist/types/ActionsExecutionContainerHookFactory.d.ts.map +1 -1
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts +10 -0
- package/dist/types/authorization/ActionsAuthorizationActions.d.ts.map +1 -1
- package/dist/types/dispatch/DispatchWorkerSupervisor.d.ts.map +1 -1
- package/dist/types/dispatch/EventDispatcher.d.ts.map +1 -1
- package/dist/types/dispatch/EventsRepository.d.ts +2 -1
- package/dist/types/dispatch/EventsRepository.d.ts.map +1 -1
- package/dist/types/dispatch/ProjectDispatcher.d.ts.map +1 -1
- package/dist/types/dispatch/WebhookTargetHandler.d.ts.map +1 -1
- package/dist/types/dispatch/types.d.ts +1 -1
- package/dist/types/dispatch/types.d.ts.map +1 -1
- package/dist/types/graphql/http/ActionsApiMiddlewareFactory.d.ts.map +1 -1
- package/dist/types/graphql/http/ActionsContextResolver.d.ts.map +1 -1
- package/dist/types/graphql/http/ActionsGraphQLHandlerFactory.d.ts.map +1 -1
- package/dist/types/graphql/http/ActionsWebsocketControllerFactory.d.ts.map +1 -1
- package/dist/types/graphql/resolvers/ActionsContext.d.ts +3 -0
- package/dist/types/graphql/resolvers/ActionsContext.d.ts.map +1 -1
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts +4 -2
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts.map +1 -1
- 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.map +1 -1
- 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 +2 -0
- package/dist/types/graphql/resolvers/mutation/index.d.ts.map +1 -1
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts +3 -0
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts.map +1 -1
- package/dist/types/graphql/resolvers/query/VariablesQueryResolver.d.ts.map +1 -1
- package/dist/types/graphql/schema/actions.graphql.d.ts.map +1 -1
- package/dist/types/graphql/schema/index.d.ts +45 -2
- package/dist/types/graphql/schema/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/migrations/2023-03-10-145000-actions-variables.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/migrations/snapshot.d.ts.map +1 -1
- package/dist/types/model/EventByIdQuery.d.ts +8 -0
- package/dist/types/model/EventByIdQuery.d.ts.map +1 -0
- package/dist/types/model/EventsToProcessSpecification.d.ts.map +1 -1
- package/dist/types/model/SetVariableCommand.d.ts.map +1 -1
- package/dist/types/model/types.d.ts +3 -0
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/triggers/TriggerHandler.d.ts.map +1 -1
- package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts +11 -3
- package/dist/types/triggers/TriggerIndirectChangesFetcher.d.ts.map +1 -1
- package/dist/types/triggers/TriggerListeners.d.ts.map +1 -1
- package/dist/types/triggers/TriggerListenersBuilder.d.ts.map +1 -1
- package/dist/types/triggers/TriggerListenersStore.d.ts +2 -2
- package/dist/types/triggers/TriggerListenersStore.d.ts.map +1 -1
- package/dist/types/triggers/TriggerPayloadBuilder.d.ts.map +1 -1
- package/dist/types/triggers/TriggerPayloadManager.d.ts +2 -1
- package/dist/types/triggers/TriggerPayloadManager.d.ts.map +1 -1
- package/dist/types/triggers/TriggerPayloadPersister.d.ts +7 -3
- package/dist/types/triggers/TriggerPayloadPersister.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/utils/notifyChannel.d.ts +4 -0
- package/dist/types/utils/notifyChannel.d.ts.map +1 -0
- package/graphql.codegen.yml +2 -2
- package/package.json +26 -21
- package/src/ActionsExecutionContainerHookFactory.ts +23 -11
- package/src/authorization/ActionsAuthorizationActions.ts +2 -0
- package/src/dispatch/DispatchWorkerSupervisor.ts +17 -16
- package/src/dispatch/EventDispatcher.ts +0 -2
- package/src/dispatch/EventsRepository.ts +63 -43
- package/src/dispatch/ProjectDispatcher.ts +6 -11
- package/src/dispatch/WebhookTargetHandler.ts +18 -9
- package/src/dispatch/types.ts +1 -2
- package/src/graphql/http/ActionsApiMiddlewareFactory.ts +7 -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/ActionsContext.ts +1 -0
- package/src/graphql/resolvers/ResolversFactory.ts +9 -2
- package/src/graphql/resolvers/mutation/RetryEventMutationResolver.ts +22 -0
- package/src/graphql/resolvers/mutation/SetVariablesMutationResolver.ts +0 -1
- package/src/graphql/resolvers/mutation/StopEventMutationResolver.ts +19 -0
- package/src/graphql/resolvers/mutation/index.ts +2 -0
- package/src/graphql/resolvers/query/EventsQueryResolver.ts +15 -8
- package/src/graphql/resolvers/query/VariablesQueryResolver.ts +0 -1
- package/src/graphql/schema/actions.graphql.ts +18 -4
- package/src/graphql/schema/index.ts +84 -30
- package/src/index.ts +55 -30
- package/src/migrations/2023-03-10-145000-actions-variables.ts +1 -1
- package/src/migrations/2025-05-28-160000-action-event-user.ts +16 -0
- package/src/migrations/index.ts +2 -0
- package/src/migrations/snapshot.ts +6 -3
- package/src/model/EventByIdQuery.ts +21 -0
- package/src/model/EventsToProcessSpecification.ts +9 -8
- package/src/model/SetVariableCommand.ts +0 -1
- package/src/model/types.ts +3 -0
- package/src/triggers/TriggerHandler.ts +16 -15
- package/src/triggers/TriggerIndirectChangesFetcher.ts +62 -3
- package/src/triggers/TriggerListeners.ts +1 -8
- package/src/triggers/TriggerListenersBuilder.ts +3 -6
- package/src/triggers/TriggerListenersStore.ts +2 -2
- package/src/triggers/TriggerPayloadBuilder.ts +43 -13
- package/src/triggers/TriggerPayloadManager.ts +2 -4
- package/src/triggers/TriggerPayloadPersister.ts +8 -3
- package/src/utils/notifyChannel.ts +6 -0
- package/tests/cases/unit/generator.test.ts +133 -136
- package/tests/cases/unit/webhookHandler.test.ts +47 -35
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ActionsAuthorizationActions = require("../../../authorization/ActionsAuthorizationActions.cjs");
|
|
4
|
+
require("@contember/authorization");
|
|
5
|
+
require("@contember/schema");
|
|
6
|
+
const notifyChannel = require("../../../utils/notifyChannel.cjs");
|
|
7
|
+
class RetryEventMutationResolver {
|
|
8
|
+
constructor(eventsRepository) {
|
|
9
|
+
this.eventsRepository = eventsRepository;
|
|
10
|
+
}
|
|
11
|
+
async retryEvent(parent, args, ctx) {
|
|
12
|
+
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_RETRY);
|
|
13
|
+
await this.eventsRepository.requeue(ctx.db.client, [args.id]);
|
|
14
|
+
await notifyChannel.notify(ctx.db.client, ctx.project.slug);
|
|
15
|
+
return {
|
|
16
|
+
ok: true
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.RetryEventMutationResolver = RetryEventMutationResolver;
|
|
21
|
+
//# sourceMappingURL=RetryEventMutationResolver.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RetryEventMutationResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/RetryEventMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationRetryEventArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { ActionsAuthorizationActions } from '../../../authorization'\nimport { EventsRepository } from '../../../dispatch/EventsRepository'\nimport { notify } from '../../../utils/notifyChannel'\n\nexport class RetryEventMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly eventsRepository: EventsRepository,\n\t) {\n\t}\n\tasync retryEvent(parent: unknown, args: MutationRetryEventArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_RETRY)\n\n\t\tawait this.eventsRepository.requeue(ctx.db.client, [args.id])\n\t\tawait notify(ctx.db.client, ctx.project.slug)\n\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":["ActionsAuthorizationActions","notify"],"mappings":";;;;;;AAMO,MAAM,2BAAwE;AAAA,EACpF,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EACA,MAAM,WAAW,QAAiB,MAA8B,KAAqB;AACpF,UAAM,IAAI,cAAcA,4BAAAA,4BAA4B,YAAY;AAEhE,UAAM,KAAK,iBAAiB,QAAQ,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAC5D,UAAMC,cAAAA,OAAO,IAAI,GAAG,QAAQ,IAAI,QAAQ,IAAI;AAE5C,WAAO;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,EAEN;AACD;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
2
|
+
import "@contember/authorization";
|
|
3
|
+
import "@contember/schema";
|
|
4
|
+
import { notify } from "../../../utils/notifyChannel.js";
|
|
5
|
+
class RetryEventMutationResolver {
|
|
6
|
+
constructor(eventsRepository) {
|
|
7
|
+
this.eventsRepository = eventsRepository;
|
|
8
|
+
}
|
|
9
|
+
async retryEvent(parent, args, ctx) {
|
|
10
|
+
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_RETRY);
|
|
11
|
+
await this.eventsRepository.requeue(ctx.db.client, [args.id]);
|
|
12
|
+
await notify(ctx.db.client, ctx.project.slug);
|
|
13
|
+
return {
|
|
14
|
+
ok: true
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
RetryEventMutationResolver
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=RetryEventMutationResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RetryEventMutationResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/RetryEventMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationRetryEventArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { ActionsAuthorizationActions } from '../../../authorization'\nimport { EventsRepository } from '../../../dispatch/EventsRepository'\nimport { notify } from '../../../utils/notifyChannel'\n\nexport class RetryEventMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly eventsRepository: EventsRepository,\n\t) {\n\t}\n\tasync retryEvent(parent: unknown, args: MutationRetryEventArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_RETRY)\n\n\t\tawait this.eventsRepository.requeue(ctx.db.client, [args.id])\n\t\tawait notify(ctx.db.client, ctx.project.slug)\n\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;;AAMO,MAAM,2BAAwE;AAAA,EACpF,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EACA,MAAM,WAAW,QAAiB,MAA8B,KAAqB;AACpF,UAAM,IAAI,cAAc,4BAA4B,YAAY;AAEhE,UAAM,KAAK,iBAAiB,QAAQ,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAC5D,UAAM,OAAO,IAAI,GAAG,QAAQ,IAAI,QAAQ,IAAI;AAE5C,WAAO;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,EAEN;AACD;"}
|
package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetVariablesMutationResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/SetVariablesMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationSetVariablesArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { VariablesManager } from '../../../model/VariablesManager'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class SetVariablesMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly variablesManager: VariablesManager,\n\t) {\n\t}\n\n\
|
|
1
|
+
{"version":3,"file":"SetVariablesMutationResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/SetVariablesMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationSetVariablesArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { VariablesManager } from '../../../model/VariablesManager'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class SetVariablesMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly variablesManager: VariablesManager,\n\t) {\n\t}\n\n\tasync setVariables(parent: unknown, { args }: MutationSetVariablesArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_SET)\n\n\t\tawait this.variablesManager.setVariables(ctx.db, args)\n\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":["ActionsAuthorizationActions"],"mappings":";;;;;AAKO,MAAM,6BAA0E;AAAA,EACtF,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EAEA,MAAM,aAAa,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AAC5F,UAAM,IAAI,cAAcA,4BAAAA,4BAA4B,aAAa;AAEjE,UAAM,KAAK,iBAAiB,aAAa,IAAI,IAAI,IAAI;AAErD,WAAO;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,EAEN;AACD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetVariablesMutationResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/SetVariablesMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationSetVariablesArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { VariablesManager } from '../../../model/VariablesManager'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class SetVariablesMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly variablesManager: VariablesManager,\n\t) {\n\t}\n\n\
|
|
1
|
+
{"version":3,"file":"SetVariablesMutationResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/SetVariablesMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationSetVariablesArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { VariablesManager } from '../../../model/VariablesManager'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class SetVariablesMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly variablesManager: VariablesManager,\n\t) {\n\t}\n\n\tasync setVariables(parent: unknown, { args }: MutationSetVariablesArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_SET)\n\n\t\tawait this.variablesManager.setVariables(ctx.db, args)\n\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;AAKO,MAAM,6BAA0E;AAAA,EACtF,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EAEA,MAAM,aAAa,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AAC5F,UAAM,IAAI,cAAc,4BAA4B,aAAa;AAEjE,UAAM,KAAK,iBAAiB,aAAa,IAAI,IAAI,IAAI;AAErD,WAAO;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,EAEN;AACD;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const ActionsAuthorizationActions = require("../../../authorization/ActionsAuthorizationActions.cjs");
|
|
4
|
+
require("@contember/authorization");
|
|
5
|
+
require("@contember/schema");
|
|
6
|
+
class StopEventMutationResolver {
|
|
7
|
+
constructor(eventsRepository) {
|
|
8
|
+
this.eventsRepository = eventsRepository;
|
|
9
|
+
}
|
|
10
|
+
async stopEvent(parent, args, ctx) {
|
|
11
|
+
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_STOP);
|
|
12
|
+
await this.eventsRepository.markStopped(ctx.db.client, [args.id]);
|
|
13
|
+
return {
|
|
14
|
+
ok: true
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.StopEventMutationResolver = StopEventMutationResolver;
|
|
19
|
+
//# sourceMappingURL=StopEventMutationResolver.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopEventMutationResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/StopEventMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationRetryEventArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { ActionsAuthorizationActions } from '../../../authorization'\nimport { EventsRepository } from '../../../dispatch/EventsRepository'\n\nexport class StopEventMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly eventsRepository: EventsRepository,\n\t) {\n\t}\n\tasync stopEvent(parent: unknown, args: MutationRetryEventArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_STOP)\n\n\t\tawait this.eventsRepository.markStopped(ctx.db.client, [args.id])\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":["ActionsAuthorizationActions"],"mappings":";;;;;AAKO,MAAM,0BAAuE;AAAA,EACnF,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EACA,MAAM,UAAU,QAAiB,MAA8B,KAAqB;AACnF,UAAM,IAAI,cAAcA,4BAAAA,4BAA4B,WAAW;AAE/D,UAAM,KAAK,iBAAiB,YAAY,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAChE,WAAO;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,EAEN;AACD;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
2
|
+
import "@contember/authorization";
|
|
3
|
+
import "@contember/schema";
|
|
4
|
+
class StopEventMutationResolver {
|
|
5
|
+
constructor(eventsRepository) {
|
|
6
|
+
this.eventsRepository = eventsRepository;
|
|
7
|
+
}
|
|
8
|
+
async stopEvent(parent, args, ctx) {
|
|
9
|
+
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_STOP);
|
|
10
|
+
await this.eventsRepository.markStopped(ctx.db.client, [args.id]);
|
|
11
|
+
return {
|
|
12
|
+
ok: true
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
StopEventMutationResolver
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=StopEventMutationResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StopEventMutationResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/StopEventMutationResolver.ts"],"sourcesContent":["import { MutationResolvers, MutationRetryEventArgs } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { ActionsAuthorizationActions } from '../../../authorization'\nimport { EventsRepository } from '../../../dispatch/EventsRepository'\n\nexport class StopEventMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate readonly eventsRepository: EventsRepository,\n\t) {\n\t}\n\tasync stopEvent(parent: unknown, args: MutationRetryEventArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_STOP)\n\n\t\tawait this.eventsRepository.markStopped(ctx.db.client, [args.id])\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;AAKO,MAAM,0BAAuE;AAAA,EACnF,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAElB;AAAA,EACA,MAAM,UAAU,QAAiB,MAA8B,KAAqB;AACnF,UAAM,IAAI,cAAc,4BAA4B,WAAW;AAE/D,UAAM,KAAK,iBAAiB,YAAY,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,CAAC;AAChE,WAAO;AAAA,MACN,IAAI;AAAA,IAAA;AAAA,EAEN;AACD;"}
|
|
@@ -7,6 +7,7 @@ const FailedEventsQuery = require("../../../model/FailedEventsQuery.cjs");
|
|
|
7
7
|
const ActionsAuthorizationActions = require("../../../authorization/ActionsAuthorizationActions.cjs");
|
|
8
8
|
require("@contember/authorization");
|
|
9
9
|
require("@contember/schema");
|
|
10
|
+
const EventByIdQuery = require("../../../model/EventByIdQuery.cjs");
|
|
10
11
|
class EventsQueryResolver {
|
|
11
12
|
async eventsInProcessing(parent, { args }, ctx) {
|
|
12
13
|
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_VIEW);
|
|
@@ -20,6 +21,15 @@ class EventsQueryResolver {
|
|
|
20
21
|
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_VIEW);
|
|
21
22
|
return await this.fetchEvents(ctx.db, new FailedEventsQuery.FailedEventsQuery(args ?? {}));
|
|
22
23
|
}
|
|
24
|
+
async event(parent, { id }, ctx) {
|
|
25
|
+
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_VIEW);
|
|
26
|
+
const stages = await this.fetchStagesMap(ctx.db);
|
|
27
|
+
const result = await ctx.db.queryHandler.fetch(new EventByIdQuery.EventByIdQuery(id));
|
|
28
|
+
if (!result) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return this.mapEventRows([result], stages)[0];
|
|
32
|
+
}
|
|
23
33
|
async fetchEvents(db, query) {
|
|
24
34
|
const stages = await this.fetchStagesMap(db);
|
|
25
35
|
return this.mapEventRows(await db.queryHandler.fetch(query), stages);
|
|
@@ -40,7 +50,10 @@ class EventsQueryResolver {
|
|
|
40
50
|
stage: stagesMap[row.stage_id],
|
|
41
51
|
state: row.state,
|
|
42
52
|
target: row.target,
|
|
43
|
-
transactionId: row.transaction_id
|
|
53
|
+
transactionId: row.transaction_id,
|
|
54
|
+
identityId: row.identity_id ?? void 0,
|
|
55
|
+
ipAddress: row.ip_address ?? void 0,
|
|
56
|
+
userAgent: row.user_agent ?? void 0
|
|
44
57
|
}));
|
|
45
58
|
}
|
|
46
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventsQueryResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/EventsQueryResolver.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"EventsQueryResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/EventsQueryResolver.ts"],"sourcesContent":["import { Event, QueryEventsInProcessingArgs, QueryEventsToProcessArgs, QueryFailedEventsArgs, QueryResolvers } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { EventsToProcessQuery } from '../../../model/EventsToProcessQuery'\nimport { EventRow } from '../../../model/types'\nimport { DatabaseContext, StagesQuery } from '@contember/engine-system-api'\nimport { Client, DatabaseQuery } from '@contember/database'\nimport { EventsInProcessingQuery } from '../../../model/EventsInProcessingQuery'\nimport { FailedEventsQuery } from '../../../model/FailedEventsQuery'\nimport { ActionsAuthorizationActions } from '../../../authorization'\nimport { EventByIdQuery } from '../../../model/EventByIdQuery'\n\nexport class EventsQueryResolver implements QueryResolvers<ActionsContext> {\n\tasync eventsInProcessing(parent: unknown, { args }: QueryEventsInProcessingArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\n\t\treturn await this.fetchEvents(ctx.db, new EventsInProcessingQuery(args ?? {}))\n\t}\n\n\tasync eventsToProcess(parent: unknown, { args }: QueryEventsToProcessArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\n\t\treturn await this.fetchEvents(ctx.db, new EventsToProcessQuery(args ?? {}))\n\t}\n\n\tasync failedEvents(parent: unknown, { args }: QueryFailedEventsArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\n\t\treturn await this.fetchEvents(ctx.db, new FailedEventsQuery(args ?? {}))\n\t}\n\n\tasync event(parent: unknown, { id }: { id: string }, ctx: ActionsContext): Promise<Event | null> {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\t\tconst stages = await this.fetchStagesMap(ctx.db)\n\t\tconst result = await ctx.db.queryHandler.fetch(new EventByIdQuery(id))\n\t\tif (!result) {\n\t\t\treturn null\n\t\t}\n\t\treturn this.mapEventRows([result], stages)[0]\n\t}\n\n\tprivate async fetchEvents(db: DatabaseContext, query: DatabaseQuery<EventRow[]>) {\n\t\tconst stages = await this.fetchStagesMap(db)\n\t\treturn this.mapEventRows(await db.queryHandler.fetch(query), stages)\n\t}\n\n\tprivate async fetchStagesMap(db: DatabaseContext): Promise<Record<string, string>> {\n\t\treturn Object.fromEntries((await db.queryHandler.fetch(new StagesQuery())).map(it => [it.id, it.slug]))\n\t}\n\n\tprivate mapEventRows(rows: EventRow[], stagesMap: Record<string, string>): Event[] {\n\t\treturn rows.map(row => ({\n\t\t\tid: row.id,\n\t\t\tcreatedAt: row.created_at,\n\t\t\tresolvedAt: row.created_at,\n\t\t\tlastStateChange: row.last_state_change,\n\t\t\tvisibleAt: row.visible_at,\n\t\t\tlog: row.log,\n\t\t\tnumRetries: row.num_retries,\n\t\t\tpayload: row.payload,\n\t\t\tstage: stagesMap[row.stage_id],\n\t\t\tstate: row.state,\n\t\t\ttarget: row.target,\n\t\t\ttransactionId: row.transaction_id,\n\t\t\tidentityId: row.identity_id ?? undefined,\n\t\t\tipAddress: row.ip_address ?? undefined,\n\t\t\tuserAgent: row.user_agent ?? undefined,\n\t\t}))\n\t}\n}\n"],"names":["ActionsAuthorizationActions","EventsInProcessingQuery","EventsToProcessQuery","FailedEventsQuery","EventByIdQuery","StagesQuery"],"mappings":";;;;;;;;;;AAWO,MAAM,oBAA8D;AAAA,EAC1E,MAAM,mBAAmB,QAAiB,EAAE,KAAA,GAAqC,KAAqB;AACrG,UAAM,IAAI,cAAcA,4BAAAA,4BAA4B,WAAW;AAE/D,WAAO,MAAM,KAAK,YAAY,IAAI,IAAI,IAAIC,wBAAAA,wBAAwB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAC9E;AAAA,EAEA,MAAM,gBAAgB,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AAC/F,UAAM,IAAI,cAAcD,4BAAAA,4BAA4B,WAAW;AAE/D,WAAO,MAAM,KAAK,YAAY,IAAI,IAAI,IAAIE,qBAAAA,qBAAqB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAC3E;AAAA,EAEA,MAAM,aAAa,QAAiB,EAAE,KAAA,GAA+B,KAAqB;AACzF,UAAM,IAAI,cAAcF,4BAAAA,4BAA4B,WAAW;AAE/D,WAAO,MAAM,KAAK,YAAY,IAAI,IAAI,IAAIG,kBAAAA,kBAAkB,QAAQ,CAAA,CAAE,CAAC;AAAA,EACxE;AAAA,EAEA,MAAM,MAAM,QAAiB,EAAE,GAAA,GAAsB,KAA4C;AAChG,UAAM,IAAI,cAAcH,4BAAAA,4BAA4B,WAAW;AAC/D,UAAM,SAAS,MAAM,KAAK,eAAe,IAAI,EAAE;AAC/C,UAAM,SAAS,MAAM,IAAI,GAAG,aAAa,MAAM,IAAII,8BAAe,EAAE,CAAC;AACrE,QAAI,CAAC,QAAQ;AACZ,aAAO;AAAA,IACR;AACA,WAAO,KAAK,aAAa,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;AAAA,EAC7C;AAAA,EAEA,MAAc,YAAY,IAAqB,OAAkC;AAChF,UAAM,SAAS,MAAM,KAAK,eAAe,EAAE;AAC3C,WAAO,KAAK,aAAa,MAAM,GAAG,aAAa,MAAM,KAAK,GAAG,MAAM;AAAA,EACpE;AAAA,EAEA,MAAc,eAAe,IAAsD;AAClF,WAAO,OAAO,aAAa,MAAM,GAAG,aAAa,MAAM,IAAIC,gBAAAA,YAAA,CAAa,GAAG,IAAI,QAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAAA,EACvG;AAAA,EAEQ,aAAa,MAAkB,WAA4C;AAClF,WAAO,KAAK,IAAI,CAAA,SAAQ;AAAA,MACvB,IAAI,IAAI;AAAA,MACR,WAAW,IAAI;AAAA,MACf,YAAY,IAAI;AAAA,MAChB,iBAAiB,IAAI;AAAA,MACrB,WAAW,IAAI;AAAA,MACf,KAAK,IAAI;AAAA,MACT,YAAY,IAAI;AAAA,MAChB,SAAS,IAAI;AAAA,MACb,OAAO,UAAU,IAAI,QAAQ;AAAA,MAC7B,OAAO,IAAI;AAAA,MACX,QAAQ,IAAI;AAAA,MACZ,eAAe,IAAI;AAAA,MACnB,YAAY,IAAI,eAAe;AAAA,MAC/B,WAAW,IAAI,cAAc;AAAA,MAC7B,WAAW,IAAI,cAAc;AAAA,IAAA,EAC5B;AAAA,EACH;AACD;;"}
|
|
@@ -5,6 +5,7 @@ import { FailedEventsQuery } from "../../../model/FailedEventsQuery.js";
|
|
|
5
5
|
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
6
6
|
import "@contember/authorization";
|
|
7
7
|
import "@contember/schema";
|
|
8
|
+
import { EventByIdQuery } from "../../../model/EventByIdQuery.js";
|
|
8
9
|
class EventsQueryResolver {
|
|
9
10
|
async eventsInProcessing(parent, { args }, ctx) {
|
|
10
11
|
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW);
|
|
@@ -18,6 +19,15 @@ class EventsQueryResolver {
|
|
|
18
19
|
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW);
|
|
19
20
|
return await this.fetchEvents(ctx.db, new FailedEventsQuery(args ?? {}));
|
|
20
21
|
}
|
|
22
|
+
async event(parent, { id }, ctx) {
|
|
23
|
+
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW);
|
|
24
|
+
const stages = await this.fetchStagesMap(ctx.db);
|
|
25
|
+
const result = await ctx.db.queryHandler.fetch(new EventByIdQuery(id));
|
|
26
|
+
if (!result) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return this.mapEventRows([result], stages)[0];
|
|
30
|
+
}
|
|
21
31
|
async fetchEvents(db, query) {
|
|
22
32
|
const stages = await this.fetchStagesMap(db);
|
|
23
33
|
return this.mapEventRows(await db.queryHandler.fetch(query), stages);
|
|
@@ -38,7 +48,10 @@ class EventsQueryResolver {
|
|
|
38
48
|
stage: stagesMap[row.stage_id],
|
|
39
49
|
state: row.state,
|
|
40
50
|
target: row.target,
|
|
41
|
-
transactionId: row.transaction_id
|
|
51
|
+
transactionId: row.transaction_id,
|
|
52
|
+
identityId: row.identity_id ?? void 0,
|
|
53
|
+
ipAddress: row.ip_address ?? void 0,
|
|
54
|
+
userAgent: row.user_agent ?? void 0
|
|
42
55
|
}));
|
|
43
56
|
}
|
|
44
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventsQueryResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/EventsQueryResolver.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"EventsQueryResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/EventsQueryResolver.ts"],"sourcesContent":["import { Event, QueryEventsInProcessingArgs, QueryEventsToProcessArgs, QueryFailedEventsArgs, QueryResolvers } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { EventsToProcessQuery } from '../../../model/EventsToProcessQuery'\nimport { EventRow } from '../../../model/types'\nimport { DatabaseContext, StagesQuery } from '@contember/engine-system-api'\nimport { Client, DatabaseQuery } from '@contember/database'\nimport { EventsInProcessingQuery } from '../../../model/EventsInProcessingQuery'\nimport { FailedEventsQuery } from '../../../model/FailedEventsQuery'\nimport { ActionsAuthorizationActions } from '../../../authorization'\nimport { EventByIdQuery } from '../../../model/EventByIdQuery'\n\nexport class EventsQueryResolver implements QueryResolvers<ActionsContext> {\n\tasync eventsInProcessing(parent: unknown, { args }: QueryEventsInProcessingArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\n\t\treturn await this.fetchEvents(ctx.db, new EventsInProcessingQuery(args ?? {}))\n\t}\n\n\tasync eventsToProcess(parent: unknown, { args }: QueryEventsToProcessArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\n\t\treturn await this.fetchEvents(ctx.db, new EventsToProcessQuery(args ?? {}))\n\t}\n\n\tasync failedEvents(parent: unknown, { args }: QueryFailedEventsArgs, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\n\t\treturn await this.fetchEvents(ctx.db, new FailedEventsQuery(args ?? {}))\n\t}\n\n\tasync event(parent: unknown, { id }: { id: string }, ctx: ActionsContext): Promise<Event | null> {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW)\n\t\tconst stages = await this.fetchStagesMap(ctx.db)\n\t\tconst result = await ctx.db.queryHandler.fetch(new EventByIdQuery(id))\n\t\tif (!result) {\n\t\t\treturn null\n\t\t}\n\t\treturn this.mapEventRows([result], stages)[0]\n\t}\n\n\tprivate async fetchEvents(db: DatabaseContext, query: DatabaseQuery<EventRow[]>) {\n\t\tconst stages = await this.fetchStagesMap(db)\n\t\treturn this.mapEventRows(await db.queryHandler.fetch(query), stages)\n\t}\n\n\tprivate async fetchStagesMap(db: DatabaseContext): Promise<Record<string, string>> {\n\t\treturn Object.fromEntries((await db.queryHandler.fetch(new StagesQuery())).map(it => [it.id, it.slug]))\n\t}\n\n\tprivate mapEventRows(rows: EventRow[], stagesMap: Record<string, string>): Event[] {\n\t\treturn rows.map(row => ({\n\t\t\tid: row.id,\n\t\t\tcreatedAt: row.created_at,\n\t\t\tresolvedAt: row.created_at,\n\t\t\tlastStateChange: row.last_state_change,\n\t\t\tvisibleAt: row.visible_at,\n\t\t\tlog: row.log,\n\t\t\tnumRetries: row.num_retries,\n\t\t\tpayload: row.payload,\n\t\t\tstage: stagesMap[row.stage_id],\n\t\t\tstate: row.state,\n\t\t\ttarget: row.target,\n\t\t\ttransactionId: row.transaction_id,\n\t\t\tidentityId: row.identity_id ?? undefined,\n\t\t\tipAddress: row.ip_address ?? undefined,\n\t\t\tuserAgent: row.user_agent ?? undefined,\n\t\t}))\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;AAWO,MAAM,oBAA8D;AAAA,EAC1E,MAAM,mBAAmB,QAAiB,EAAE,KAAA,GAAqC,KAAqB;AACrG,UAAM,IAAI,cAAc,4BAA4B,WAAW;AAE/D,WAAO,MAAM,KAAK,YAAY,IAAI,IAAI,IAAI,wBAAwB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAC9E;AAAA,EAEA,MAAM,gBAAgB,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AAC/F,UAAM,IAAI,cAAc,4BAA4B,WAAW;AAE/D,WAAO,MAAM,KAAK,YAAY,IAAI,IAAI,IAAI,qBAAqB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAC3E;AAAA,EAEA,MAAM,aAAa,QAAiB,EAAE,KAAA,GAA+B,KAAqB;AACzF,UAAM,IAAI,cAAc,4BAA4B,WAAW;AAE/D,WAAO,MAAM,KAAK,YAAY,IAAI,IAAI,IAAI,kBAAkB,QAAQ,CAAA,CAAE,CAAC;AAAA,EACxE;AAAA,EAEA,MAAM,MAAM,QAAiB,EAAE,GAAA,GAAsB,KAA4C;AAChG,UAAM,IAAI,cAAc,4BAA4B,WAAW;AAC/D,UAAM,SAAS,MAAM,KAAK,eAAe,IAAI,EAAE;AAC/C,UAAM,SAAS,MAAM,IAAI,GAAG,aAAa,MAAM,IAAI,eAAe,EAAE,CAAC;AACrE,QAAI,CAAC,QAAQ;AACZ,aAAO;AAAA,IACR;AACA,WAAO,KAAK,aAAa,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC;AAAA,EAC7C;AAAA,EAEA,MAAc,YAAY,IAAqB,OAAkC;AAChF,UAAM,SAAS,MAAM,KAAK,eAAe,EAAE;AAC3C,WAAO,KAAK,aAAa,MAAM,GAAG,aAAa,MAAM,KAAK,GAAG,MAAM;AAAA,EACpE;AAAA,EAEA,MAAc,eAAe,IAAsD;AAClF,WAAO,OAAO,aAAa,MAAM,GAAG,aAAa,MAAM,IAAI,YAAA,CAAa,GAAG,IAAI,QAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAAA,EACvG;AAAA,EAEQ,aAAa,MAAkB,WAA4C;AAClF,WAAO,KAAK,IAAI,CAAA,SAAQ;AAAA,MACvB,IAAI,IAAI;AAAA,MACR,WAAW,IAAI;AAAA,MACf,YAAY,IAAI;AAAA,MAChB,iBAAiB,IAAI;AAAA,MACrB,WAAW,IAAI;AAAA,MACf,KAAK,IAAI;AAAA,MACT,YAAY,IAAI;AAAA,MAChB,SAAS,IAAI;AAAA,MACb,OAAO,UAAU,IAAI,QAAQ;AAAA,MAC7B,OAAO,IAAI;AAAA,MACX,QAAQ,IAAI;AAAA,MACZ,eAAe,IAAI;AAAA,MACnB,YAAY,IAAI,eAAe;AAAA,MAC/B,WAAW,IAAI,cAAc;AAAA,MAC7B,WAAW,IAAI,cAAc;AAAA,IAAA,EAC5B;AAAA,EACH;AACD;"}
|
|
@@ -1 +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\
|
|
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;;"}
|
|
@@ -1 +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\
|
|
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;"}
|
|
@@ -15,11 +15,14 @@ const schema = graphqlTag.gql`
|
|
|
15
15
|
failedEvents(args: EventArgs): [Event!]!
|
|
16
16
|
eventsToProcess(args: EventArgs): [Event!]!
|
|
17
17
|
eventsInProcessing(args: EventArgs): [Event!]!
|
|
18
|
+
event(id: Uuid!): Event
|
|
18
19
|
variables: [Variable!]!
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
type Mutation {
|
|
22
23
|
processBatch: ProcessBatchResponse!
|
|
24
|
+
retryEvent(id: Uuid!): RetryEventResponse!
|
|
25
|
+
stopEvent(id: Uuid!): StopEventResponse!
|
|
23
26
|
setVariables(args: SetVariablesArgs!): SetVariablesResponse!
|
|
24
27
|
}
|
|
25
28
|
|
|
@@ -32,6 +35,9 @@ const schema = graphqlTag.gql`
|
|
|
32
35
|
type Event {
|
|
33
36
|
id: Uuid!
|
|
34
37
|
transactionId: Uuid!
|
|
38
|
+
identityId: Uuid
|
|
39
|
+
ipAddress: String
|
|
40
|
+
userAgent: String
|
|
35
41
|
createdAt: DateTime!
|
|
36
42
|
lastStateChange: DateTime!
|
|
37
43
|
resolvedAt: DateTime
|
|
@@ -57,16 +63,24 @@ const schema = graphqlTag.gql`
|
|
|
57
63
|
ok: Boolean!
|
|
58
64
|
}
|
|
59
65
|
|
|
66
|
+
type RetryEventResponse {
|
|
67
|
+
ok: Boolean!
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
type StopEventResponse {
|
|
71
|
+
ok: Boolean!
|
|
72
|
+
}
|
|
73
|
+
|
|
60
74
|
input SetVariablesArgs {
|
|
61
75
|
variables: [VariableInput!]!
|
|
62
76
|
mode: SetVariablesMode
|
|
63
77
|
}
|
|
64
|
-
|
|
78
|
+
|
|
65
79
|
"""
|
|
66
|
-
Defines how it handles original variables.
|
|
80
|
+
Defines how it handles original variables.
|
|
67
81
|
- MERGE merges with new values (default behaviour)
|
|
68
82
|
- SET replaces all variables
|
|
69
|
-
- APPEND_ONLY_MISSING appends values if not already exist
|
|
83
|
+
- APPEND_ONLY_MISSING appends values if not already exist
|
|
70
84
|
"""
|
|
71
85
|
enum SetVariablesMode {
|
|
72
86
|
MERGE
|
|
@@ -78,7 +92,7 @@ const schema = graphqlTag.gql`
|
|
|
78
92
|
name: String!
|
|
79
93
|
value: String!
|
|
80
94
|
}
|
|
81
|
-
|
|
95
|
+
|
|
82
96
|
type SetVariablesResponse {
|
|
83
97
|
ok: Boolean!
|
|
84
98
|
}
|
|
@@ -1 +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 variables: [Variable!]!\n }\n\n type Mutation {\n processBatch: ProcessBatchResponse!\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 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 input SetVariablesArgs {\n variables: [VariableInput!]!\n mode: SetVariablesMode\n }\n\
|
|
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;;"}
|
|
@@ -13,11 +13,14 @@ const schema = gql`
|
|
|
13
13
|
failedEvents(args: EventArgs): [Event!]!
|
|
14
14
|
eventsToProcess(args: EventArgs): [Event!]!
|
|
15
15
|
eventsInProcessing(args: EventArgs): [Event!]!
|
|
16
|
+
event(id: Uuid!): Event
|
|
16
17
|
variables: [Variable!]!
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
type Mutation {
|
|
20
21
|
processBatch: ProcessBatchResponse!
|
|
22
|
+
retryEvent(id: Uuid!): RetryEventResponse!
|
|
23
|
+
stopEvent(id: Uuid!): StopEventResponse!
|
|
21
24
|
setVariables(args: SetVariablesArgs!): SetVariablesResponse!
|
|
22
25
|
}
|
|
23
26
|
|
|
@@ -30,6 +33,9 @@ const schema = gql`
|
|
|
30
33
|
type Event {
|
|
31
34
|
id: Uuid!
|
|
32
35
|
transactionId: Uuid!
|
|
36
|
+
identityId: Uuid
|
|
37
|
+
ipAddress: String
|
|
38
|
+
userAgent: String
|
|
33
39
|
createdAt: DateTime!
|
|
34
40
|
lastStateChange: DateTime!
|
|
35
41
|
resolvedAt: DateTime
|
|
@@ -55,16 +61,24 @@ const schema = gql`
|
|
|
55
61
|
ok: Boolean!
|
|
56
62
|
}
|
|
57
63
|
|
|
64
|
+
type RetryEventResponse {
|
|
65
|
+
ok: Boolean!
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
type StopEventResponse {
|
|
69
|
+
ok: Boolean!
|
|
70
|
+
}
|
|
71
|
+
|
|
58
72
|
input SetVariablesArgs {
|
|
59
73
|
variables: [VariableInput!]!
|
|
60
74
|
mode: SetVariablesMode
|
|
61
75
|
}
|
|
62
|
-
|
|
76
|
+
|
|
63
77
|
"""
|
|
64
|
-
Defines how it handles original variables.
|
|
78
|
+
Defines how it handles original variables.
|
|
65
79
|
- MERGE merges with new values (default behaviour)
|
|
66
80
|
- SET replaces all variables
|
|
67
|
-
- APPEND_ONLY_MISSING appends values if not already exist
|
|
81
|
+
- APPEND_ONLY_MISSING appends values if not already exist
|
|
68
82
|
"""
|
|
69
83
|
enum SetVariablesMode {
|
|
70
84
|
MERGE
|
|
@@ -76,7 +90,7 @@ const schema = gql`
|
|
|
76
90
|
name: String!
|
|
77
91
|
value: String!
|
|
78
92
|
}
|
|
79
|
-
|
|
93
|
+
|
|
80
94
|
type SetVariablesResponse {
|
|
81
95
|
ok: Boolean!
|
|
82
96
|
}
|
|
@@ -1 +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 variables: [Variable!]!\n }\n\n type Mutation {\n processBatch: ProcessBatchResponse!\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 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 input SetVariablesArgs {\n variables: [VariableInput!]!\n mode: SetVariablesMode\n }\n\
|
|
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 +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
|
|
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;;"}
|
|
@@ -1 +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
|
|
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;"}
|
|
@@ -3,8 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const snapshot = require("./snapshot.cjs");
|
|
4
4
|
const databaseMigrations = require("@contember/database-migrations");
|
|
5
5
|
const _20230310145000ActionsVariables = require("./2023-03-10-145000-actions-variables.cjs");
|
|
6
|
+
const _20250528160000ActionEventUser = require("./2025-05-28-160000-action-event-user.cjs");
|
|
6
7
|
const migrationsGroup = new databaseMigrations.MigrationGroup(snapshot, {
|
|
7
|
-
"2023-03-10-145000-actions-variables": _20230310145000ActionsVariables
|
|
8
|
+
"2023-03-10-145000-actions-variables": _20230310145000ActionsVariables,
|
|
9
|
+
"2025-05-28-160000-action-event-user": _20250528160000ActionEventUser
|
|
8
10
|
});
|
|
9
11
|
exports.migrationsGroup = migrationsGroup;
|
|
10
12
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +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'\n\nexport const migrationsGroup = new MigrationGroup(snapshot, {\n\t'2023-03-10-145000-actions-variables': _20230310145000actionsvariables,\n})\n"],"names":["MigrationGroup","_20230310145000actionsvariables"],"mappings":"
|
|
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;;"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import snapshot from "./snapshot.js";
|
|
2
2
|
import { MigrationGroup } from "@contember/database-migrations";
|
|
3
3
|
import _20230310145000actionsvariables from "./2023-03-10-145000-actions-variables.js";
|
|
4
|
+
import _20250528160000actioneventuser from "./2025-05-28-160000-action-event-user.js";
|
|
4
5
|
const migrationsGroup = new MigrationGroup(snapshot, {
|
|
5
|
-
"2023-03-10-145000-actions-variables": _20230310145000actionsvariables
|
|
6
|
+
"2023-03-10-145000-actions-variables": _20230310145000actionsvariables,
|
|
7
|
+
"2025-05-28-160000-action-event-user": _20250528160000actioneventuser
|
|
6
8
|
});
|
|
7
9
|
export {
|
|
8
10
|
migrationsGroup
|
|
@@ -1 +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'\n\nexport const migrationsGroup = new MigrationGroup(snapshot, {\n\t'2023-03-10-145000-actions-variables': _20230310145000actionsvariables,\n})\n"],"names":[],"mappings":"
|
|
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;"}
|
|
@@ -29,11 +29,14 @@ async function snapshot(builder) {
|
|
|
29
29
|
trigger TEXT NOT NULL,
|
|
30
30
|
priority INT NOT NULL DEFAULT 0,
|
|
31
31
|
payload JSONB NOT NULL,
|
|
32
|
-
log JSONB NOT NULL DEFAULT '[]'
|
|
32
|
+
log JSONB NOT NULL DEFAULT '[]',
|
|
33
|
+
identity_id UUID DEFAULT NULL,
|
|
34
|
+
ip_address INET DEFAULT NULL,
|
|
35
|
+
user_agent TEXT DEFAULT NULL
|
|
33
36
|
);
|
|
34
37
|
|
|
35
38
|
CREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');
|
|
36
|
-
|
|
39
|
+
|
|
37
40
|
CREATE TABLE actions_variable
|
|
38
41
|
(
|
|
39
42
|
id UUID PRIMARY KEY NOT NULL,
|
|
@@ -1 +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
|
|
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;;"}
|
|
@@ -28,11 +28,14 @@ async function snapshot(builder) {
|
|
|
28
28
|
trigger TEXT NOT NULL,
|
|
29
29
|
priority INT NOT NULL DEFAULT 0,
|
|
30
30
|
payload JSONB NOT NULL,
|
|
31
|
-
log JSONB NOT NULL DEFAULT '[]'
|
|
31
|
+
log JSONB NOT NULL DEFAULT '[]',
|
|
32
|
+
identity_id UUID DEFAULT NULL,
|
|
33
|
+
ip_address INET DEFAULT NULL,
|
|
34
|
+
user_agent TEXT DEFAULT NULL
|
|
32
35
|
);
|
|
33
36
|
|
|
34
37
|
CREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');
|
|
35
|
-
|
|
38
|
+
|
|
36
39
|
CREATE TABLE actions_variable
|
|
37
40
|
(
|
|
38
41
|
id UUID PRIMARY KEY NOT NULL,
|
|
@@ -1 +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
|
|
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;"}
|