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

Function useWorkflows

apps/sim/hooks/queries/workflows.ts:111–120  ·  view source on GitHub ↗
(workspaceId?: string, options?: { scope?: WorkflowQueryScope })

Source from the content-addressed store, hash-verified

109}
110
111export function useWorkflows(workspaceId?: string, options?: { scope?: WorkflowQueryScope }) {
112 const { scope = 'active' } = options || {}
113
114 return useQuery({
115 queryKey: workflowKeys.list(workspaceId, scope),
116 queryFn: workspaceId ? getWorkflowListQueryOptions(workspaceId, scope).queryFn : skipToken,
117 placeholderData: keepPreviousData,
118 staleTime: WORKFLOW_LIST_STALE_TIME,
119 })
120}
121
122const selectWorkflowMap = (data: WorkflowMetadata[]): Record<string, WorkflowMetadata> =>
123 Object.fromEntries(data.map((w) => [w.id, w]))

Callers 15

LogsFilterPanelFunction · 0.90
DashboardInnerFunction · 0.90
useMarkdownMentionsFunction · 0.90
SimResourceCellFunction · 0.90
useTableFunction · 0.90
HomeFunction · 0.90
EmbeddedWorkflowFunction · 0.90
EmbeddedFolderFunction · 0.90
useAvailableResourcesFunction · 0.90
useResourceNameLookupFunction · 0.90
WorkspaceResourceDisplayFunction · 0.90
RecentlyDeletedFunction · 0.90

Calls 1

Tested by

no test coverage detected