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

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/api/plugins.js +23 -1
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "1.3.15-alpha.0",
3
+ "version": "1.3.15-alpha.3",
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.15-alpha.0",
9
+ "@budibase/bbui": "1.3.15-alpha.3",
10
10
  "lodash": "^4.17.21",
11
11
  "svelte": "^3.46.2"
12
12
  },
13
- "gitHead": "38f3c6d1d713f5e1bd18fdd81bdffb9bf7d4f9d3"
13
+ "gitHead": "a1eafcef980f6ed36933a6d2953e35b0de82be51"
14
14
  }
@@ -5,12 +5,22 @@ export const buildPluginEndpoints = API => ({
5
5
  */
6
6
  uploadPlugin: async data => {
7
7
  return await API.post({
8
- url: "/api/plugin/upload",
8
+ url: `/api/plugin/upload`,
9
9
  body: data,
10
10
  json: false,
11
11
  })
12
12
  },
13
13
 
14
+ /**
15
+ * Creates a plugin from URL, Github or NPM
16
+ */
17
+ createPlugin: async data => {
18
+ return await API.post({
19
+ url: `/api/plugin`,
20
+ body: data,
21
+ })
22
+ },
23
+
14
24
  /**
15
25
  * Gets a list of all plugins
16
26
  */
@@ -19,4 +29,16 @@ export const buildPluginEndpoints = API => ({
19
29
  url: "/api/plugin",
20
30
  })
21
31
  },
32
+
33
+ /**
34
+ * Deletes a plugin.
35
+ * @param pluginId the ID of the plugin to delete
36
+ *
37
+ * * @param pluginId the revision of the plugin to delete
38
+ */
39
+ deletePlugin: async pluginId => {
40
+ return await API.delete({
41
+ url: `/api/plugin/${pluginId}`,
42
+ })
43
+ },
22
44
  })