wwf
2 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
1
2
3
4
5
6
7
8
9
10
11
12
import { useQuery } from '@tanstack/react-query'
import { get } from './base'
import type { WorkflowConfigResponse } from '@/types/workflow'
 
const NAME_SPACE = 'workflow'
 
export const useWorkflowConfig = (appId: string) => {
  return useQuery({
    queryKey: [NAME_SPACE, 'config', appId],
    queryFn: () => get<WorkflowConfigResponse>(`/apps/${appId}/workflows/draft/config`),
  })
}