index.ts 733 B

12345678910111213141516171819202122232425
  1. import request from '@/config/axios'
  2. export const getWorkflowPage = async (params) => {
  3. return await request.get({ url: '/ai/workflow/page', params })
  4. }
  5. export const getWorkflow = async (id) => {
  6. return await request.get({ url: '/ai/workflow/get?id=' + id })
  7. }
  8. export const createWorkflow = async (data) => {
  9. return await request.post({ url: '/ai/workflow/create', data })
  10. }
  11. export const updateWorkflow = async (data) => {
  12. return await request.put({ url: '/ai/workflow/update', data })
  13. }
  14. export const deleteWorkflow = async (id) => {
  15. return await request.delete({ url: '/ai/workflow/delete?id=' + id })
  16. }
  17. export const testWorkflow = async (data) => {
  18. return await request.post({ url: '/ai/workflow/test', data })
  19. }