Skip to main content
Glama

mcp-google-sheets

delete-action.ts1.76 kB
import { FlowAction, FlowActionType } from '../actions/action' import { FlowVersion } from '../flow-version' import { flowStructureUtil } from '../util/flow-structure-util' import { DeleteActionRequest } from './index' function _deleteAction( flowVersion: FlowVersion, request: DeleteActionRequest, ): FlowVersion { let clonedVersion: FlowVersion = flowVersion for (const name of request.names) { clonedVersion = flowStructureUtil.transferFlow(clonedVersion, (parentStep) => { if (parentStep.nextAction && parentStep.nextAction.name === name) { const stepToUpdate: FlowAction = parentStep.nextAction parentStep.nextAction = stepToUpdate.nextAction } switch (parentStep.type) { case FlowActionType.LOOP_ON_ITEMS: { if ( parentStep.firstLoopAction && parentStep.firstLoopAction.name === name ) { const stepToUpdate: FlowAction = parentStep.firstLoopAction parentStep.firstLoopAction = stepToUpdate.nextAction } break } case FlowActionType.ROUTER: { parentStep.children = parentStep.children.map((child) => { if (child && child.name === name) { return child.nextAction ?? null } return child }) break } default: break } return parentStep }) } return clonedVersion } export { _deleteAction }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server