chore: install from marketplace

This commit is contained in:
Joel
2024-11-08 18:25:15 +08:00
parent 33349191e9
commit c77b38b97d
3 changed files with 11 additions and 7 deletions

View File

@ -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'],