mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
chore: install from marketplace
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import type {
|
||||
DebugInfo as DebugInfoTypes,
|
||||
InstallPackageResponse,
|
||||
InstalledPluginListResponse,
|
||||
Permissions,
|
||||
PluginsFromMarketplaceResponse,
|
||||
@ -34,6 +35,14 @@ export const useInvalidateInstalledPluginList = () => {
|
||||
}
|
||||
}
|
||||
|
||||
export const useInstallPackageFromMarketPlace = () => {
|
||||
return useMutation({
|
||||
mutationFn: (uniqueIdentifier: string) => {
|
||||
return post<InstallPackageResponse>('/workspaces/current/plugin/install/marketplace', { body: { plugin_unique_identifiers: [uniqueIdentifier] } })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export const useDebugKey = () => {
|
||||
return useQuery({
|
||||
queryKey: [NAME_SPACE, 'debugKey'],
|
||||
|
||||
Reference in New Issue
Block a user