@contember/engine-actions 2.1.0-alpha.3 → 2.1.0-alpha.35
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 +2 -2
- package/package.json +27 -22
- 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
- package/dist/development/index.cjs +0 -94
- package/dist/development/index.cjs.map +0 -1
- package/dist/development/index.js +0 -94
- 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 -15
- package/dist/development/src/authorization/ActionsAuthorizationActions.cjs.map +0 -1
- package/dist/development/src/authorization/ActionsAuthorizationActions.js +0 -16
- 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 -104
- package/dist/development/src/dispatch/EventsRepository.cjs.map +0 -1
- package/dist/development/src/dispatch/EventsRepository.js +0 -104
- 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 -193
- package/dist/development/src/dispatch/WebhookTargetHandler.cjs.map +0 -1
- package/dist/development/src/dispatch/WebhookTargetHandler.js +0 -176
- package/dist/development/src/dispatch/WebhookTargetHandler.js.map +0 -1
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs +0 -38
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +0 -1
- package/dist/development/src/graphql/http/ActionsApiMiddlewareFactory.js +0 -38
- 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 -31
- package/dist/development/src/graphql/resolvers/ResolversFactory.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/ResolversFactory.js +0 -31
- 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/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/query/EventsQueryResolver.cjs +0 -48
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +0 -1
- package/dist/development/src/graphql/resolvers/query/EventsQueryResolver.js +0 -48
- 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 -93
- package/dist/development/src/graphql/schema/actions.graphql.cjs.map +0 -1
- package/dist/development/src/graphql/schema/actions.graphql.js +0 -93
- 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/index.cjs +0 -10
- package/dist/development/src/migrations/index.cjs.map +0 -1
- package/dist/development/src/migrations/index.js +0 -10
- package/dist/development/src/migrations/index.js.map +0 -1
- package/dist/development/src/migrations/snapshot.cjs +0 -48
- package/dist/development/src/migrations/snapshot.cjs.map +0 -1
- package/dist/development/src/migrations/snapshot.js +0 -49
- package/dist/development/src/migrations/snapshot.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 -126
- package/dist/development/src/triggers/TriggerHandler.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerHandler.js +0 -126
- package/dist/development/src/triggers/TriggerHandler.js.map +0 -1
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs +0 -21
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerIndirectChangesFetcher.js +0 -21
- 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 -134
- package/dist/development/src/triggers/TriggerPayloadBuilder.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadBuilder.js +0 -134
- 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 -43
- package/dist/development/src/triggers/TriggerPayloadPersister.cjs.map +0 -1
- package/dist/development/src/triggers/TriggerPayloadPersister.js +0 -43
- 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/production/index.cjs +0 -94
- package/dist/production/index.cjs.map +0 -1
- package/dist/production/index.js +0 -94
- 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 -15
- package/dist/production/src/authorization/ActionsAuthorizationActions.cjs.map +0 -1
- package/dist/production/src/authorization/ActionsAuthorizationActions.js +0 -16
- 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 -104
- package/dist/production/src/dispatch/EventsRepository.cjs.map +0 -1
- package/dist/production/src/dispatch/EventsRepository.js +0 -104
- 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 -193
- package/dist/production/src/dispatch/WebhookTargetHandler.cjs.map +0 -1
- package/dist/production/src/dispatch/WebhookTargetHandler.js +0 -176
- package/dist/production/src/dispatch/WebhookTargetHandler.js.map +0 -1
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs +0 -38
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.cjs.map +0 -1
- package/dist/production/src/graphql/http/ActionsApiMiddlewareFactory.js +0 -38
- 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 -31
- package/dist/production/src/graphql/resolvers/ResolversFactory.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/ResolversFactory.js +0 -31
- 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/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/query/EventsQueryResolver.cjs +0 -48
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.cjs.map +0 -1
- package/dist/production/src/graphql/resolvers/query/EventsQueryResolver.js +0 -48
- 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 -93
- package/dist/production/src/graphql/schema/actions.graphql.cjs.map +0 -1
- package/dist/production/src/graphql/schema/actions.graphql.js +0 -93
- 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/index.cjs +0 -10
- package/dist/production/src/migrations/index.cjs.map +0 -1
- package/dist/production/src/migrations/index.js +0 -10
- package/dist/production/src/migrations/index.js.map +0 -1
- package/dist/production/src/migrations/snapshot.cjs +0 -48
- package/dist/production/src/migrations/snapshot.cjs.map +0 -1
- package/dist/production/src/migrations/snapshot.js +0 -49
- package/dist/production/src/migrations/snapshot.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 -126
- package/dist/production/src/triggers/TriggerHandler.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerHandler.js +0 -126
- package/dist/production/src/triggers/TriggerHandler.js.map +0 -1
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs +0 -21
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerIndirectChangesFetcher.js +0 -21
- 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 -134
- package/dist/production/src/triggers/TriggerPayloadBuilder.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadBuilder.js +0 -134
- 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 -43
- package/dist/production/src/triggers/TriggerPayloadPersister.cjs.map +0 -1
- package/dist/production/src/triggers/TriggerPayloadPersister.js +0 -43
- 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/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 -28
- 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 -22
- 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 -11
- package/dist/types/graphql/resolvers/ActionsContext.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/ResolversFactory.d.ts +0 -13
- 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/SetVariablesMutationResolver.d.ts +0 -11
- package/dist/types/graphql/resolvers/mutation/SetVariablesMutationResolver.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/mutation/index.d.ts +0 -3
- package/dist/types/graphql/resolvers/mutation/index.d.ts.map +0 -1
- package/dist/types/graphql/resolvers/query/EventsQueryResolver.d.ts +0 -11
- 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 -256
- 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/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/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 -19
- 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 -11
- 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 -21
- package/dist/types/triggers/TriggerPayloadManager.d.ts.map +0 -1
- package/dist/types/triggers/TriggerPayloadPersister.d.ts +0 -17
- 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
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
2
|
-
import "@contember/authorization";
|
|
3
|
-
import "@contember/schema";
|
|
4
|
-
class ProcessBatchMutationResolver {
|
|
5
|
-
constructor(eventDispatcher) {
|
|
6
|
-
this.eventDispatcher = eventDispatcher;
|
|
7
|
-
}
|
|
8
|
-
async processBatch(parent, args, ctx) {
|
|
9
|
-
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_PROCESS);
|
|
10
|
-
await this.eventDispatcher.processBatch(ctx);
|
|
11
|
-
return {
|
|
12
|
-
ok: true
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
ProcessBatchMutationResolver
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=ProcessBatchMutationResolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ProcessBatchMutationResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/mutation/ProcessBatchMutationResolver.ts"],"sourcesContent":["import { MutationResolvers } from '../../schema'\nimport { ActionsContext } from '../ActionsContext'\nimport { EventDispatcher } from '../../../dispatch/EventDispatcher'\nimport { ActionsAuthorizationActions } from '../../../authorization'\n\nexport class ProcessBatchMutationResolver implements MutationResolvers<ActionsContext> {\n\tconstructor(\n\t\tprivate eventDispatcher: EventDispatcher,\n\t) {\n\t}\n\tasync processBatch(parent: unknown, args: unknown, ctx: ActionsContext) {\n\t\tawait ctx.requireAccess(ActionsAuthorizationActions.EVENTS_PROCESS)\n\n\t\tawait this.eventDispatcher.processBatch(ctx)\n\t\treturn {\n\t\t\tok: true,\n\t\t}\n\t}\n}\n"],"names":[],"mappings":";;;AAKO,MAAM,6BAA0E;AAAA,EACtF,YACS,iBACP;AADO,SAAA,kBAAA;AAAA,EAAA;AAAA,EAGT,MAAM,aAAa,QAAiB,MAAe,KAAqB;AACjE,UAAA,IAAI,cAAc,4BAA4B,cAAc;AAE5D,UAAA,KAAK,gBAAgB,aAAa,GAAG;AACpC,WAAA;AAAA,MACN,IAAI;AAAA,IACL;AAAA,EAAA;AAEF;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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 SetVariablesMutationResolver {
|
|
7
|
-
constructor(variablesManager) {
|
|
8
|
-
this.variablesManager = variablesManager;
|
|
9
|
-
}
|
|
10
|
-
async setVariables(parent, { args }, ctx) {
|
|
11
|
-
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.VARIABLES_SET);
|
|
12
|
-
await this.variablesManager.setVariables(ctx.db, args);
|
|
13
|
-
return {
|
|
14
|
-
ok: true
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.SetVariablesMutationResolver = SetVariablesMutationResolver;
|
|
19
|
-
//# sourceMappingURL=SetVariablesMutationResolver.cjs.map
|
package/dist/development/src/graphql/resolvers/mutation/SetVariablesMutationResolver.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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\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,EAAA;AAAA,EAKlB,MAAM,aAAa,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AACtF,UAAA,IAAI,cAAcA,4BAAA,4BAA4B,aAAa;AAEjE,UAAM,KAAK,iBAAiB,aAAa,IAAI,IAAI,IAAI;AAE9C,WAAA;AAAA,MACN,IAAI;AAAA,IACL;AAAA,EAAA;AAEF;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
2
|
-
import "@contember/authorization";
|
|
3
|
-
import "@contember/schema";
|
|
4
|
-
class SetVariablesMutationResolver {
|
|
5
|
-
constructor(variablesManager) {
|
|
6
|
-
this.variablesManager = variablesManager;
|
|
7
|
-
}
|
|
8
|
-
async setVariables(parent, { args }, ctx) {
|
|
9
|
-
await ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_SET);
|
|
10
|
-
await this.variablesManager.setVariables(ctx.db, args);
|
|
11
|
-
return {
|
|
12
|
-
ok: true
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
SetVariablesMutationResolver
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=SetVariablesMutationResolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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\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,EAAA;AAAA,EAKlB,MAAM,aAAa,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AACtF,UAAA,IAAI,cAAc,4BAA4B,aAAa;AAEjE,UAAM,KAAK,iBAAiB,aAAa,IAAI,IAAI,IAAI;AAE9C,WAAA;AAAA,MACN,IAAI;AAAA,IACL;AAAA,EAAA;AAEF;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const EventsToProcessQuery = require("../../../model/EventsToProcessQuery.cjs");
|
|
4
|
-
const engineSystemApi = require("@contember/engine-system-api");
|
|
5
|
-
const EventsInProcessingQuery = require("../../../model/EventsInProcessingQuery.cjs");
|
|
6
|
-
const FailedEventsQuery = require("../../../model/FailedEventsQuery.cjs");
|
|
7
|
-
const ActionsAuthorizationActions = require("../../../authorization/ActionsAuthorizationActions.cjs");
|
|
8
|
-
require("@contember/authorization");
|
|
9
|
-
require("@contember/schema");
|
|
10
|
-
class EventsQueryResolver {
|
|
11
|
-
async eventsInProcessing(parent, { args }, ctx) {
|
|
12
|
-
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_VIEW);
|
|
13
|
-
return await this.fetchEvents(ctx.db, new EventsInProcessingQuery.EventsInProcessingQuery(args ?? {}));
|
|
14
|
-
}
|
|
15
|
-
async eventsToProcess(parent, { args }, ctx) {
|
|
16
|
-
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_VIEW);
|
|
17
|
-
return await this.fetchEvents(ctx.db, new EventsToProcessQuery.EventsToProcessQuery(args ?? {}));
|
|
18
|
-
}
|
|
19
|
-
async failedEvents(parent, { args }, ctx) {
|
|
20
|
-
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.EVENTS_VIEW);
|
|
21
|
-
return await this.fetchEvents(ctx.db, new FailedEventsQuery.FailedEventsQuery(args ?? {}));
|
|
22
|
-
}
|
|
23
|
-
async fetchEvents(db, query) {
|
|
24
|
-
const stages = await this.fetchStagesMap(db);
|
|
25
|
-
return this.mapEventRows(await db.queryHandler.fetch(query), stages);
|
|
26
|
-
}
|
|
27
|
-
async fetchStagesMap(db) {
|
|
28
|
-
return Object.fromEntries((await db.queryHandler.fetch(new engineSystemApi.StagesQuery())).map((it) => [it.id, it.slug]));
|
|
29
|
-
}
|
|
30
|
-
mapEventRows(rows, stagesMap) {
|
|
31
|
-
return rows.map((row) => ({
|
|
32
|
-
id: row.id,
|
|
33
|
-
createdAt: row.created_at,
|
|
34
|
-
resolvedAt: row.created_at,
|
|
35
|
-
lastStateChange: row.last_state_change,
|
|
36
|
-
visibleAt: row.visible_at,
|
|
37
|
-
log: row.log,
|
|
38
|
-
numRetries: row.num_retries,
|
|
39
|
-
payload: row.payload,
|
|
40
|
-
stage: stagesMap[row.stage_id],
|
|
41
|
-
state: row.state,
|
|
42
|
-
target: row.target,
|
|
43
|
-
transactionId: row.transaction_id
|
|
44
|
-
}));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.EventsQueryResolver = EventsQueryResolver;
|
|
48
|
-
//# sourceMappingURL=EventsQueryResolver.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventsQueryResolver.cjs","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/EventsQueryResolver.ts"],"sourcesContent":["import {\n\tEvent,\n\tQueryEventsInProcessingArgs,\n\tQueryEventsToProcessArgs,\n\tQueryFailedEventsArgs,\n\tQueryResolvers,\n} 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'\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\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\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}))\n\t}\n}\n"],"names":["ActionsAuthorizationActions","EventsInProcessingQuery","EventsToProcessQuery","FailedEventsQuery","StagesQuery"],"mappings":";;;;;;;;;AAgBO,MAAM,oBAA8D;AAAA,EAC1E,MAAM,mBAAmB,QAAiB,EAAE,KAAA,GAAqC,KAAqB;AAC/F,UAAA,IAAI,cAAcA,4BAAA,4BAA4B,WAAW;AAExD,WAAA,MAAM,KAAK,YAAY,IAAI,IAAI,IAAIC,wBAAwB,wBAAA,QAAQ,CAAA,CAAE,CAAC;AAAA,EAAA;AAAA,EAG9E,MAAM,gBAAgB,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AACzF,UAAA,IAAI,cAAcD,4BAAA,4BAA4B,WAAW;AAExD,WAAA,MAAM,KAAK,YAAY,IAAI,IAAI,IAAIE,qBAAqB,qBAAA,QAAQ,CAAA,CAAE,CAAC;AAAA,EAAA;AAAA,EAG3E,MAAM,aAAa,QAAiB,EAAE,KAAA,GAA+B,KAAqB;AACnF,UAAA,IAAI,cAAcF,4BAAA,4BAA4B,WAAW;AAExD,WAAA,MAAM,KAAK,YAAY,IAAI,IAAI,IAAIG,kBAAkB,kBAAA,QAAQ,CAAA,CAAE,CAAC;AAAA,EAAA;AAAA,EAGxE,MAAc,YAAY,IAAqB,OAAkC;AAChF,UAAM,SAAS,MAAM,KAAK,eAAe,EAAE;AACpC,WAAA,KAAK,aAAa,MAAM,GAAG,aAAa,MAAM,KAAK,GAAG,MAAM;AAAA,EAAA;AAAA,EAGpE,MAAc,eAAe,IAAsD;AAClF,WAAO,OAAO,aAAa,MAAM,GAAG,aAAa,MAAM,IAAIC,gBAAY,YAAA,CAAC,GAAG,IAAI,QAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAAA,EAAA;AAAA,EAG/F,aAAa,MAAkB,WAA4C;AAE3E,WAAA,KAAK,IAAI,CAAQ,SAAA;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,IAAA,EAClB;AAAA,EAAA;AAEJ;;"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { EventsToProcessQuery } from "../../../model/EventsToProcessQuery.js";
|
|
2
|
-
import { StagesQuery } from "@contember/engine-system-api";
|
|
3
|
-
import { EventsInProcessingQuery } from "../../../model/EventsInProcessingQuery.js";
|
|
4
|
-
import { FailedEventsQuery } from "../../../model/FailedEventsQuery.js";
|
|
5
|
-
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
6
|
-
import "@contember/authorization";
|
|
7
|
-
import "@contember/schema";
|
|
8
|
-
class EventsQueryResolver {
|
|
9
|
-
async eventsInProcessing(parent, { args }, ctx) {
|
|
10
|
-
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW);
|
|
11
|
-
return await this.fetchEvents(ctx.db, new EventsInProcessingQuery(args ?? {}));
|
|
12
|
-
}
|
|
13
|
-
async eventsToProcess(parent, { args }, ctx) {
|
|
14
|
-
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW);
|
|
15
|
-
return await this.fetchEvents(ctx.db, new EventsToProcessQuery(args ?? {}));
|
|
16
|
-
}
|
|
17
|
-
async failedEvents(parent, { args }, ctx) {
|
|
18
|
-
await ctx.requireAccess(ActionsAuthorizationActions.EVENTS_VIEW);
|
|
19
|
-
return await this.fetchEvents(ctx.db, new FailedEventsQuery(args ?? {}));
|
|
20
|
-
}
|
|
21
|
-
async fetchEvents(db, query) {
|
|
22
|
-
const stages = await this.fetchStagesMap(db);
|
|
23
|
-
return this.mapEventRows(await db.queryHandler.fetch(query), stages);
|
|
24
|
-
}
|
|
25
|
-
async fetchStagesMap(db) {
|
|
26
|
-
return Object.fromEntries((await db.queryHandler.fetch(new StagesQuery())).map((it) => [it.id, it.slug]));
|
|
27
|
-
}
|
|
28
|
-
mapEventRows(rows, stagesMap) {
|
|
29
|
-
return rows.map((row) => ({
|
|
30
|
-
id: row.id,
|
|
31
|
-
createdAt: row.created_at,
|
|
32
|
-
resolvedAt: row.created_at,
|
|
33
|
-
lastStateChange: row.last_state_change,
|
|
34
|
-
visibleAt: row.visible_at,
|
|
35
|
-
log: row.log,
|
|
36
|
-
numRetries: row.num_retries,
|
|
37
|
-
payload: row.payload,
|
|
38
|
-
stage: stagesMap[row.stage_id],
|
|
39
|
-
state: row.state,
|
|
40
|
-
target: row.target,
|
|
41
|
-
transactionId: row.transaction_id
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
EventsQueryResolver
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=EventsQueryResolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventsQueryResolver.js","sources":["../../../../../../../packages/engine-actions/src/graphql/resolvers/query/EventsQueryResolver.ts"],"sourcesContent":["import {\n\tEvent,\n\tQueryEventsInProcessingArgs,\n\tQueryEventsToProcessArgs,\n\tQueryFailedEventsArgs,\n\tQueryResolvers,\n} 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'\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\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\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}))\n\t}\n}\n"],"names":[],"mappings":";;;;;;;AAgBO,MAAM,oBAA8D;AAAA,EAC1E,MAAM,mBAAmB,QAAiB,EAAE,KAAA,GAAqC,KAAqB;AAC/F,UAAA,IAAI,cAAc,4BAA4B,WAAW;AAExD,WAAA,MAAM,KAAK,YAAY,IAAI,IAAI,IAAI,wBAAwB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAAA;AAAA,EAG9E,MAAM,gBAAgB,QAAiB,EAAE,KAAA,GAAkC,KAAqB;AACzF,UAAA,IAAI,cAAc,4BAA4B,WAAW;AAExD,WAAA,MAAM,KAAK,YAAY,IAAI,IAAI,IAAI,qBAAqB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAAA;AAAA,EAG3E,MAAM,aAAa,QAAiB,EAAE,KAAA,GAA+B,KAAqB;AACnF,UAAA,IAAI,cAAc,4BAA4B,WAAW;AAExD,WAAA,MAAM,KAAK,YAAY,IAAI,IAAI,IAAI,kBAAkB,QAAQ,CAAA,CAAE,CAAC;AAAA,EAAA;AAAA,EAGxE,MAAc,YAAY,IAAqB,OAAkC;AAChF,UAAM,SAAS,MAAM,KAAK,eAAe,EAAE;AACpC,WAAA,KAAK,aAAa,MAAM,GAAG,aAAa,MAAM,KAAK,GAAG,MAAM;AAAA,EAAA;AAAA,EAGpE,MAAc,eAAe,IAAsD;AAClF,WAAO,OAAO,aAAa,MAAM,GAAG,aAAa,MAAM,IAAI,YAAY,CAAC,GAAG,IAAI,QAAM,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAAA,EAAA;AAAA,EAG/F,aAAa,MAAkB,WAA4C;AAE3E,WAAA,KAAK,IAAI,CAAQ,SAAA;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,IAAA,EAClB;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
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 VariablesQueryResolver {
|
|
7
|
-
constructor(variablesManager) {
|
|
8
|
-
this.variablesManager = variablesManager;
|
|
9
|
-
}
|
|
10
|
-
async variables(parent, args, ctx) {
|
|
11
|
-
await ctx.requireAccess(ActionsAuthorizationActions.ActionsAuthorizationActions.VARIABLES_VIEW);
|
|
12
|
-
return Object.entries(await this.variablesManager.fetchVariables(ctx.db)).map(([name, value]) => ({
|
|
13
|
-
name,
|
|
14
|
-
value
|
|
15
|
-
}));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.VariablesQueryResolver = VariablesQueryResolver;
|
|
19
|
-
//# sourceMappingURL=VariablesQueryResolver.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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\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,EAE7E,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAAA;AAAA,EAIlB,MAAM,UAAU,QAAiB,MAAe,KAAqB;AAC9D,UAAA,IAAI,cAAcA,4BAAA,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,EAAA;AAEJ;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ActionsAuthorizationActions } from "../../../authorization/ActionsAuthorizationActions.js";
|
|
2
|
-
import "@contember/authorization";
|
|
3
|
-
import "@contember/schema";
|
|
4
|
-
class VariablesQueryResolver {
|
|
5
|
-
constructor(variablesManager) {
|
|
6
|
-
this.variablesManager = variablesManager;
|
|
7
|
-
}
|
|
8
|
-
async variables(parent, args, ctx) {
|
|
9
|
-
await ctx.requireAccess(ActionsAuthorizationActions.VARIABLES_VIEW);
|
|
10
|
-
return Object.entries(await this.variablesManager.fetchVariables(ctx.db)).map(([name, value]) => ({
|
|
11
|
-
name,
|
|
12
|
-
value
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export {
|
|
17
|
-
VariablesQueryResolver
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=VariablesQueryResolver.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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\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,EAE7E,YACkB,kBAChB;AADgB,SAAA,mBAAA;AAAA,EAAA;AAAA,EAIlB,MAAM,UAAU,QAAiB,MAAe,KAAqB;AAC9D,UAAA,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,EAAA;AAEJ;"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const graphqlTag = require("graphql-tag");
|
|
4
|
-
const schema = graphqlTag.gql`
|
|
5
|
-
scalar DateTime
|
|
6
|
-
scalar Json
|
|
7
|
-
scalar Uuid
|
|
8
|
-
|
|
9
|
-
schema {
|
|
10
|
-
query: Query
|
|
11
|
-
mutation: Mutation
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type Query {
|
|
15
|
-
failedEvents(args: EventArgs): [Event!]!
|
|
16
|
-
eventsToProcess(args: EventArgs): [Event!]!
|
|
17
|
-
eventsInProcessing(args: EventArgs): [Event!]!
|
|
18
|
-
variables: [Variable!]!
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
type Mutation {
|
|
22
|
-
processBatch: ProcessBatchResponse!
|
|
23
|
-
setVariables(args: SetVariablesArgs!): SetVariablesResponse!
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
input EventArgs {
|
|
27
|
-
offset: Int
|
|
28
|
-
"Max 10000"
|
|
29
|
-
limit: Int
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
type Event {
|
|
33
|
-
id: Uuid!
|
|
34
|
-
transactionId: Uuid!
|
|
35
|
-
createdAt: DateTime!
|
|
36
|
-
lastStateChange: DateTime!
|
|
37
|
-
resolvedAt: DateTime
|
|
38
|
-
visibleAt: DateTime
|
|
39
|
-
numRetries: Int!
|
|
40
|
-
state: EventState!
|
|
41
|
-
stage: String!
|
|
42
|
-
target: String!
|
|
43
|
-
payload: Json!
|
|
44
|
-
log: Json!
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
enum EventState {
|
|
48
|
-
created
|
|
49
|
-
retrying
|
|
50
|
-
processing
|
|
51
|
-
succeed
|
|
52
|
-
failed
|
|
53
|
-
stopped
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
type ProcessBatchResponse {
|
|
57
|
-
ok: Boolean!
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
input SetVariablesArgs {
|
|
61
|
-
variables: [VariableInput!]!
|
|
62
|
-
mode: SetVariablesMode
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
"""
|
|
66
|
-
Defines how it handles original variables.
|
|
67
|
-
- MERGE merges with new values (default behaviour)
|
|
68
|
-
- SET replaces all variables
|
|
69
|
-
- APPEND_ONLY_MISSING appends values if not already exist
|
|
70
|
-
"""
|
|
71
|
-
enum SetVariablesMode {
|
|
72
|
-
MERGE
|
|
73
|
-
SET
|
|
74
|
-
APPEND_ONLY_MISSING
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
input VariableInput {
|
|
78
|
-
name: String!
|
|
79
|
-
value: String!
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
type SetVariablesResponse {
|
|
83
|
-
ok: Boolean!
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
type Variable {
|
|
87
|
-
name: String!
|
|
88
|
-
value: String!
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
`;
|
|
92
|
-
exports.schema = schema;
|
|
93
|
-
//# sourceMappingURL=actions.graphql.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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\t\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\t\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,WAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,93 +0,0 @@
|
|
|
1
|
-
import { gql } from "graphql-tag";
|
|
2
|
-
const schema = gql`
|
|
3
|
-
scalar DateTime
|
|
4
|
-
scalar Json
|
|
5
|
-
scalar Uuid
|
|
6
|
-
|
|
7
|
-
schema {
|
|
8
|
-
query: Query
|
|
9
|
-
mutation: Mutation
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type Query {
|
|
13
|
-
failedEvents(args: EventArgs): [Event!]!
|
|
14
|
-
eventsToProcess(args: EventArgs): [Event!]!
|
|
15
|
-
eventsInProcessing(args: EventArgs): [Event!]!
|
|
16
|
-
variables: [Variable!]!
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type Mutation {
|
|
20
|
-
processBatch: ProcessBatchResponse!
|
|
21
|
-
setVariables(args: SetVariablesArgs!): SetVariablesResponse!
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
input EventArgs {
|
|
25
|
-
offset: Int
|
|
26
|
-
"Max 10000"
|
|
27
|
-
limit: Int
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
type Event {
|
|
31
|
-
id: Uuid!
|
|
32
|
-
transactionId: Uuid!
|
|
33
|
-
createdAt: DateTime!
|
|
34
|
-
lastStateChange: DateTime!
|
|
35
|
-
resolvedAt: DateTime
|
|
36
|
-
visibleAt: DateTime
|
|
37
|
-
numRetries: Int!
|
|
38
|
-
state: EventState!
|
|
39
|
-
stage: String!
|
|
40
|
-
target: String!
|
|
41
|
-
payload: Json!
|
|
42
|
-
log: Json!
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
enum EventState {
|
|
46
|
-
created
|
|
47
|
-
retrying
|
|
48
|
-
processing
|
|
49
|
-
succeed
|
|
50
|
-
failed
|
|
51
|
-
stopped
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
type ProcessBatchResponse {
|
|
55
|
-
ok: Boolean!
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
input SetVariablesArgs {
|
|
59
|
-
variables: [VariableInput!]!
|
|
60
|
-
mode: SetVariablesMode
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
"""
|
|
64
|
-
Defines how it handles original variables.
|
|
65
|
-
- MERGE merges with new values (default behaviour)
|
|
66
|
-
- SET replaces all variables
|
|
67
|
-
- APPEND_ONLY_MISSING appends values if not already exist
|
|
68
|
-
"""
|
|
69
|
-
enum SetVariablesMode {
|
|
70
|
-
MERGE
|
|
71
|
-
SET
|
|
72
|
-
APPEND_ONLY_MISSING
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
input VariableInput {
|
|
76
|
-
name: String!
|
|
77
|
-
value: String!
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
type SetVariablesResponse {
|
|
81
|
-
ok: Boolean!
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
type Variable {
|
|
85
|
-
name: String!
|
|
86
|
-
value: String!
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
`;
|
|
90
|
-
export {
|
|
91
|
-
schema
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=actions.graphql.js.map
|
|
@@ -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 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\t\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\t\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;"}
|
|
@@ -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,10 +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 migrationsGroup = new databaseMigrations.MigrationGroup(snapshot, {
|
|
7
|
-
"2023-03-10-145000-actions-variables": _20230310145000ActionsVariables
|
|
8
|
-
});
|
|
9
|
-
exports.migrationsGroup = migrationsGroup;
|
|
10
|
-
//# 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'\n\nexport const migrationsGroup = new MigrationGroup(snapshot, {\n\t'2023-03-10-145000-actions-variables': _20230310145000actionsvariables,\n})\n"],"names":["MigrationGroup","_20230310145000actionsvariables"],"mappings":";;;;;AAIa,MAAA,kBAAkB,IAAIA,mBAAA,eAAe,UAAU;AAAA,EAC3D,uCAAuCC;AACxC,CAAC;;"}
|
|
@@ -1,10 +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
|
-
const migrationsGroup = new MigrationGroup(snapshot, {
|
|
5
|
-
"2023-03-10-145000-actions-variables": _20230310145000actionsvariables
|
|
6
|
-
});
|
|
7
|
-
export {
|
|
8
|
-
migrationsGroup
|
|
9
|
-
};
|
|
10
|
-
//# 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'\n\nexport const migrationsGroup = new MigrationGroup(snapshot, {\n\t'2023-03-10-145000-actions-variables': _20230310145000actionsvariables,\n})\n"],"names":[],"mappings":";;;AAIa,MAAA,kBAAkB,IAAI,eAAe,UAAU;AAAA,EAC3D,uCAAuC;AACxC,CAAC;"}
|
|
@@ -1,48 +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
|
-
);
|
|
34
|
-
|
|
35
|
-
CREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');
|
|
36
|
-
|
|
37
|
-
CREATE TABLE actions_variable
|
|
38
|
-
(
|
|
39
|
-
id UUID PRIMARY KEY NOT NULL,
|
|
40
|
-
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
41
|
-
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
42
|
-
name TEXT NOT NULL UNIQUE,
|
|
43
|
-
value TEXT NOT NULL
|
|
44
|
-
)
|
|
45
|
-
`);
|
|
46
|
-
}
|
|
47
|
-
module.exports = snapshot;
|
|
48
|
-
//# 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);\n\n\t\tCREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');\n\t\t\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,EA0CX;AACF;;"}
|
|
@@ -1,49 +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
|
-
);
|
|
33
|
-
|
|
34
|
-
CREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');
|
|
35
|
-
|
|
36
|
-
CREATE TABLE actions_variable
|
|
37
|
-
(
|
|
38
|
-
id UUID PRIMARY KEY NOT NULL,
|
|
39
|
-
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
40
|
-
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
41
|
-
name TEXT NOT NULL UNIQUE,
|
|
42
|
-
value TEXT NOT NULL
|
|
43
|
-
)
|
|
44
|
-
`);
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
snapshot as default
|
|
48
|
-
};
|
|
49
|
-
//# 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);\n\n\t\tCREATE INDEX ON actions_event (priority DESC, visible_at) WHERE state IN ('created', 'retrying', 'processing');\n\t\t\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,EA0CX;AACF;"}
|