@budibase/frontend-core 3.13.18 → 3.13.19

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 +2 -2
  2. package/src/api/groups.ts +21 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "3.13.18",
3
+ "version": "3.13.19",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -17,5 +17,5 @@
17
17
  "shortid": "2.2.15",
18
18
  "socket.io-client": "^4.7.5"
19
19
  },
20
- "gitHead": "6d3c3c8002c3ba2682b5bfb2299b4457195fda82"
20
+ "gitHead": "1351e3b14590f6b0070103c1de1c8aa229fc5450"
21
21
  }
package/src/api/groups.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import {
2
+ BulkAddUsersToGroupRequest,
3
+ BulkAddUsersToGroupResponse,
2
4
  SearchGroupResponse,
3
5
  SearchUserGroupResponse,
4
6
  UserGroup,
@@ -19,6 +21,10 @@ export interface GroupEndpoints {
19
21
  removeAppsFromGroup: (groupId: string, appArray: object[]) => Promise<void>
20
22
  addGroupAppBuilder: (groupId: string, appId: string) => Promise<void>
21
23
  removeGroupAppBuilder: (groupId: string, appId: string) => Promise<void>
24
+ bulkAddUsersFromCsv: (
25
+ groupId: string,
26
+ csvContent: string
27
+ ) => Promise<BulkAddUsersToGroupResponse>
22
28
  }
23
29
 
24
30
  enum GroupResource {
@@ -187,5 +193,20 @@ export const buildGroupsEndpoints = (API: BaseAPIClient): GroupEndpoints => {
187
193
  url: `/api/global/groups/${groupId}/app/${appId}/builder`,
188
194
  })
189
195
  },
196
+
197
+ /**
198
+ * Bulk add users to group from CSV content
199
+ * @param groupId The group to update
200
+ * @param csvContent The CSV content with email addresses
201
+ */
202
+ bulkAddUsersFromCsv: async (groupId, csvContent) => {
203
+ return await API.post<
204
+ BulkAddUsersToGroupRequest,
205
+ BulkAddUsersToGroupResponse
206
+ >({
207
+ url: `/api/global/groups/${groupId}/users/bulk`,
208
+ body: { csvContent },
209
+ })
210
+ },
190
211
  }
191
212
  }