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

Function beforeUpdateWorkflowAction

libs/definitions/src/definition.ts:227–243  ·  view source on GitHub ↗

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

(
    update: Partial<WorkflowAction>,
    prevWorkflowAction: WorkflowAction,
    integrationAction: IntegrationAction,
    accountCredential: AccountCredential | null,
  )

Source from the content-addressed store, hash-verified

225 * Allows definitions to modify the workflow action entity before it is updated
226 */
227 async beforeUpdateWorkflowAction(
228 update: Partial<WorkflowAction>,
229 prevWorkflowAction: WorkflowAction,
230 integrationAction: IntegrationAction,
231 accountCredential: AccountCredential | null,
232 ): Promise<Partial<WorkflowAction>> {
233 const hookRes = await this._getOperationHookRes<Partial<WorkflowAction>>('beforeUpdate', integrationAction.key, [
234 update,
235 prevWorkflowAction,
236 integrationAction,
237 accountCredential,
238 ])
239 if (hookRes) {
240 return hookRes
241 }
242 return update
243 }
244
245 /**
246 * Called before a workflow action is deleted

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected