@budibase/frontend-core 1.2.41-alpha.1 → 1.2.41-alpha.4

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.2.41-alpha.1",
3
+ "version": "1.2.41-alpha.4",
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.2.41-alpha.1",
9
+ "@budibase/bbui": "1.2.41-alpha.4",
10
10
  "lodash": "^4.17.21",
11
11
  "svelte": "^3.46.2"
12
12
  },
13
- "gitHead": "cee7bb82a19d2bff742e53205add7b57e5e28c08"
13
+ "gitHead": "1d79a9f3506ed748ab167afe925a85065d845437"
14
14
  }
@@ -61,5 +61,32 @@ export const buildAttachmentEndpoints = API => {
61
61
  })
62
62
  return { publicUrl }
63
63
  },
64
+
65
+ /**
66
+ * Deletes attachments from the bucket.
67
+ * @param keys the attachments to delete
68
+ * @param tableId the associated table ID
69
+ */
70
+ deleteAttachments: async ({ keys, tableId }) => {
71
+ return await API.post({
72
+ url: `/api/attachments/${tableId}/delete`,
73
+ body: {
74
+ keys,
75
+ },
76
+ })
77
+ },
78
+
79
+ /**
80
+ * Deletes attachments from the builder bucket.
81
+ * @param keys the attachments to delete
82
+ */
83
+ deleteBuilderAttachments: async keys => {
84
+ return await API.post({
85
+ url: `/api/attachments/delete`,
86
+ body: {
87
+ keys,
88
+ },
89
+ })
90
+ },
64
91
  }
65
92
  }