@vizzly/api-client 0.0.11 → 0.0.12
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/dist/models/Authentication.js +0 -4
- package/dist/models/DashboardManager.js +3 -6
- package/dist/models/DashboardRepository.d.ts +3 -2
- package/dist/models/DashboardRepository.js +43 -26
- package/dist/models/GlobalLibraryRepository.d.ts +3 -2
- package/dist/models/GlobalLibraryRepository.js +11 -19
- package/dist/models/Permission.d.ts +2 -7
- package/dist/models/VizzlyApi.d.ts +5 -1
- package/dist/models/VizzlyApi.js +5 -0
- package/dist/models/VizzlyQueryEngineApi.d.ts +13 -1
- package/dist/models/VizzlyQueryEngineApi.js +26 -1
- package/dist/types.d.ts +12 -0
- package/package.json +1 -1
|
@@ -42,7 +42,6 @@ class Authentication {
|
|
|
42
42
|
}
|
|
43
43
|
buildAuthHeaders() {
|
|
44
44
|
if (this.authParams.dashboardAccessToken) {
|
|
45
|
-
console.debug('Using dashboard access token');
|
|
46
45
|
return {
|
|
47
46
|
auth: `Bearer ${this.authParams.dashboardAccessToken}`,
|
|
48
47
|
};
|
|
@@ -51,19 +50,16 @@ class Authentication {
|
|
|
51
50
|
// of fetching one. This is most likely used on the managed query-engine where we
|
|
52
51
|
// pass the project access token through in a request header.
|
|
53
52
|
if (this.authParams.projectAccessToken) {
|
|
54
|
-
console.debug('Using project access token for auth header');
|
|
55
53
|
return {
|
|
56
54
|
auth: `Bearer ${this.authParams.projectAccessToken}`,
|
|
57
55
|
};
|
|
58
56
|
}
|
|
59
57
|
if (this.authParams.projectApiKey) {
|
|
60
|
-
console.debug('Using API Key for auth header');
|
|
61
58
|
return {
|
|
62
59
|
auth: `Api-Key ${this.authParams.projectApiKey}`,
|
|
63
60
|
};
|
|
64
61
|
}
|
|
65
62
|
if (this.authParams.appSessionToken) {
|
|
66
|
-
console.debug('Using app session access token');
|
|
67
63
|
return {
|
|
68
64
|
auth: `Bearer ${this.authParams.appSessionToken}`,
|
|
69
65
|
};
|
|
@@ -27,10 +27,7 @@ class DashboardManager {
|
|
|
27
27
|
var _a, _b, _c;
|
|
28
28
|
const dashboardRepository = this.vizzly.getDashboardRepository();
|
|
29
29
|
const globalLibraryRepository = this.vizzly.getGlobalLibraryRepository();
|
|
30
|
-
const { permissions: dashboardPermissions } = yield dashboardRepository.
|
|
31
|
-
const { permissions: globalLibraryPermissions } = yield globalLibraryRepository.fetchGlobalLibraryAccessTokens();
|
|
32
|
-
const { found: globalLibraries } = yield globalLibraryRepository.fetchGlobalLibraries();
|
|
33
|
-
const { found: dashboards } = yield dashboardRepository.fetchDashboards();
|
|
30
|
+
const [{ global_libraries: globalLibraries, permissions: globalLibraryPermissions }, { dashboards, permissions: dashboardPermissions },] = yield Promise.all([globalLibraryRepository.fetchGlobalLibraries(), dashboardRepository.fetchDashboards()]);
|
|
34
31
|
const dashboardToUpdate = dashboards.find((dashboard) => dashboard.id === params.dashboardId);
|
|
35
32
|
if (!dashboardToUpdate)
|
|
36
33
|
throw new Error('Cannot find dashboard to update.');
|
|
@@ -97,8 +94,8 @@ class DashboardManager {
|
|
|
97
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
95
|
const dashboardRepo = this.vizzly.getDashboardRepository();
|
|
99
96
|
const libraryRepo = this.vizzly.getGlobalLibraryRepository();
|
|
100
|
-
const {
|
|
101
|
-
const {
|
|
97
|
+
const { dashboards } = yield dashboardRepo.fetchDashboards();
|
|
98
|
+
const { global_libraries: globalLibraries } = yield libraryRepo.fetchGlobalLibraries();
|
|
102
99
|
return DashboardManager.mergeDashboardsAndGlobalLibraries(dashboards, globalLibraries);
|
|
103
100
|
});
|
|
104
101
|
}
|
|
@@ -9,13 +9,14 @@ export declare class DashboardRepository {
|
|
|
9
9
|
}>;
|
|
10
10
|
updateDashboard(params: UpdateDashboardParams): Promise<Dashboard>;
|
|
11
11
|
fetchDashboards(): Promise<{
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
dashboards: Dashboard[];
|
|
13
|
+
permissions: DashboardPermission[];
|
|
14
14
|
}>;
|
|
15
15
|
static embellishDashboardFromAPI(dashboard: DashboardFromAPI, permissions: DashboardPermission[]): Dashboard;
|
|
16
16
|
static takeHighestPermission(dashboardId: string, permissions: DashboardPermission[]): DashboardPermission;
|
|
17
17
|
static takePermissionsOfScope(dashboardId: string, permissions: DashboardPermission[], scope: 'read' | 'read_write'): DashboardPermission[];
|
|
18
18
|
fetchDashboardAccessTokens(): Promise<{
|
|
19
|
+
dashboards: Dashboard[];
|
|
19
20
|
permissions: DashboardPermission[];
|
|
20
21
|
}>;
|
|
21
22
|
}
|
|
@@ -14,7 +14,6 @@ const DashboardQuotaReached_1 = require("../errors/DashboardQuotaReached");
|
|
|
14
14
|
const FailedToCreateDashboard_1 = require("../errors/FailedToCreateDashboard");
|
|
15
15
|
const FailedToDecryptDashboardBeforeClient_1 = require("../errors/FailedToDecryptDashboardBeforeClient");
|
|
16
16
|
const FailedToFetchDashboardAccessTokens_1 = require("../errors/FailedToFetchDashboardAccessTokens");
|
|
17
|
-
const FailedToFetchDashboards_1 = require("../errors/FailedToFetchDashboards");
|
|
18
17
|
const FailedToUpdateDashboard_1 = require("../errors/FailedToUpdateDashboard");
|
|
19
18
|
const Permission_1 = require("./Permission");
|
|
20
19
|
class DashboardRepository {
|
|
@@ -69,28 +68,33 @@ class DashboardRepository {
|
|
|
69
68
|
}
|
|
70
69
|
fetchDashboards() {
|
|
71
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
|
|
73
|
-
let dashboardResponse
|
|
74
|
-
if (this.vizzly.implementationStrategy.shouldPersistViaQueryEngine()) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
71
|
+
return yield this.fetchDashboardAccessTokens();
|
|
72
|
+
// let dashboardResponse: Response<FetchDashboardsResponseBody>;
|
|
73
|
+
// if (this.vizzly.implementationStrategy.shouldPersistViaQueryEngine()) {
|
|
74
|
+
// const vizzlyQueryEngineApi = this.vizzly.getVizzlyQueryEngineAPI();
|
|
75
|
+
// dashboardResponse = await vizzlyQueryEngineApi.execute<FetchDashboardsResponseBody>(
|
|
76
|
+
// vizzlyQueryEngineApi.buildFetchDashboardsRequest(permissions.map((p) => p.token))
|
|
77
|
+
// );
|
|
78
|
+
// } else {
|
|
79
|
+
// const vizzlyApi = this.vizzly.getVizzlyAPI();
|
|
80
|
+
// dashboardResponse = await vizzlyApi.execute<{ found: Dashboard[]; not_found: any[] }>(
|
|
81
|
+
// vizzlyApi.buildFetchDashboardsRequest(permissions.map((p) => p.token))
|
|
82
|
+
// );
|
|
83
|
+
// }
|
|
84
|
+
// if (dashboardResponse.status === 200) {
|
|
85
|
+
// dashboardResponse.body.found.forEach((dashboard) => {
|
|
86
|
+
// if (typeof dashboard.definition === 'string') {
|
|
87
|
+
// throw new FailedToDecryptDashboardBeforeClient();
|
|
88
|
+
// }
|
|
89
|
+
// });
|
|
90
|
+
// return {
|
|
91
|
+
// found: dashboardResponse.body.found.map((foundDashboard) =>
|
|
92
|
+
// DashboardRepository.embellishDashboardFromAPI(foundDashboard, permissions)
|
|
93
|
+
// ),
|
|
94
|
+
// not_found: dashboardResponse.body.not_found,
|
|
95
|
+
// };
|
|
96
|
+
// }
|
|
97
|
+
// throw new FailedToFetchDashboards(`Failed to fetch dashboards. Got status code ${dashboardResponse.status}.`);
|
|
94
98
|
});
|
|
95
99
|
}
|
|
96
100
|
static embellishDashboardFromAPI(dashboard, permissions) {
|
|
@@ -106,11 +110,24 @@ class DashboardRepository {
|
|
|
106
110
|
}
|
|
107
111
|
fetchDashboardAccessTokens() {
|
|
108
112
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
let accessTokens;
|
|
114
|
+
if (this.vizzly.implementationStrategy.shouldPersistViaQueryEngine()) {
|
|
115
|
+
const vizzlyQueryEngineApi = this.vizzly.getVizzlyQueryEngineAPI();
|
|
116
|
+
accessTokens = yield vizzlyQueryEngineApi.execute(vizzlyQueryEngineApi.buildFetchDashboardAccessTokensRequest());
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
const vizzlyApi = this.vizzly.getVizzlyAPI();
|
|
120
|
+
accessTokens = yield vizzlyApi.execute(vizzlyApi.buildFetchDashboardAccessTokensRequest());
|
|
121
|
+
}
|
|
111
122
|
if (accessTokens.status === 200) {
|
|
123
|
+
const formattedPermissions = accessTokens.body.permissions.map(Permission_1.Permission.formatDashboardPermission);
|
|
112
124
|
return {
|
|
113
|
-
|
|
125
|
+
dashboards: accessTokens.body.dashboards.map((dashboard) => {
|
|
126
|
+
if (typeof dashboard.definition === 'string')
|
|
127
|
+
throw new FailedToDecryptDashboardBeforeClient_1.FailedToDecryptDashboardBeforeClient();
|
|
128
|
+
return DashboardRepository.embellishDashboardFromAPI(dashboard, formattedPermissions);
|
|
129
|
+
}),
|
|
130
|
+
permissions: formattedPermissions,
|
|
114
131
|
};
|
|
115
132
|
}
|
|
116
133
|
throw new FailedToFetchDashboardAccessTokens_1.FailedToFetchDashboardAccessTokens('Failed to fetch dashboard access tokens.');
|
|
@@ -9,10 +9,11 @@ export declare class GlobalLibraryRepository {
|
|
|
9
9
|
permissions: GlobalLibraryPermission[];
|
|
10
10
|
}>;
|
|
11
11
|
fetchGlobalLibraries(): Promise<{
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
global_libraries: GlobalLibrary[];
|
|
13
|
+
permissions: GlobalLibraryPermission[];
|
|
14
14
|
}>;
|
|
15
15
|
fetchGlobalLibraryAccessTokens(): Promise<{
|
|
16
|
+
global_libraries: GlobalLibrary[];
|
|
16
17
|
permissions: GlobalLibraryPermission[];
|
|
17
18
|
}>;
|
|
18
19
|
updateGlobalLibrary(params: UpdateGlobalLibraryParams): Promise<Response<{
|
|
@@ -13,7 +13,6 @@ exports.GlobalLibraryRepository = void 0;
|
|
|
13
13
|
const lodash_1 = require("lodash");
|
|
14
14
|
const Permission_1 = require("./Permission");
|
|
15
15
|
const FailedToFetchGlobalLibraryAccessTokens_1 = require("../errors/FailedToFetchGlobalLibraryAccessTokens");
|
|
16
|
-
const FailedToFetchGlobalLibraries_1 = require("../errors/FailedToFetchGlobalLibraries");
|
|
17
16
|
class GlobalLibraryRepository {
|
|
18
17
|
constructor(vizzly) {
|
|
19
18
|
this.cachedPermissions = { permissions: [] };
|
|
@@ -33,31 +32,24 @@ class GlobalLibraryRepository {
|
|
|
33
32
|
}
|
|
34
33
|
fetchGlobalLibraries() {
|
|
35
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
-
|
|
35
|
+
// Now, we fetch the libraries and the access tokens from the access call.
|
|
36
|
+
return yield this.fetchGlobalLibraryAccessTokens();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
fetchGlobalLibraryAccessTokens() {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
41
|
const vizzlyApi = this.vizzly.getVizzlyAPI();
|
|
38
|
-
|
|
42
|
+
let accessTokens;
|
|
39
43
|
if (this.vizzly.implementationStrategy.shouldPersistViaQueryEngine()) {
|
|
40
44
|
const vizzlyQueryEngineApi = this.vizzly.getVizzlyQueryEngineAPI();
|
|
41
|
-
|
|
42
|
-
globalLibraryAccessTokens: accessTokens.permissions.map((p) => p.token),
|
|
43
|
-
});
|
|
45
|
+
accessTokens = yield vizzlyQueryEngineApi.fetchGlobalLibraryAccessTokens();
|
|
44
46
|
}
|
|
45
47
|
else {
|
|
46
|
-
|
|
47
|
-
globalLibraryAccessTokens: accessTokens.permissions.map((p) => p.token),
|
|
48
|
-
});
|
|
48
|
+
accessTokens = yield vizzlyApi.fetchGlobalLibraryAccessTokens();
|
|
49
49
|
}
|
|
50
|
-
if (globalLibraries.status === 200)
|
|
51
|
-
return globalLibraries.body;
|
|
52
|
-
throw new FailedToFetchGlobalLibraries_1.FailedToFetchGlobalLibraries(`Failed to fetch global libraries. Got status ${globalLibraries.status}`);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
fetchGlobalLibraryAccessTokens() {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
const vizzlyApi = this.vizzly.getVizzlyAPI();
|
|
58
|
-
const accessTokens = yield vizzlyApi.execute(vizzlyApi.buildFetchGlobalLibraryAccessTokensRequest());
|
|
59
50
|
if (accessTokens.status === 200) {
|
|
60
51
|
return {
|
|
52
|
+
global_libraries: accessTokens.body.global_libraries,
|
|
61
53
|
permissions: accessTokens.body.permissions.map(Permission_1.Permission.formatGlobalLibraryPermission),
|
|
62
54
|
};
|
|
63
55
|
}
|
|
@@ -78,7 +70,7 @@ class GlobalLibraryRepository {
|
|
|
78
70
|
}
|
|
79
71
|
getChildGlobalLibrariesByParentGlobalLibraryId(parentGlobalLibraryId) {
|
|
80
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const {
|
|
73
|
+
const { global_libraries: globalLibraries } = yield this.fetchGlobalLibraries();
|
|
82
74
|
return GlobalLibraryRepository.mapParentToChildGlobalLibraries(globalLibraries)[parentGlobalLibraryId] || [];
|
|
83
75
|
});
|
|
84
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DashboardPermission, GlobalLibraryPermission } from '../types';
|
|
1
|
+
import { DashboardPermission, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI } from '../types';
|
|
2
2
|
export declare class Permission {
|
|
3
3
|
static formatDashboardPermission(permission: {
|
|
4
4
|
dashboard_id: string;
|
|
@@ -6,10 +6,5 @@ export declare class Permission {
|
|
|
6
6
|
token: string;
|
|
7
7
|
scope: 'read' | 'read_write';
|
|
8
8
|
}): DashboardPermission;
|
|
9
|
-
static formatGlobalLibraryPermission(permission:
|
|
10
|
-
global_library_id: string;
|
|
11
|
-
user_reference: string;
|
|
12
|
-
token: string;
|
|
13
|
-
scope: 'read' | 'read_write';
|
|
14
|
-
}): GlobalLibraryPermission;
|
|
9
|
+
static formatGlobalLibraryPermission(permission: GlobalLibraryPermissionFromAPI): GlobalLibraryPermission;
|
|
15
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Api } from './Api';
|
|
2
2
|
import { Authentication } from './Authentication';
|
|
3
|
-
import { CreateDashboardParams, CreateGlobalLibraryParams, GlobalLibrary, GlobalLibraryPermission, Request, UpdateDashboardParams, UpdateDashboardResponseBody, UpdateGlobalLibraryParams } from '../types';
|
|
3
|
+
import { CreateDashboardParams, CreateGlobalLibraryParams, GlobalLibrary, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI, Request, UpdateDashboardParams, UpdateDashboardResponseBody, UpdateGlobalLibraryParams } from '../types';
|
|
4
4
|
import { nVizzlyApi } from '../types';
|
|
5
5
|
export declare class VizzlyApi extends Api {
|
|
6
6
|
constructor(auth: Authentication, host?: string);
|
|
@@ -19,6 +19,10 @@ export declare class VizzlyApi extends Api {
|
|
|
19
19
|
}): Request<{
|
|
20
20
|
globalLibraryAccessTokens: string[];
|
|
21
21
|
}>;
|
|
22
|
+
fetchGlobalLibraryAccessTokens(): Promise<import("../types").Response<{
|
|
23
|
+
global_libraries: GlobalLibrary[];
|
|
24
|
+
permissions: Array<GlobalLibraryPermissionFromAPI>;
|
|
25
|
+
}>>;
|
|
22
26
|
buildFetchGlobalLibraryAccessTokensRequest(): Request<{
|
|
23
27
|
projectAdminOverrideToken: string | undefined;
|
|
24
28
|
dashboardAccessToken: string;
|
package/dist/models/VizzlyApi.js
CHANGED
|
@@ -40,6 +40,11 @@ class VizzlyApi extends Api_1.Api {
|
|
|
40
40
|
},
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
+
fetchGlobalLibraryAccessTokens() {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
return yield this.execute(this.buildFetchGlobalLibraryAccessTokensRequest());
|
|
46
|
+
});
|
|
47
|
+
}
|
|
43
48
|
buildFetchGlobalLibraryAccessTokensRequest() {
|
|
44
49
|
return {
|
|
45
50
|
path: '/api/v2/auth/global-library/access',
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { Api } from './Api';
|
|
2
2
|
import { Authentication } from './Authentication';
|
|
3
|
-
import { nVizzlyQueryEngine, Request, extraHeaders, CreateDashboardParams, UpdateDashboardParams, UpdateGlobalLibraryParams, GlobalLibrary, CreateGlobalLibraryParams, GlobalLibraryPermission } from '../types';
|
|
3
|
+
import { nVizzlyQueryEngine, Request, extraHeaders, CreateDashboardParams, UpdateDashboardParams, UpdateGlobalLibraryParams, GlobalLibrary, CreateGlobalLibraryParams, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI } from '../types';
|
|
4
4
|
export declare class VizzlyQueryEngineApi extends Api {
|
|
5
5
|
constructor(auth: Authentication, host: string, extraHeaders?: extraHeaders);
|
|
6
6
|
buildCreateDashboardRequest(params: CreateDashboardParams): Request<CreateDashboardParams & {
|
|
7
7
|
dashboardAccessToken: string;
|
|
8
8
|
}>;
|
|
9
|
+
buildFetchDashboardAccessTokensRequest(): Request<{
|
|
10
|
+
projectAdminOverrideToken: string | undefined;
|
|
11
|
+
dashboardAccessToken: string;
|
|
12
|
+
}>;
|
|
13
|
+
fetchGlobalLibraryAccessTokens(): Promise<import("../types").Response<{
|
|
14
|
+
global_libraries: GlobalLibrary[];
|
|
15
|
+
permissions: Array<GlobalLibraryPermissionFromAPI>;
|
|
16
|
+
}>>;
|
|
17
|
+
buildFetchGlobalLibraryAccessTokensRequest(): Request<{
|
|
18
|
+
projectAdminOverrideToken: string | undefined;
|
|
19
|
+
dashboardAccessToken: string;
|
|
20
|
+
}>;
|
|
9
21
|
buildFetchDashboardsRequest(dashboardSessionAccessTokens: string[]): Request<{}>;
|
|
10
22
|
createConfigFromUpload(createConfigFromUploadParams: nVizzlyQueryEngine.CreateConfigFromUploadParams): Promise<import("../types").Response<unknown>>;
|
|
11
23
|
private buildCreateConfigFromUploadRequest;
|
|
@@ -32,6 +32,31 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
+
buildFetchDashboardAccessTokensRequest() {
|
|
36
|
+
return {
|
|
37
|
+
path: '/api/v1/dashboard/access',
|
|
38
|
+
method: 'post',
|
|
39
|
+
body: {
|
|
40
|
+
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
41
|
+
projectAdminOverrideToken: this.auth.getProjectAdminOverrideToken(),
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
fetchGlobalLibraryAccessTokens() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return yield this.execute(this.buildFetchGlobalLibraryAccessTokensRequest());
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
buildFetchGlobalLibraryAccessTokensRequest() {
|
|
51
|
+
return {
|
|
52
|
+
path: '/api/v1/global-library/access',
|
|
53
|
+
method: 'post',
|
|
54
|
+
body: {
|
|
55
|
+
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
56
|
+
projectAdminOverrideToken: this.auth.getProjectAdminOverrideToken(),
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
35
60
|
buildFetchDashboardsRequest(dashboardSessionAccessTokens) {
|
|
36
61
|
return {
|
|
37
62
|
path: '/api/v1/get-dashboards',
|
|
@@ -323,7 +348,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
323
348
|
body: {
|
|
324
349
|
dashboardSessionToken: params.dashboardPermission.token,
|
|
325
350
|
definition: params.definition,
|
|
326
|
-
meta: params.meta,
|
|
351
|
+
meta: params.metadata || params.meta || {},
|
|
327
352
|
deleted: params.deleted,
|
|
328
353
|
},
|
|
329
354
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -411,3 +411,15 @@ export type DashboardPermission = BasePermission & {
|
|
|
411
411
|
export type GlobalLibraryPermission = BasePermission & {
|
|
412
412
|
globalLibraryId: string;
|
|
413
413
|
};
|
|
414
|
+
export type DashboardPermissionFromAPI = {
|
|
415
|
+
dashboard_id: string;
|
|
416
|
+
token: string;
|
|
417
|
+
user_reference: string;
|
|
418
|
+
scope: 'read' | 'read_write';
|
|
419
|
+
};
|
|
420
|
+
export type GlobalLibraryPermissionFromAPI = {
|
|
421
|
+
global_library_id: string;
|
|
422
|
+
user_reference: string;
|
|
423
|
+
token: string;
|
|
424
|
+
scope: 'read' | 'read_write';
|
|
425
|
+
};
|