@budibase/frontend-core 1.3.14 → 1.3.15-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "1.3.14",
3
+ "version": "1.3.15-alpha.0",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
7
7
  "svelte": "src/index.js",
8
8
  "dependencies": {
9
- "@budibase/bbui": "^1.3.14",
9
+ "@budibase/bbui": "1.3.15-alpha.0",
10
10
  "lodash": "^4.17.21",
11
11
  "svelte": "^3.46.2"
12
12
  },
13
- "gitHead": "a38626cf662d66aa8c04fb1d42dc7bc353ce7c31"
13
+ "gitHead": "38f3c6d1d713f5e1bd18fdd81bdffb9bf7d4f9d3"
14
14
  }
package/src/api/index.js CHANGED
@@ -24,6 +24,7 @@ import { buildSelfEndpoints } from "./self"
24
24
  import { buildViewEndpoints } from "./views"
25
25
  import { buildLicensingEndpoints } from "./licensing"
26
26
  import { buildGroupsEndpoints } from "./groups"
27
+ import { buildPluginEndpoints } from "./plugins"
27
28
 
28
29
  const defaultAPIClientConfig = {
29
30
  /**
@@ -243,5 +244,6 @@ export const createAPIClient = config => {
243
244
  ...buildSelfEndpoints(API),
244
245
  ...buildLicensingEndpoints(API),
245
246
  ...buildGroupsEndpoints(API),
247
+ ...buildPluginEndpoints(API),
246
248
  }
247
249
  }
@@ -0,0 +1,22 @@
1
+ export const buildPluginEndpoints = API => ({
2
+ /**
3
+ * Uploads a plugin tarball bundle
4
+ * @param data the plugin tarball bundle to upload
5
+ */
6
+ uploadPlugin: async data => {
7
+ return await API.post({
8
+ url: "/api/plugin/upload",
9
+ body: data,
10
+ json: false,
11
+ })
12
+ },
13
+
14
+ /**
15
+ * Gets a list of all plugins
16
+ */
17
+ getPlugins: async () => {
18
+ return await API.get({
19
+ url: "/api/plugin",
20
+ })
21
+ },
22
+ })