Update plugin endpoints

This commit is contained in:
Andrew Kingston 2024-12-05 15:40:33 +00:00
parent 7806eebc20
commit 8992a1d902
No known key found for this signature in database
1 changed files with 7 additions and 4 deletions

View File

@ -1,15 +1,18 @@
import {
CreatePluginRequest,
CreatePluginResponse,
Plugin,
DeletePluginResponse,
FetchPluginResponse,
UploadPluginRequest,
UploadPluginResponse,
} from "@budibase/types"
import { BaseAPIClient } from "./types"
export interface PluginEndpoins {
uploadPlugin: (data: any) => Promise<{ message: string; plugins: any[] }>
uploadPlugin: (data: UploadPluginRequest) => Promise<UploadPluginResponse>
createPlugin: (data: CreatePluginRequest) => Promise<CreatePluginResponse>
getPlugins: () => Promise<Plugin[]>
deletePlugin: (pluginId: string) => Promise<{ message: string }>
getPlugins: () => Promise<FetchPluginResponse>
deletePlugin: (pluginId: string) => Promise<DeletePluginResponse>
}
export const buildPluginEndpoints = (API: BaseAPIClient): PluginEndpoins => ({