mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
feat: add get marketpalce get
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import type { Fetcher } from 'swr'
|
||||
import { del, get, post, upload } from './base'
|
||||
import { del, get, getMarketplace, post, upload } from './base'
|
||||
import type {
|
||||
CreateEndpointRequest,
|
||||
EndpointOperationResponse,
|
||||
@ -79,6 +79,10 @@ export const fetchManifest = async (uniqueIdentifier: string) => {
|
||||
return get<PluginDeclaration>(`/workspaces/current/plugin/fetch-manifest?plugin_unique_identifier=${uniqueIdentifier}`)
|
||||
}
|
||||
|
||||
export const fetchManifestFromMarketPlace = async (uniqueIdentifier: string) => {
|
||||
return getMarketplace<PluginDeclaration>(`/plugins/identifier?unique_identifier=${uniqueIdentifier}`)
|
||||
}
|
||||
|
||||
export const installPackageFromMarketPlace = async (uniqueIdentifier: string) => {
|
||||
return post<InstallPackageResponse>('/workspaces/current/plugin/install/marketplace', {
|
||||
body: { plugin_unique_identifiers: [uniqueIdentifier] },
|
||||
|
||||
Reference in New Issue
Block a user