@budibase/frontend-core 1.2.41-alpha.2 → 1.2.41-alpha.5
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 +3 -3
- package/src/api/attachments.js +27 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "1.2.41-alpha.
|
|
3
|
+
"version": "1.2.41-alpha.5",
|
|
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.
|
|
9
|
+
"@budibase/bbui": "1.2.41-alpha.5",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"svelte": "^3.46.2"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "db4c6afc17309bc429d5eea8efb4fe896d6cd63b"
|
|
14
14
|
}
|
package/src/api/attachments.js
CHANGED
|
@@ -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
|
}
|