mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-27 03:00:28 +03:00
56f9208d7c
* add export all function * modify exportAll to reuse existing code from other services * modify routes of export-import * add exportAll function into UI * add errorhandler * add importAll Function into UI for ChatFlow * modify importAll Function to import tools * remove appServer variable * modify exportAll to exportData for new requirement in backend * chore modify type camelCase to PascalCase in exportImportService * add import export for variables, assistants, and checkboxes for UI --------- Co-authored-by: Henry <hzj94@hotmail.com>
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
import client from './client'
|
|
|
|
const getAllChatflows = () => client.get('/chatflows?type=CHATFLOW')
|
|
|
|
const getAllAgentflows = () => client.get('/chatflows?type=MULTIAGENT')
|
|
|
|
const getSpecificChatflow = (id) => client.get(`/chatflows/${id}`)
|
|
|
|
const getSpecificChatflowFromPublicEndpoint = (id) => client.get(`/public-chatflows/${id}`)
|
|
|
|
const createNewChatflow = (body) => client.post(`/chatflows`, body)
|
|
|
|
const importChatflows = (body) => client.post(`/chatflows/importchatflows`, body)
|
|
|
|
const updateChatflow = (id, body) => client.put(`/chatflows/${id}`, body)
|
|
|
|
const deleteChatflow = (id) => client.delete(`/chatflows/${id}`)
|
|
|
|
const getIsChatflowStreaming = (id) => client.get(`/chatflows-streaming/${id}`)
|
|
|
|
const getAllowChatflowUploads = (id) => client.get(`/chatflows-uploads/${id}`)
|
|
|
|
export default {
|
|
getAllChatflows,
|
|
getAllAgentflows,
|
|
getSpecificChatflow,
|
|
getSpecificChatflowFromPublicEndpoint,
|
|
createNewChatflow,
|
|
importChatflows,
|
|
updateChatflow,
|
|
deleteChatflow,
|
|
getIsChatflowStreaming,
|
|
getAllowChatflowUploads
|
|
}
|