@ysgroup/core 0.1.7 → 0.1.9
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 +1 -1
- package/src/rest.ts +6 -4
package/package.json
CHANGED
package/src/rest.ts
CHANGED
|
@@ -213,9 +213,10 @@ export class YsRest {
|
|
|
213
213
|
getUserApps(id: string) {
|
|
214
214
|
return this.request<{ app_id: string; admin: boolean }[]>("GET", `/api/users/${id}/apps`);
|
|
215
215
|
}
|
|
216
|
-
setUserApps(id: string, grants: { app_id: string; admin: boolean }[]) {
|
|
216
|
+
setUserApps(id: string, grants: { app_id: string; admin: boolean }[], reason = "") {
|
|
217
217
|
return this.request<{ grants: { app_id: string; admin: boolean }[] }>("PUT", `/api/users/${id}/apps`, {
|
|
218
218
|
grants,
|
|
219
|
+
reason,
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
222
|
uploadOpenAccountConfirmation(ownerId: string, file: File) {
|
|
@@ -237,8 +238,8 @@ export class YsRest {
|
|
|
237
238
|
getRelations(entity: "owners" | "accounts", id: string, relation: "apps" | "strategies") {
|
|
238
239
|
return this.request<{ ids: string[] }>("GET", `/api/${entity}/${id}/relations/${relation}`);
|
|
239
240
|
}
|
|
240
|
-
setRelations(entity: "owners" | "accounts", id: string, relation: "apps" | "strategies", ids: string[]) {
|
|
241
|
-
return this.request<{ ids: string[] }>("PUT", `/api/${entity}/${id}/relations/${relation}`, { ids });
|
|
241
|
+
setRelations(entity: "owners" | "accounts", id: string, relation: "apps" | "strategies", ids: string[], reason = "") {
|
|
242
|
+
return this.request<{ ids: string[] }>("PUT", `/api/${entity}/${id}/relations/${relation}`, { ids, reason });
|
|
242
243
|
}
|
|
243
244
|
listOwnerFiles(ownerId: string) {
|
|
244
245
|
return this.request<Record<string, unknown>[]>("GET", `/api/owners/${ownerId}/files`);
|
|
@@ -300,6 +301,7 @@ export interface TopologyNode {
|
|
|
300
301
|
logo_url?: string;
|
|
301
302
|
online: boolean;
|
|
302
303
|
last_heartbeat_at: number;
|
|
303
|
-
|
|
304
|
+
authorization_version: number;
|
|
305
|
+
authorized_tables: string[];
|
|
304
306
|
heartbeat?: Record<string, unknown>;
|
|
305
307
|
}
|