From 0cbf0a7a4b36bd36f97d591285871233de8c3681 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 12 Dec 2024 14:51:52 +0000 Subject: [PATCH] Update builder plugin store with new types --- packages/builder/src/index.d.ts | 8 -------- packages/builder/src/stores/portal/plugins.ts | 8 ++------ 2 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 packages/builder/src/index.d.ts 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) }