Skip to main content

getDependencies

plugin.threadsApi.getDependencies(threadId: string): Promise<Thread[]>

Retrieves all threads that the specified thread depends on.

Returns threads that are prerequisites or dependencies of the given thread. This is useful for understanding execution order requirements and managing complex thread relationships.

Parameters​

ParameterTypeRequiredDescription
threadIdstringYesThe unique identifier of the thread

Returns​

Promise<Thread[]> — A promise that resolves to an array of dependent Thread objects

Example​

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.threadsApi.getDependencies('threadId');
console.log(result);