feat: handle from market install

This commit is contained in:
Joel
2024-10-29 16:33:27 +08:00
parent 0886d7bb8b
commit 0dcbb34cab
8 changed files with 65 additions and 23 deletions

View File

@ -7,6 +7,7 @@ import type {
EndpointsResponse,
InstallPackageResponse,
PluginDeclaration,
PluginManifestInMarket,
TaskStatusResponse,
UpdateEndpointRequest,
} from '@/app/components/plugins/types'
@ -80,7 +81,7 @@ export const fetchManifest = async (uniqueIdentifier: string) => {
}
export const fetchManifestFromMarketPlace = async (uniqueIdentifier: string) => {
return getMarketplace<{ data: { plugin: PluginDeclaration } }>(`/plugins/identifier?unique_identifier=${uniqueIdentifier}`)
return getMarketplace<{ data: { plugin: PluginManifestInMarket } }>(`/plugins/identifier?unique_identifier=${uniqueIdentifier}`)
}
export const installPackageFromMarketPlace = async (uniqueIdentifier: string) => {