MCPcopy Index your code
hub / github.com/simstudioai/sim / fetchFolders

Function fetchFolders

apps/sim/hooks/queries/folders.ts:53–63  ·  view source on GitHub ↗
(
  workspaceId: string,
  scope: FolderQueryScope = 'active',
  signal?: AbortSignal
)

Source from the content-addressed store, hash-verified

51}
52
53async function fetchFolders(
54 workspaceId: string,
55 scope: FolderQueryScope = 'active',
56 signal?: AbortSignal
57): Promise<WorkflowFolder[]> {
58 const { folders } = await requestJson(listFoldersContract, {
59 query: { workspaceId, scope },
60 signal,
61 })
62 return folders.map(mapFolder)
63}
64
65export function useFolders(workspaceId?: string, options?: { scope?: FolderQueryScope }) {
66 const scope = options?.scope ?? 'active'

Callers 2

useFoldersFunction · 0.85
useFolderMapFunction · 0.85

Calls 1

requestJsonFunction · 0.90

Tested by

no test coverage detected