MCPcopy
hub / github.com/simstudioai/sim / getWorkflowBlockParentId

Function getWorkflowBlockParentId

packages/workflow-types/src/workflow.ts:91–97  ·  view source on GitHub ↗
(block?: WorkflowLockBlock)

Source from the content-addressed store, hash-verified

89 * Reads a workflow block's parent ID from runtime block data.
90 */
91export function getWorkflowBlockParentId(block?: WorkflowLockBlock): string | undefined {
92 const data = block?.data
93 if (typeof data !== 'object' || data === null || !('parentId' in data)) return undefined
94
95 const parentId = (data as Record<string, unknown>).parentId
96 return typeof parentId === 'string' && parentId.length > 0 ? parentId : undefined
97}
98
99/**
100 * Checks whether any parent container in a block's ancestry is locked.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected