Update plugin endpoints
This commit is contained in:
parent
7806eebc20
commit
8992a1d902
|
@ -1,15 +1,18 @@
|
||||||
import {
|
import {
|
||||||
CreatePluginRequest,
|
CreatePluginRequest,
|
||||||
CreatePluginResponse,
|
CreatePluginResponse,
|
||||||
Plugin,
|
DeletePluginResponse,
|
||||||
|
FetchPluginResponse,
|
||||||
|
UploadPluginRequest,
|
||||||
|
UploadPluginResponse,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { BaseAPIClient } from "./types"
|
import { BaseAPIClient } from "./types"
|
||||||
|
|
||||||
export interface PluginEndpoins {
|
export interface PluginEndpoins {
|
||||||
uploadPlugin: (data: any) => Promise<{ message: string; plugins: any[] }>
|
uploadPlugin: (data: UploadPluginRequest) => Promise<UploadPluginResponse>
|
||||||
createPlugin: (data: CreatePluginRequest) => Promise<CreatePluginResponse>
|
createPlugin: (data: CreatePluginRequest) => Promise<CreatePluginResponse>
|
||||||
getPlugins: () => Promise<Plugin[]>
|
getPlugins: () => Promise<FetchPluginResponse>
|
||||||
deletePlugin: (pluginId: string) => Promise<{ message: string }>
|
deletePlugin: (pluginId: string) => Promise<DeletePluginResponse>
|
||||||
}
|
}
|
||||||
|
|
||||||
export const buildPluginEndpoints = (API: BaseAPIClient): PluginEndpoins => ({
|
export const buildPluginEndpoints = (API: BaseAPIClient): PluginEndpoins => ({
|
||||||
|
|
Loading…
Reference in New Issue