MCPcopy Create free account
hub / github.com/chainjet/platform / beforeUpdateWorkflowTrigger

Function beforeUpdateWorkflowTrigger

libs/definitions/src/definition.ts:172–188  ·  view source on GitHub ↗

* Allows definitions to modify the workflow trigger entity before it is updated

(
    update: Partial<WorkflowTrigger>,
    prevWorkflowTrigger: WorkflowTrigger,
    integrationTrigger: IntegrationTrigger,
    accountCredential: AccountCredential | null,
  )

Source from the content-addressed store, hash-verified

170 * Allows definitions to modify the workflow trigger entity before it is updated
171 */
172 async beforeUpdateWorkflowTrigger(
173 update: Partial<WorkflowTrigger>,
174 prevWorkflowTrigger: WorkflowTrigger,
175 integrationTrigger: IntegrationTrigger,
176 accountCredential: AccountCredential | null,
177 ): Promise<Partial<WorkflowTrigger>> {
178 const hookRes = await this._getOperationHookRes<Partial<WorkflowTrigger>>('beforeUpdate', integrationTrigger.key, [
179 update,
180 prevWorkflowTrigger,
181 integrationTrigger,
182 accountCredential,
183 ])
184 if (hookRes) {
185 return hookRes
186 }
187 return update
188 }
189
190 /**
191 * Called before a workflow trigger is deleted

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected