FEAT: NEW WORKFLOW ENGINE (#3160)
Co-authored-by: Joel <iamjoel007@gmail.com> Co-authored-by: Yeuoly <admin@srmxy.cn> Co-authored-by: JzoNg <jzongcode@gmail.com> Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: jyong <jyong@dify.ai> Co-authored-by: nite-knite <nkCoding@gmail.com> Co-authored-by: jyong <718720800@qq.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { get, post } from './base'
|
||||
import type { Collection, CustomCollectionBackend, CustomParamSchema, Tool, ToolCredential } from '@/app/components/tools/types'
|
||||
import type { ToolWithProvider } from '@/app/components/workflow/types'
|
||||
|
||||
export const fetchCollectionList = () => {
|
||||
return get<Collection[]>('/workspaces/current/tool-providers')
|
||||
@@ -21,6 +22,9 @@ export const fetchBuiltInToolCredentialSchema = (collectionName: string) => {
|
||||
return get<ToolCredential[]>(`/workspaces/current/tool-provider/builtin/${collectionName}/credentials_schema`)
|
||||
}
|
||||
|
||||
export const fetchBuiltInToolCredential = (collectionName: string) => {
|
||||
return get<ToolCredential[]>(`/workspaces/current/tool-provider/builtin/${collectionName}/credentials`)
|
||||
}
|
||||
export const updateBuiltInToolCredential = (collectionName: string, credential: Record<string, any>) => {
|
||||
return post(`/workspaces/current/tool-provider/builtin/${collectionName}/update`, {
|
||||
body: {
|
||||
@@ -86,3 +90,11 @@ export const testAPIAvailable = (payload: any) => {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const fetchAllBuiltInTools = () => {
|
||||
return get<ToolWithProvider[]>('/workspaces/current/tools/builtin')
|
||||
}
|
||||
|
||||
export const fetchAllCustomTools = () => {
|
||||
return get<ToolWithProvider[]>('/workspaces/current/tools/api')
|
||||
}
|
||||
|
Reference in New Issue
Block a user