diff --git a/packages/builder/src/index.d.ts b/packages/builder/src/index.d.ts deleted file mode 100644 index 1cbad4f12c..0000000000 --- a/packages/builder/src/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare module "api" { - const API: { - getPlugins: () => Promise - createPlugin: (plugin: object) => Promise - uploadPlugin: (plugin: FormData) => Promise - deletePlugin: (id: string) => Promise - } -} diff --git a/packages/builder/src/stores/portal/plugins.ts b/packages/builder/src/stores/portal/plugins.ts index 15110a852b..5b1e04c2ff 100644 --- a/packages/builder/src/stores/portal/plugins.ts +++ b/packages/builder/src/stores/portal/plugins.ts @@ -1,17 +1,13 @@ import { writable } from "svelte/store" import { PluginSource } from "constants/index" - +import { Plugin } from "@budibase/types" import { API } from "api" -interface Plugin { - _id: string -} - export function createPluginsStore() { const { subscribe, set, update } = writable([]) async function load() { - const plugins = await API.getPlugins() + const plugins = (await API.getPlugins()) as Plugin[] set(plugins) }