6071 return only updated fields of records in zapier update trigger (#8193)
- move webhook triggers into `entity-events-to-db.listener.ts` - refactor event management - add a `@OnDatabaseEvent` decorator to manage database events - add updatedFields in updated events - update openApi webhooks docs - update zapier integration
This commit is contained in:
@ -16,6 +16,7 @@ import {
|
||||
WorkflowVersionWorkspaceEntity,
|
||||
} from 'src/modules/workflow/common/standard-objects/workflow-version.workspace-entity';
|
||||
import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow.workspace-entity';
|
||||
import { DatabaseEventAction } from 'src/engine/api/graphql/graphql-query-runner/enums/database-event-action';
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `workflow.createMany`,
|
||||
@ -62,7 +63,7 @@ export class WorkflowCreateManyPostQueryHook
|
||||
});
|
||||
|
||||
this.workspaceEventEmitter.emit(
|
||||
`workflowVersion.created`,
|
||||
`workflowVersion.${DatabaseEventAction.CREATED}`,
|
||||
workflowVersionsToCreate.map((workflowVersionToCreate) => {
|
||||
return {
|
||||
userId: authContext.user?.id,
|
||||
|
||||
@ -16,6 +16,7 @@ import {
|
||||
WorkflowVersionWorkspaceEntity,
|
||||
} from 'src/modules/workflow/common/standard-objects/workflow-version.workspace-entity';
|
||||
import { WorkflowWorkspaceEntity } from 'src/modules/workflow/common/standard-objects/workflow.workspace-entity';
|
||||
import { DatabaseEventAction } from 'src/engine/api/graphql/graphql-query-runner/enums/database-event-action';
|
||||
|
||||
@WorkspaceQueryHook({
|
||||
key: `workflow.createOne`,
|
||||
@ -58,7 +59,7 @@ export class WorkflowCreateOnePostQueryHook
|
||||
});
|
||||
|
||||
this.workspaceEventEmitter.emit(
|
||||
`workflowVersion.created`,
|
||||
`workflowVersion.${DatabaseEventAction.CREATED}`,
|
||||
[
|
||||
{
|
||||
userId: authContext.user?.id,
|
||||
|
||||
Reference in New Issue
Block a user