@ysgroup/core 0.1.4 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/rest.ts +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ysgroup/core",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/rest.ts CHANGED
@@ -211,11 +211,11 @@ export class YsRest {
211
211
  return this.request("DELETE", `/api/users/${id}`);
212
212
  }
213
213
  getUserApps(id: string) {
214
- return this.request<string[]>("GET", `/api/users/${id}/apps`);
214
+ return this.request<{ app_id: string; admin: boolean }[]>("GET", `/api/users/${id}/apps`);
215
215
  }
216
- setUserApps(id: string, appIds: string[]) {
217
- return this.request<{ app_ids: string[] }>("PUT", `/api/users/${id}/apps`, {
218
- app_ids: appIds,
216
+ setUserApps(id: string, grants: { app_id: string; admin: boolean }[]) {
217
+ return this.request<{ grants: { app_id: string; admin: boolean }[] }>("PUT", `/api/users/${id}/apps`, {
218
+ grants,
219
219
  });
220
220
  }
221
221
  uploadOpenAccountConfirmation(ownerId: string, file: File) {