@vizzly/api-client 0.0.16 → 0.0.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.
- package/dist/models/DashboardManager.d.ts +5 -5
- package/dist/models/DashboardManager.js +7 -6
- package/dist/models/DashboardRepository.d.ts +4 -4
- package/dist/models/DashboardRepository.js +5 -31
- package/dist/models/GlobalLibraryRepository.d.ts +3 -3
- package/dist/models/GlobalLibraryRepository.js +5 -5
- package/dist/models/VizzlyApi.d.ts +61 -59
- package/dist/models/VizzlyApi.js +47 -15
- package/dist/models/VizzlyQueryEngineApi.d.ts +50 -48
- package/dist/models/VizzlyQueryEngineApi.js +52 -27
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Vizzly } from './Vizzly';
|
|
2
|
-
import { CreateDashboardParams, Dashboard, DashboardDefinition, Dashboard as DashboardType, GlobalLibrary, UpdateDashboardParams } from '../types';
|
|
2
|
+
import { CreateDashboardParams, Dashboard, DashboardDefinition, Dashboard as DashboardType, GlobalLibrary, RequestParams, UpdateDashboardParams } from '../types';
|
|
3
3
|
export declare class DashboardManager {
|
|
4
4
|
private vizzly;
|
|
5
5
|
constructor(vizzly: Vizzly);
|
|
6
|
-
create(params: CreateDashboardParams): Promise<{
|
|
6
|
+
create(params: RequestParams<CreateDashboardParams>): Promise<{
|
|
7
7
|
dashboard: Dashboard;
|
|
8
8
|
permissions: import("../types").DashboardPermission[];
|
|
9
9
|
}>;
|
|
10
|
-
update(params: Omit<UpdateDashboardParams, 'dashboardPermission' | 'definition'> & {
|
|
10
|
+
update(params: RequestParams<Omit<UpdateDashboardParams, 'dashboardPermission' | 'definition'> & {
|
|
11
11
|
dashboardId: string;
|
|
12
12
|
definition?: DashboardDefinition;
|
|
13
|
-
}): Promise<Dashboard>;
|
|
14
|
-
getDashboards(): Promise<DashboardType[]>;
|
|
13
|
+
}>): Promise<Dashboard>;
|
|
14
|
+
getDashboards(params?: RequestParams): Promise<DashboardType[]>;
|
|
15
15
|
static mergeDashboardsAndGlobalLibraries(dashboards: DashboardType[], globalLibraries: GlobalLibrary[]): DashboardType[];
|
|
16
16
|
static mergeCustomFields(dashboard: DashboardType, dashboards: DashboardType[], parentGlobalLibrariesForDashboard: GlobalLibrary[], childGlobalLibrariesForDashboard: GlobalLibrary[]): DashboardType['definition']['customFields'];
|
|
17
17
|
static markViewsAsProtected(componentLibrary: DashboardType['definition']['componentLibrary']): DashboardType['definition']['componentLibrary'];
|
|
@@ -27,7 +27,10 @@ class DashboardManager {
|
|
|
27
27
|
var _a, _b, _c;
|
|
28
28
|
const dashboardRepository = this.vizzly.getDashboardRepository();
|
|
29
29
|
const globalLibraryRepository = this.vizzly.getGlobalLibraryRepository();
|
|
30
|
-
const [{ global_libraries: globalLibraries, permissions: globalLibraryPermissions }, { dashboards, permissions: dashboardPermissions },] = yield Promise.all([
|
|
30
|
+
const [{ global_libraries: globalLibraries, permissions: globalLibraryPermissions }, { dashboards, permissions: dashboardPermissions },] = yield Promise.all([
|
|
31
|
+
globalLibraryRepository.fetchGlobalLibraries(params),
|
|
32
|
+
dashboardRepository.fetchDashboards(params),
|
|
33
|
+
]);
|
|
31
34
|
const dashboardToUpdate = dashboards.find((dashboard) => dashboard.id === params.dashboardId);
|
|
32
35
|
if (!dashboardToUpdate)
|
|
33
36
|
throw new Error('Cannot find dashboard to update.');
|
|
@@ -90,13 +93,13 @@ class DashboardManager {
|
|
|
90
93
|
return updatedDashboard;
|
|
91
94
|
});
|
|
92
95
|
}
|
|
93
|
-
getDashboards() {
|
|
96
|
+
getDashboards(params) {
|
|
94
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
98
|
const dashboardRepo = this.vizzly.getDashboardRepository();
|
|
96
99
|
const libraryRepo = this.vizzly.getGlobalLibraryRepository();
|
|
97
100
|
const [{ dashboards }, { global_libraries: globalLibraries }] = yield Promise.all([
|
|
98
|
-
dashboardRepo.fetchDashboards(),
|
|
99
|
-
libraryRepo.fetchGlobalLibraries(),
|
|
101
|
+
dashboardRepo.fetchDashboards(params),
|
|
102
|
+
libraryRepo.fetchGlobalLibraries(params),
|
|
100
103
|
]);
|
|
101
104
|
return DashboardManager.mergeDashboardsAndGlobalLibraries(dashboards, globalLibraries);
|
|
102
105
|
});
|
|
@@ -111,8 +114,6 @@ class DashboardManager {
|
|
|
111
114
|
let { parentGlobalLibraries, childGlobalLibraries } = GlobalLibraryRepository_1.GlobalLibraryRepository.splitParentAndChildGlobalLibraries(globalLibraries);
|
|
112
115
|
// Only include the child libraries if the dashboard is not a parent.
|
|
113
116
|
childGlobalLibraries = dashboard.parent_dashboard_id === null ? [] : childGlobalLibraries;
|
|
114
|
-
// If parent dashboard, all libraries are for the parent.
|
|
115
|
-
// parentGlobalLibraries = dashboard.parent_dashboard_id === null ? [...parentGlobalLibraries, ...childGlobalLibraries] : [];
|
|
116
117
|
// Add the views from the various sources together. The order does matter -
|
|
117
118
|
// first elements are kept if a duplicate view is found.
|
|
118
119
|
let newLibrary = (0, lodash_1.uniqBy)([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateDashboardParams, Dashboard, DashboardFromAPI, DashboardPermission, UpdateDashboardParams } from '../types';
|
|
1
|
+
import { CreateDashboardParams, Dashboard, DashboardFromAPI, DashboardPermission, RequestParams, UpdateDashboardParams } from '../types';
|
|
2
2
|
import { Vizzly } from './Vizzly';
|
|
3
3
|
export declare class DashboardRepository {
|
|
4
4
|
private vizzly;
|
|
@@ -7,15 +7,15 @@ export declare class DashboardRepository {
|
|
|
7
7
|
dashboard: Dashboard;
|
|
8
8
|
permissions: DashboardPermission[];
|
|
9
9
|
}>;
|
|
10
|
-
updateDashboard(params: UpdateDashboardParams): Promise<Dashboard>;
|
|
11
|
-
fetchDashboards(): Promise<{
|
|
10
|
+
updateDashboard(params: RequestParams<UpdateDashboardParams>): Promise<Dashboard>;
|
|
11
|
+
fetchDashboards(params?: RequestParams): Promise<{
|
|
12
12
|
dashboards: Dashboard[];
|
|
13
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
|
-
fetchDashboardAccessTokens(): Promise<{
|
|
18
|
+
fetchDashboardAccessTokens(params?: RequestParams): Promise<{
|
|
19
19
|
dashboards: Dashboard[];
|
|
20
20
|
permissions: DashboardPermission[];
|
|
21
21
|
}>;
|
|
@@ -66,35 +66,9 @@ class DashboardRepository {
|
|
|
66
66
|
throw new FailedToUpdateDashboard_1.FailedToUpdateDashboard(`Failed to update dashboard, got status ${updatedDashboard.status}`);
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
fetchDashboards() {
|
|
69
|
+
fetchDashboards(params) {
|
|
70
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
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}.`);
|
|
71
|
+
return yield this.fetchDashboardAccessTokens(params);
|
|
98
72
|
});
|
|
99
73
|
}
|
|
100
74
|
static embellishDashboardFromAPI(dashboard, permissions) {
|
|
@@ -108,16 +82,16 @@ class DashboardRepository {
|
|
|
108
82
|
static takePermissionsOfScope(dashboardId, permissions, scope) {
|
|
109
83
|
return permissions.filter((p) => p.dashboardId === dashboardId && p.scope === scope);
|
|
110
84
|
}
|
|
111
|
-
fetchDashboardAccessTokens() {
|
|
85
|
+
fetchDashboardAccessTokens(params) {
|
|
112
86
|
return __awaiter(this, void 0, void 0, function* () {
|
|
113
87
|
let accessTokens;
|
|
114
88
|
if (this.vizzly.implementationStrategy.shouldPersistViaQueryEngine()) {
|
|
115
89
|
const vizzlyQueryEngineApi = this.vizzly.getVizzlyQueryEngineAPI();
|
|
116
|
-
accessTokens = yield vizzlyQueryEngineApi.execute(vizzlyQueryEngineApi.buildFetchDashboardAccessTokensRequest());
|
|
90
|
+
accessTokens = yield vizzlyQueryEngineApi.execute(vizzlyQueryEngineApi.buildFetchDashboardAccessTokensRequest(params));
|
|
117
91
|
}
|
|
118
92
|
else {
|
|
119
93
|
const vizzlyApi = this.vizzly.getVizzlyAPI();
|
|
120
|
-
accessTokens = yield vizzlyApi.execute(vizzlyApi.buildFetchDashboardAccessTokensRequest());
|
|
94
|
+
accessTokens = yield vizzlyApi.execute(vizzlyApi.buildFetchDashboardAccessTokensRequest(params));
|
|
121
95
|
}
|
|
122
96
|
if (accessTokens.status === 200) {
|
|
123
97
|
const formattedPermissions = accessTokens.body.permissions.map(Permission_1.Permission.formatDashboardPermission);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateGlobalLibraryParams, GlobalLibrary, GlobalLibraryPermission, Response, UpdateGlobalLibraryParams } from '../types';
|
|
1
|
+
import { CreateGlobalLibraryParams, GlobalLibrary, GlobalLibraryPermission, RequestParams, Response, UpdateGlobalLibraryParams } from '../types';
|
|
2
2
|
import { Vizzly } from './Vizzly';
|
|
3
3
|
export declare class GlobalLibraryRepository {
|
|
4
4
|
private vizzly;
|
|
@@ -8,11 +8,11 @@ export declare class GlobalLibraryRepository {
|
|
|
8
8
|
global_library: GlobalLibrary;
|
|
9
9
|
permissions: GlobalLibraryPermission[];
|
|
10
10
|
}>;
|
|
11
|
-
fetchGlobalLibraries(): Promise<{
|
|
11
|
+
fetchGlobalLibraries(params?: RequestParams): Promise<{
|
|
12
12
|
global_libraries: GlobalLibrary[];
|
|
13
13
|
permissions: GlobalLibraryPermission[];
|
|
14
14
|
}>;
|
|
15
|
-
fetchGlobalLibraryAccessTokens(): Promise<{
|
|
15
|
+
fetchGlobalLibraryAccessTokens(params?: RequestParams): Promise<{
|
|
16
16
|
global_libraries: GlobalLibrary[];
|
|
17
17
|
permissions: GlobalLibraryPermission[];
|
|
18
18
|
}>;
|
|
@@ -30,22 +30,22 @@ class GlobalLibraryRepository {
|
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
fetchGlobalLibraries() {
|
|
33
|
+
fetchGlobalLibraries(params) {
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
35
|
// Now, we fetch the libraries and the access tokens from the access call.
|
|
36
|
-
return yield this.fetchGlobalLibraryAccessTokens();
|
|
36
|
+
return yield this.fetchGlobalLibraryAccessTokens(params);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
fetchGlobalLibraryAccessTokens() {
|
|
39
|
+
fetchGlobalLibraryAccessTokens(params) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const vizzlyApi = this.vizzly.getVizzlyAPI();
|
|
42
42
|
let accessTokens;
|
|
43
43
|
if (this.vizzly.implementationStrategy.shouldPersistViaQueryEngine()) {
|
|
44
44
|
const vizzlyQueryEngineApi = this.vizzly.getVizzlyQueryEngineAPI();
|
|
45
|
-
accessTokens = yield vizzlyQueryEngineApi.fetchGlobalLibraryAccessTokens();
|
|
45
|
+
accessTokens = yield vizzlyQueryEngineApi.fetchGlobalLibraryAccessTokens(params);
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
accessTokens = yield vizzlyApi.fetchGlobalLibraryAccessTokens();
|
|
48
|
+
accessTokens = yield vizzlyApi.fetchGlobalLibraryAccessTokens(params);
|
|
49
49
|
}
|
|
50
50
|
if (accessTokens.status === 200) {
|
|
51
51
|
return {
|
|
@@ -1,100 +1,102 @@
|
|
|
1
1
|
import { Api } from './Api';
|
|
2
2
|
import { Authentication } from './Authentication';
|
|
3
|
-
import { CreateDashboardParams, CreateGlobalLibraryParams, GlobalLibrary, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI, Request, UpdateDashboardParams, UpdateDashboardResponseBody, UpdateGlobalLibraryParams } from '../types';
|
|
3
|
+
import { CreateDashboardParams, CreateGlobalLibraryParams, GlobalLibrary, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI, Request, RequestParams, 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);
|
|
7
|
-
buildFetchDashboardAccessTokensRequest(): Request<{
|
|
7
|
+
buildFetchDashboardAccessTokensRequest(params?: RequestParams): Request<{
|
|
8
8
|
projectAdminOverrideToken: string | undefined;
|
|
9
9
|
dashboardAccessToken: string;
|
|
10
10
|
}>;
|
|
11
|
-
fetchGlobalLibraries(params: {
|
|
11
|
+
fetchGlobalLibraries(params: RequestParams<{
|
|
12
12
|
globalLibraryAccessTokens: string[];
|
|
13
|
-
}): Promise<import("../types").Response<{
|
|
13
|
+
}>): Promise<import("../types").Response<{
|
|
14
14
|
found: GlobalLibrary[];
|
|
15
15
|
not_found: string[];
|
|
16
16
|
}>>;
|
|
17
|
-
buildFetchGlobalLibrariesRequest(params: {
|
|
17
|
+
buildFetchGlobalLibrariesRequest(params: RequestParams<{
|
|
18
18
|
globalLibraryAccessTokens: string[];
|
|
19
|
-
}): Request<{
|
|
19
|
+
}>): Request<{
|
|
20
20
|
globalLibraryAccessTokens: string[];
|
|
21
21
|
}>;
|
|
22
|
-
fetchGlobalLibraryAccessTokens(): Promise<import("../types").Response<{
|
|
22
|
+
fetchGlobalLibraryAccessTokens(params?: RequestParams): Promise<import("../types").Response<{
|
|
23
23
|
global_libraries: GlobalLibrary[];
|
|
24
24
|
permissions: Array<GlobalLibraryPermissionFromAPI>;
|
|
25
25
|
}>>;
|
|
26
|
-
buildFetchGlobalLibraryAccessTokensRequest(): Request<{
|
|
26
|
+
buildFetchGlobalLibraryAccessTokensRequest(params?: RequestParams): Request<{
|
|
27
27
|
projectAdminOverrideToken: string | undefined;
|
|
28
28
|
dashboardAccessToken: string;
|
|
29
29
|
}>;
|
|
30
|
-
buildCreateDashboardRequest(params: CreateDashboardParams): Request<CreateDashboardParams & {
|
|
30
|
+
buildCreateDashboardRequest(params: RequestParams<CreateDashboardParams>): Request<CreateDashboardParams & {
|
|
31
31
|
dashboardAccessToken: string;
|
|
32
32
|
}>;
|
|
33
|
-
buildFetchDashboardsRequest(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
buildFetchDashboardsRequest(params: RequestParams<{
|
|
34
|
+
dashboardSessionAccessTokens: string[];
|
|
35
|
+
}>): Request<{}>;
|
|
36
|
+
createParentDashboard(params: RequestParams<nVizzlyApi.CreateParentDashboardParams>): Promise<import("../types").Response<unknown>>;
|
|
37
|
+
buildCreateParentDashboardRequest(params: RequestParams<nVizzlyApi.CreateParentDashboardParams>): Request<{}>;
|
|
38
|
+
createParentGlobalLibrary(params: RequestParams<nVizzlyApi.CreateParentGlobalLibraryParams>): Promise<import("../types").Response<unknown>>;
|
|
39
|
+
buildCreateParentGlobalLibraryRequest(params: RequestParams<nVizzlyApi.CreateParentGlobalLibraryParams>): Request<{}>;
|
|
40
|
+
createGlobalLibrary(params: RequestParams<CreateGlobalLibraryParams>): Promise<{
|
|
39
41
|
global_library: GlobalLibrary;
|
|
40
42
|
permissions: Array<GlobalLibraryPermission>;
|
|
41
43
|
}>;
|
|
42
|
-
buildCreateGlobalLibraryRequest(params: CreateGlobalLibraryParams): Request<{}>;
|
|
43
|
-
getProjects(): Promise<import("../types").Response<unknown>>;
|
|
44
|
-
buildGetProjectsRequest(): Request<{}>;
|
|
45
|
-
createProjectApiKey(params: nVizzlyApi.CreateProjectApiKeyParams): Promise<import("../types").Response<{
|
|
44
|
+
buildCreateGlobalLibraryRequest(params: RequestParams<CreateGlobalLibraryParams>): Request<{}>;
|
|
45
|
+
getProjects(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
46
|
+
buildGetProjectsRequest(params?: RequestParams): Request<{}>;
|
|
47
|
+
createProjectApiKey(params: RequestParams<nVizzlyApi.CreateProjectApiKeyParams>): Promise<import("../types").Response<{
|
|
46
48
|
api_key: string;
|
|
47
49
|
}>>;
|
|
48
|
-
buildCreateProjectApiKeyRequest(params: nVizzlyApi.CreateProjectApiKeyParams): Request<{}>;
|
|
49
|
-
createQueryEngineUser(params: nVizzlyApi.CreateQueryEngineUserParams): Promise<import("../types").Response<unknown>>;
|
|
50
|
-
buildCreateQueryEngineUserRequest(params: nVizzlyApi.CreateQueryEngineUserParams): Request<{}>;
|
|
51
|
-
buildCreateSelfHostedDynamicQueryEngineProjectRequest(): Request<{}>;
|
|
52
|
-
buildCreateSelfHostedInBrowserProjectRequest(): Request<{}>;
|
|
53
|
-
buildCreateSelfHostedProjectRequest(): Request<{}>;
|
|
54
|
-
createManagedQueryEngineProject(): Promise<import("../types").Response<unknown>>;
|
|
55
|
-
buildCreateManagedQueryEngineProjectRequest(): Request<{}>;
|
|
56
|
-
createVizzlyConfigVersion(params: nVizzlyApi.CreateVizzlyConfigVersionParams): Promise<import("../types").Response<unknown>>;
|
|
57
|
-
buildCreateVizzlyConfigVersionRequest(params: nVizzlyApi.CreateVizzlyConfigVersionParams): Request<{}>;
|
|
58
|
-
duplicateParentDashboard(params: nVizzlyApi.DuplicateParentDashboardParams): Promise<import("../types").Response<unknown>>;
|
|
59
|
-
buildDuplicateParentDashboardRequest(params: nVizzlyApi.DuplicateParentDashboardParams): Request<{}>;
|
|
60
|
-
getConnection(params: nVizzlyApi.GetConnectionParams): Promise<{
|
|
50
|
+
buildCreateProjectApiKeyRequest(params: RequestParams<nVizzlyApi.CreateProjectApiKeyParams>): Request<{}>;
|
|
51
|
+
createQueryEngineUser(params: RequestParams<nVizzlyApi.CreateQueryEngineUserParams>): Promise<import("../types").Response<unknown>>;
|
|
52
|
+
buildCreateQueryEngineUserRequest(params: RequestParams<nVizzlyApi.CreateQueryEngineUserParams>): Request<{}>;
|
|
53
|
+
buildCreateSelfHostedDynamicQueryEngineProjectRequest(params?: RequestParams): Request<{}>;
|
|
54
|
+
buildCreateSelfHostedInBrowserProjectRequest(params?: RequestParams): Request<{}>;
|
|
55
|
+
buildCreateSelfHostedProjectRequest(params?: RequestParams): Request<{}>;
|
|
56
|
+
createManagedQueryEngineProject(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
57
|
+
buildCreateManagedQueryEngineProjectRequest(params?: RequestParams): Request<{}>;
|
|
58
|
+
createVizzlyConfigVersion(params: RequestParams<nVizzlyApi.CreateVizzlyConfigVersionParams>): Promise<import("../types").Response<unknown>>;
|
|
59
|
+
buildCreateVizzlyConfigVersionRequest(params: RequestParams<nVizzlyApi.CreateVizzlyConfigVersionParams>): Request<{}>;
|
|
60
|
+
duplicateParentDashboard(params: RequestParams<nVizzlyApi.DuplicateParentDashboardParams>): Promise<import("../types").Response<unknown>>;
|
|
61
|
+
buildDuplicateParentDashboardRequest(params: RequestParams<nVizzlyApi.DuplicateParentDashboardParams>): Request<{}>;
|
|
62
|
+
getConnection(params: RequestParams<nVizzlyApi.GetConnectionParams>): Promise<{
|
|
61
63
|
encryptedCredentials: string | null;
|
|
62
64
|
}>;
|
|
63
|
-
buildGetConnectionRequest(params: nVizzlyApi.GetConnectionParams): Request<{}>;
|
|
64
|
-
getManagedQueryEngineKeyPair(params: nVizzlyApi.GetManagedQueryEngineKeyPairParams): Promise<import("../types").Response<unknown>>;
|
|
65
|
-
buildGetManagedQueryEngineKeyPairRequest(params: nVizzlyApi.GetManagedQueryEngineKeyPairParams): Request<{}>;
|
|
66
|
-
getProject(params: nVizzlyApi.GetProjectParams): Promise<import("../types").Response<unknown>>;
|
|
67
|
-
buildGetProjectRequest(params: nVizzlyApi.GetProjectParams): Request<{}>;
|
|
68
|
-
getProjectAccessToken(params: nVizzlyApi.GetProjectAccessTokenParams): Promise<import("../types").Response<{
|
|
65
|
+
buildGetConnectionRequest(params: RequestParams<nVizzlyApi.GetConnectionParams>): Request<{}>;
|
|
66
|
+
getManagedQueryEngineKeyPair(params: RequestParams<nVizzlyApi.GetManagedQueryEngineKeyPairParams>): Promise<import("../types").Response<unknown>>;
|
|
67
|
+
buildGetManagedQueryEngineKeyPairRequest(params: RequestParams<nVizzlyApi.GetManagedQueryEngineKeyPairParams>): Request<{}>;
|
|
68
|
+
getProject(params: RequestParams<nVizzlyApi.GetProjectParams>): Promise<import("../types").Response<unknown>>;
|
|
69
|
+
buildGetProjectRequest(params: RequestParams<nVizzlyApi.GetProjectParams>): Request<{}>;
|
|
70
|
+
getProjectAccessToken(params: RequestParams<nVizzlyApi.GetProjectAccessTokenParams>): Promise<import("../types").Response<{
|
|
69
71
|
token: {
|
|
70
72
|
max_age: number;
|
|
71
73
|
token: string;
|
|
72
74
|
};
|
|
73
75
|
}>>;
|
|
74
|
-
buildGetProjectAccessTokenRequest(params: nVizzlyApi.GetProjectAccessTokenParams): Request<{}>;
|
|
75
|
-
getQueryEngineUser(params: nVizzlyApi.GetQueryEngineUserParams): Promise<import("../types").Response<unknown>>;
|
|
76
|
-
buildGetQueryEngineUserRequest(params: nVizzlyApi.GetQueryEngineUserParams): Request<{}>;
|
|
77
|
-
getTeamMembers(params: nVizzlyApi.GetTeamMembers): Promise<import("../types").Response<unknown>>;
|
|
78
|
-
buildGetTeamMembersRequest(params: nVizzlyApi.GetTeamMembers): Request<{}>;
|
|
79
|
-
getVizzlyConfig(params: nVizzlyApi.GetVizzlyConfigParams): Promise<{
|
|
76
|
+
buildGetProjectAccessTokenRequest(params: RequestParams<nVizzlyApi.GetProjectAccessTokenParams>): Request<{}>;
|
|
77
|
+
getQueryEngineUser(params: RequestParams<nVizzlyApi.GetQueryEngineUserParams>): Promise<import("../types").Response<unknown>>;
|
|
78
|
+
buildGetQueryEngineUserRequest(params: RequestParams<nVizzlyApi.GetQueryEngineUserParams>): Request<{}>;
|
|
79
|
+
getTeamMembers(params: RequestParams<nVizzlyApi.GetTeamMembers>): Promise<import("../types").Response<unknown>>;
|
|
80
|
+
buildGetTeamMembersRequest(params: RequestParams<nVizzlyApi.GetTeamMembers>): Request<{}>;
|
|
81
|
+
getVizzlyConfig(params: RequestParams<nVizzlyApi.GetVizzlyConfigParams>): Promise<{
|
|
80
82
|
encryptedConfig: string | null;
|
|
81
83
|
}>;
|
|
82
|
-
buildGetVizzlyConfigRequest(params: nVizzlyApi.GetVizzlyConfigParams): Request<{}>;
|
|
83
|
-
saveConnection(params: nVizzlyApi.SaveConnectionParams): Promise<import("../types").Response<unknown>>;
|
|
84
|
-
buildSaveConnectionRequest(params: nVizzlyApi.SaveConnectionParams): Request<{}>;
|
|
85
|
-
buildSaveEncryptedProjectEncryptionSecretRequest(params: nVizzlyApi.SaveEncryptedProjectEncryptionSecretParams): Request<{}>;
|
|
86
|
-
saveScheduledReport(params: nVizzlyApi.SaveScheduledReportParams): Promise<import("../types").Response<unknown>>;
|
|
87
|
-
buildSaveScheduledReportRequest(params: nVizzlyApi.SaveScheduledReportParams): Request<{}>;
|
|
88
|
-
updateDashboard(params: UpdateDashboardParams): Promise<import("../types").Response<UpdateDashboardResponseBody>>;
|
|
89
|
-
buildUpdateDashboardRequest(params: UpdateDashboardParams): Request<{}>;
|
|
90
|
-
updateParentGlobalLibrary(params: nVizzlyApi.UpdateParentGlobalLibraryParams): Promise<import("../types").Response<unknown>>;
|
|
91
|
-
buildUpdateParentGlobalLibraryRequest(params: nVizzlyApi.UpdateParentGlobalLibraryParams): Request<{}>;
|
|
84
|
+
buildGetVizzlyConfigRequest(params: RequestParams<nVizzlyApi.GetVizzlyConfigParams>): Request<{}>;
|
|
85
|
+
saveConnection(params: RequestParams<nVizzlyApi.SaveConnectionParams>): Promise<import("../types").Response<unknown>>;
|
|
86
|
+
buildSaveConnectionRequest(params: RequestParams<nVizzlyApi.SaveConnectionParams>): Request<{}>;
|
|
87
|
+
buildSaveEncryptedProjectEncryptionSecretRequest(params: RequestParams<nVizzlyApi.SaveEncryptedProjectEncryptionSecretParams>): Request<{}>;
|
|
88
|
+
saveScheduledReport(params: RequestParams<nVizzlyApi.SaveScheduledReportParams>): Promise<import("../types").Response<unknown>>;
|
|
89
|
+
buildSaveScheduledReportRequest(params: RequestParams<nVizzlyApi.SaveScheduledReportParams>): Request<{}>;
|
|
90
|
+
updateDashboard(params: RequestParams<UpdateDashboardParams>): Promise<import("../types").Response<UpdateDashboardResponseBody>>;
|
|
91
|
+
buildUpdateDashboardRequest(params: RequestParams<UpdateDashboardParams>): Request<{}>;
|
|
92
|
+
updateParentGlobalLibrary(params: RequestParams<nVizzlyApi.UpdateParentGlobalLibraryParams>): Promise<import("../types").Response<unknown>>;
|
|
93
|
+
buildUpdateParentGlobalLibraryRequest(params: RequestParams<nVizzlyApi.UpdateParentGlobalLibraryParams>): Request<{}>;
|
|
92
94
|
updateGlobalLibrary(params: UpdateGlobalLibraryParams): Promise<import("../types").Response<{
|
|
93
95
|
global_library: GlobalLibrary;
|
|
94
96
|
}>>;
|
|
95
|
-
buildUpdateGlobalLibraryRequest(params: UpdateGlobalLibraryParams): Request<{}>;
|
|
96
|
-
updateProjectApiKey(params: nVizzlyApi.UpdateProjectApiKeyParams): Promise<import("../types").Response<unknown>>;
|
|
97
|
-
buildUpdateProjectApiKeyRequest(params: nVizzlyApi.UpdateProjectApiKeyParams): Request<{}>;
|
|
98
|
-
updateQueryEngineUser(params: nVizzlyApi.UpdateQueryEngineUserParams): Promise<import("../types").Response<unknown>>;
|
|
99
|
-
buildUpdateQueryEngineUserRequest(params: nVizzlyApi.UpdateQueryEngineUserParams): Request<{}>;
|
|
97
|
+
buildUpdateGlobalLibraryRequest(params: RequestParams<UpdateGlobalLibraryParams>): Request<{}>;
|
|
98
|
+
updateProjectApiKey(params: RequestParams<nVizzlyApi.UpdateProjectApiKeyParams>): Promise<import("../types").Response<unknown>>;
|
|
99
|
+
buildUpdateProjectApiKeyRequest(params: RequestParams<nVizzlyApi.UpdateProjectApiKeyParams>): Request<{}>;
|
|
100
|
+
updateQueryEngineUser(params: RequestParams<nVizzlyApi.UpdateQueryEngineUserParams>): Promise<import("../types").Response<unknown>>;
|
|
101
|
+
buildUpdateQueryEngineUserRequest(params: RequestParams<nVizzlyApi.UpdateQueryEngineUserParams>): Request<{}>;
|
|
100
102
|
}
|
package/dist/models/VizzlyApi.js
CHANGED
|
@@ -19,7 +19,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
19
19
|
constructor(auth, host = 'https://api.vizzly.co') {
|
|
20
20
|
super(auth, host);
|
|
21
21
|
}
|
|
22
|
-
buildFetchDashboardAccessTokensRequest() {
|
|
22
|
+
buildFetchDashboardAccessTokensRequest(params) {
|
|
23
23
|
return {
|
|
24
24
|
path: '/api/v2/auth/dashboards/access',
|
|
25
25
|
method: 'post',
|
|
@@ -27,6 +27,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
27
27
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
28
28
|
projectAdminOverrideToken: this.auth.getProjectAdminOverrideToken(),
|
|
29
29
|
},
|
|
30
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
fetchGlobalLibraries(params) {
|
|
@@ -41,14 +42,15 @@ class VizzlyApi extends Api_1.Api {
|
|
|
41
42
|
body: {
|
|
42
43
|
globalLibraryAccessTokens: params.globalLibraryAccessTokens,
|
|
43
44
|
},
|
|
45
|
+
abortSignal: params.abortSignal,
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
|
-
fetchGlobalLibraryAccessTokens() {
|
|
48
|
+
fetchGlobalLibraryAccessTokens(params) {
|
|
47
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
return yield this.execute(this.buildFetchGlobalLibraryAccessTokensRequest());
|
|
50
|
+
return yield this.execute(this.buildFetchGlobalLibraryAccessTokensRequest(params));
|
|
49
51
|
});
|
|
50
52
|
}
|
|
51
|
-
buildFetchGlobalLibraryAccessTokensRequest() {
|
|
53
|
+
buildFetchGlobalLibraryAccessTokensRequest(params) {
|
|
52
54
|
return {
|
|
53
55
|
path: '/api/v2/auth/global-library/access',
|
|
54
56
|
method: 'post',
|
|
@@ -56,6 +58,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
56
58
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
57
59
|
projectAdminOverrideToken: this.auth.getProjectAdminOverrideToken(),
|
|
58
60
|
},
|
|
61
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
59
62
|
};
|
|
60
63
|
}
|
|
61
64
|
buildCreateDashboardRequest(params) {
|
|
@@ -69,15 +72,17 @@ class VizzlyApi extends Api_1.Api {
|
|
|
69
72
|
parentDashboardId: params.parentDashboardId,
|
|
70
73
|
permissions: params.permissions,
|
|
71
74
|
},
|
|
75
|
+
abortSignal: params.abortSignal,
|
|
72
76
|
};
|
|
73
77
|
}
|
|
74
|
-
buildFetchDashboardsRequest(
|
|
78
|
+
buildFetchDashboardsRequest(params) {
|
|
75
79
|
return {
|
|
76
80
|
path: '/api/v2/multi-get-dashboard',
|
|
77
81
|
method: 'post',
|
|
78
82
|
body: {
|
|
79
|
-
dashboardAccessTokens: dashboardSessionAccessTokens,
|
|
83
|
+
dashboardAccessTokens: params.dashboardSessionAccessTokens,
|
|
80
84
|
},
|
|
85
|
+
abortSignal: params.abortSignal,
|
|
81
86
|
};
|
|
82
87
|
}
|
|
83
88
|
createParentDashboard(params) {
|
|
@@ -93,6 +98,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
93
98
|
projectId: params.projectId,
|
|
94
99
|
definition: params.definition,
|
|
95
100
|
},
|
|
101
|
+
abortSignal: params.abortSignal,
|
|
96
102
|
};
|
|
97
103
|
}
|
|
98
104
|
createParentGlobalLibrary(params) {
|
|
@@ -108,6 +114,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
108
114
|
projectId: params.projectId,
|
|
109
115
|
library: params.library,
|
|
110
116
|
},
|
|
117
|
+
abortSignal: params.abortSignal,
|
|
111
118
|
};
|
|
112
119
|
}
|
|
113
120
|
createGlobalLibrary(params) {
|
|
@@ -128,20 +135,22 @@ class VizzlyApi extends Api_1.Api {
|
|
|
128
135
|
library: params.library,
|
|
129
136
|
permissions: params.permissions,
|
|
130
137
|
},
|
|
138
|
+
abortSignal: params.abortSignal,
|
|
131
139
|
};
|
|
132
140
|
}
|
|
133
|
-
getProjects() {
|
|
141
|
+
getProjects(params) {
|
|
134
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
-
return this.execute(this.buildGetProjectsRequest());
|
|
143
|
+
return this.execute(this.buildGetProjectsRequest(params));
|
|
136
144
|
});
|
|
137
145
|
}
|
|
138
|
-
buildGetProjectsRequest() {
|
|
146
|
+
buildGetProjectsRequest(params) {
|
|
139
147
|
return {
|
|
140
148
|
path: `/api/v2/projects`,
|
|
141
149
|
method: 'get',
|
|
142
150
|
headers: {
|
|
143
151
|
auth: `Bearer ${this.auth.getAppSessionToken()}`,
|
|
144
152
|
},
|
|
153
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
145
154
|
};
|
|
146
155
|
}
|
|
147
156
|
createProjectApiKey(params) {
|
|
@@ -154,6 +163,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
154
163
|
path: `/api/v3/project/${params.projectId}/api-key`,
|
|
155
164
|
method: 'post',
|
|
156
165
|
body: {},
|
|
166
|
+
abortSignal: params.abortSignal,
|
|
157
167
|
};
|
|
158
168
|
}
|
|
159
169
|
createQueryEngineUser(params) {
|
|
@@ -169,41 +179,46 @@ class VizzlyApi extends Api_1.Api {
|
|
|
169
179
|
email: params.email,
|
|
170
180
|
password: params.password,
|
|
171
181
|
},
|
|
182
|
+
abortSignal: params.abortSignal,
|
|
172
183
|
};
|
|
173
184
|
}
|
|
174
|
-
buildCreateSelfHostedDynamicQueryEngineProjectRequest() {
|
|
185
|
+
buildCreateSelfHostedDynamicQueryEngineProjectRequest(params) {
|
|
175
186
|
return {
|
|
176
187
|
path: `/api/v2/project/self-hosted-dynamic-query-engine`,
|
|
177
188
|
method: 'post',
|
|
178
189
|
body: {},
|
|
190
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
179
191
|
};
|
|
180
192
|
}
|
|
181
|
-
buildCreateSelfHostedInBrowserProjectRequest() {
|
|
193
|
+
buildCreateSelfHostedInBrowserProjectRequest(params) {
|
|
182
194
|
return {
|
|
183
195
|
path: `/api/v2/project/self-hosted-in-browser`,
|
|
184
196
|
method: 'post',
|
|
185
197
|
body: {},
|
|
198
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
186
199
|
};
|
|
187
200
|
}
|
|
188
|
-
buildCreateSelfHostedProjectRequest() {
|
|
201
|
+
buildCreateSelfHostedProjectRequest(params) {
|
|
189
202
|
return {
|
|
190
203
|
path: `/api/v2/project/self-hosted-query-engine`,
|
|
191
204
|
method: 'post',
|
|
192
205
|
body: {},
|
|
206
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
193
207
|
};
|
|
194
208
|
}
|
|
195
|
-
createManagedQueryEngineProject() {
|
|
209
|
+
createManagedQueryEngineProject(params) {
|
|
196
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
-
return yield this.execute(this.buildCreateManagedQueryEngineProjectRequest());
|
|
211
|
+
return yield this.execute(this.buildCreateManagedQueryEngineProjectRequest(params));
|
|
198
212
|
});
|
|
199
213
|
}
|
|
200
|
-
buildCreateManagedQueryEngineProjectRequest() {
|
|
214
|
+
buildCreateManagedQueryEngineProjectRequest(params) {
|
|
201
215
|
return {
|
|
202
216
|
path: `/api/v2/project/managed-query-engine`,
|
|
203
217
|
method: 'post',
|
|
204
218
|
body: {
|
|
205
219
|
parent_dashboard_definition: {},
|
|
206
220
|
},
|
|
221
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
207
222
|
};
|
|
208
223
|
}
|
|
209
224
|
createVizzlyConfigVersion(params) {
|
|
@@ -219,6 +234,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
219
234
|
projectId: params.projectId,
|
|
220
235
|
encryptedConfig: params.encryptedConfig,
|
|
221
236
|
},
|
|
237
|
+
abortSignal: params.abortSignal,
|
|
222
238
|
};
|
|
223
239
|
}
|
|
224
240
|
duplicateParentDashboard(params) {
|
|
@@ -233,6 +249,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
233
249
|
body: {
|
|
234
250
|
dashboardId: params.dashboardId,
|
|
235
251
|
},
|
|
252
|
+
abortSignal: params.abortSignal,
|
|
236
253
|
};
|
|
237
254
|
}
|
|
238
255
|
getConnection(params) {
|
|
@@ -253,6 +270,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
253
270
|
return {
|
|
254
271
|
path: `/api/v2/project/${params.projectId}/connection`,
|
|
255
272
|
method: 'get',
|
|
273
|
+
abortSignal: params.abortSignal,
|
|
256
274
|
};
|
|
257
275
|
}
|
|
258
276
|
getManagedQueryEngineKeyPair(params) {
|
|
@@ -264,6 +282,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
264
282
|
return {
|
|
265
283
|
path: `/api/v2/project/managed-query-engine/${params.managedProjectId}/key-pairs/${params.keyPairId}`,
|
|
266
284
|
method: 'get',
|
|
285
|
+
abortSignal: params.abortSignal,
|
|
267
286
|
};
|
|
268
287
|
}
|
|
269
288
|
getProject(params) {
|
|
@@ -275,6 +294,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
275
294
|
return {
|
|
276
295
|
path: `/api/v3/project/${params.projectId}`,
|
|
277
296
|
method: 'get',
|
|
297
|
+
abortSignal: params.abortSignal,
|
|
278
298
|
};
|
|
279
299
|
}
|
|
280
300
|
getProjectAccessToken(params) {
|
|
@@ -289,6 +309,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
289
309
|
return {
|
|
290
310
|
path: `/api/v2/auth/project/${params.projectId}/access_token?${filterString}`,
|
|
291
311
|
method: 'get',
|
|
312
|
+
abortSignal: params.abortSignal,
|
|
292
313
|
};
|
|
293
314
|
}
|
|
294
315
|
getQueryEngineUser(params) {
|
|
@@ -300,6 +321,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
300
321
|
return {
|
|
301
322
|
path: `/api/v3/project/${params.projectId}/query-engine-user?email=${encodeURIComponent(params.email)}`,
|
|
302
323
|
method: 'get',
|
|
324
|
+
abortSignal: params.abortSignal,
|
|
303
325
|
};
|
|
304
326
|
}
|
|
305
327
|
getTeamMembers(params) {
|
|
@@ -311,6 +333,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
311
333
|
return {
|
|
312
334
|
path: `/api/v3/project/${params.projectId}/organisation-team-members`,
|
|
313
335
|
method: 'get',
|
|
336
|
+
abortSignal: params.abortSignal,
|
|
314
337
|
};
|
|
315
338
|
}
|
|
316
339
|
getVizzlyConfig(params) {
|
|
@@ -328,6 +351,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
328
351
|
return {
|
|
329
352
|
path: `/api/v3/project/${params.projectId}/config`,
|
|
330
353
|
method: 'get',
|
|
354
|
+
abortSignal: params.abortSignal,
|
|
331
355
|
};
|
|
332
356
|
}
|
|
333
357
|
saveConnection(params) {
|
|
@@ -344,6 +368,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
344
368
|
encryptedConfig: params.encryptedConfig,
|
|
345
369
|
encryptedConnection: params.encryptedConnection,
|
|
346
370
|
},
|
|
371
|
+
abortSignal: params.abortSignal,
|
|
347
372
|
};
|
|
348
373
|
}
|
|
349
374
|
buildSaveEncryptedProjectEncryptionSecretRequest(params) {
|
|
@@ -355,6 +380,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
355
380
|
encryptedEncryptionSecret: params.encryptedProjectEncryptionSecret,
|
|
356
381
|
allowRotation: params.allowRotation,
|
|
357
382
|
},
|
|
383
|
+
abortSignal: params.abortSignal,
|
|
358
384
|
};
|
|
359
385
|
}
|
|
360
386
|
saveScheduledReport(params) {
|
|
@@ -371,6 +397,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
371
397
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
372
398
|
scheduledReportId: params.scheduledReportId,
|
|
373
399
|
},
|
|
400
|
+
abortSignal: params.abortSignal,
|
|
374
401
|
};
|
|
375
402
|
}
|
|
376
403
|
updateDashboard(params) {
|
|
@@ -388,6 +415,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
388
415
|
meta: params.metadata || params.meta || {},
|
|
389
416
|
deleted: params.deleted,
|
|
390
417
|
},
|
|
418
|
+
abortSignal: params.abortSignal,
|
|
391
419
|
};
|
|
392
420
|
}
|
|
393
421
|
updateParentGlobalLibrary(params) {
|
|
@@ -404,6 +432,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
404
432
|
deleted: params.deleted,
|
|
405
433
|
name: params.name,
|
|
406
434
|
},
|
|
435
|
+
abortSignal: params.abortSignal,
|
|
407
436
|
};
|
|
408
437
|
}
|
|
409
438
|
updateGlobalLibrary(params) {
|
|
@@ -420,6 +449,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
420
449
|
deleted: params.deleted,
|
|
421
450
|
library: params.library,
|
|
422
451
|
},
|
|
452
|
+
abortSignal: params.abortSignal,
|
|
423
453
|
};
|
|
424
454
|
}
|
|
425
455
|
updateProjectApiKey(params) {
|
|
@@ -434,6 +464,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
434
464
|
body: {
|
|
435
465
|
disabled: params.disabled,
|
|
436
466
|
},
|
|
467
|
+
abortSignal: params.abortSignal,
|
|
437
468
|
};
|
|
438
469
|
}
|
|
439
470
|
updateQueryEngineUser(params) {
|
|
@@ -449,6 +480,7 @@ class VizzlyApi extends Api_1.Api {
|
|
|
449
480
|
query_engine_user_id: params.queryEngineUserId,
|
|
450
481
|
password: params.password,
|
|
451
482
|
},
|
|
483
|
+
abortSignal: params.abortSignal,
|
|
452
484
|
};
|
|
453
485
|
}
|
|
454
486
|
}
|
|
@@ -1,82 +1,84 @@
|
|
|
1
1
|
import { Api } from './Api';
|
|
2
2
|
import { Authentication } from './Authentication';
|
|
3
|
-
import { nVizzlyQueryEngine, Request, extraHeaders, CreateDashboardParams, UpdateDashboardParams, UpdateGlobalLibraryParams, GlobalLibrary, CreateGlobalLibraryParams, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI } from '../types';
|
|
3
|
+
import { nVizzlyQueryEngine, Request, extraHeaders, CreateDashboardParams, UpdateDashboardParams, UpdateGlobalLibraryParams, GlobalLibrary, CreateGlobalLibraryParams, GlobalLibraryPermission, GlobalLibraryPermissionFromAPI, RequestParams } from '../types';
|
|
4
4
|
export declare class VizzlyQueryEngineApi extends Api {
|
|
5
5
|
constructor(auth: Authentication, host: string, extraHeaders?: extraHeaders);
|
|
6
|
-
buildCreateDashboardRequest(params: CreateDashboardParams): Request<CreateDashboardParams & {
|
|
6
|
+
buildCreateDashboardRequest(params: RequestParams<CreateDashboardParams>): Request<CreateDashboardParams & {
|
|
7
7
|
dashboardAccessToken: string;
|
|
8
8
|
}>;
|
|
9
|
-
buildFetchDashboardAccessTokensRequest(): Request<{
|
|
9
|
+
buildFetchDashboardAccessTokensRequest(params?: RequestParams): Request<{
|
|
10
10
|
projectAdminOverrideToken: string | undefined;
|
|
11
11
|
dashboardAccessToken: string;
|
|
12
12
|
}>;
|
|
13
|
-
fetchGlobalLibraryAccessTokens(): Promise<import("../types").Response<{
|
|
13
|
+
fetchGlobalLibraryAccessTokens(params?: RequestParams): Promise<import("../types").Response<{
|
|
14
14
|
global_libraries: GlobalLibrary[];
|
|
15
15
|
permissions: Array<GlobalLibraryPermissionFromAPI>;
|
|
16
16
|
}>>;
|
|
17
|
-
buildFetchGlobalLibraryAccessTokensRequest(): Request<{
|
|
17
|
+
buildFetchGlobalLibraryAccessTokensRequest(params?: RequestParams): Request<{
|
|
18
18
|
projectAdminOverrideToken: string | undefined;
|
|
19
19
|
dashboardAccessToken: string;
|
|
20
20
|
}>;
|
|
21
|
-
buildFetchDashboardsRequest(
|
|
22
|
-
|
|
21
|
+
buildFetchDashboardsRequest(params: RequestParams<{
|
|
22
|
+
dashboardSessionAccessTokens: string[];
|
|
23
|
+
}>): Request<{}>;
|
|
24
|
+
createConfigFromUpload(createConfigFromUploadParams: RequestParams<nVizzlyQueryEngine.CreateConfigFromUploadParams>): Promise<import("../types").Response<unknown>>;
|
|
23
25
|
private buildCreateConfigFromUploadRequest;
|
|
24
|
-
createResults(params: nVizzlyQueryEngine.CreateResultsParams): Promise<import("../types").Response<unknown>>;
|
|
26
|
+
createResults(params: RequestParams<nVizzlyQueryEngine.CreateResultsParams>): Promise<import("../types").Response<unknown>>;
|
|
25
27
|
private buildCreateResultsRequest;
|
|
26
|
-
createSqlPreview(params: nVizzlyQueryEngine.CreateSqlPreviewParams): Promise<import("../types").Response<{
|
|
28
|
+
createSqlPreview(params: RequestParams<nVizzlyQueryEngine.CreateSqlPreviewParams>): Promise<import("../types").Response<{
|
|
27
29
|
message: string;
|
|
28
30
|
}>>;
|
|
29
|
-
buildCreateSqlPreviewRequest(params: nVizzlyQueryEngine.CreateSqlPreviewParams): Request<{}>;
|
|
30
|
-
createQueryEngineUser(params: nVizzlyQueryEngine.CreateQueryEngineUserParams): Promise<import("../types").Response<unknown>>;
|
|
31
|
-
buildCreateQueryEngineUserRequest(params: nVizzlyQueryEngine.CreateQueryEngineUserParams): Request<{}>;
|
|
32
|
-
fetchDataSets(): Promise<import("../types").Response<unknown>>;
|
|
33
|
-
buildFetchDataSetsRequest(): Request<{}>;
|
|
34
|
-
fetchSelfHostedQueryEngineConfig(): Promise<import("../types").Response<unknown>>;
|
|
35
|
-
buildFetchSelfHostedQueryEngineConfigRequest(): Request<{}>;
|
|
36
|
-
fetchProject(): Promise<import("../types").Response<unknown>>;
|
|
37
|
-
buildFetchProjectRequest(): Request<{}>;
|
|
38
|
-
getStarted(params: nVizzlyQueryEngine.GetStartedParams): Promise<import("../types").Response<{
|
|
31
|
+
buildCreateSqlPreviewRequest(params: RequestParams<nVizzlyQueryEngine.CreateSqlPreviewParams>): Request<{}>;
|
|
32
|
+
createQueryEngineUser(params: RequestParams<nVizzlyQueryEngine.CreateQueryEngineUserParams>): Promise<import("../types").Response<unknown>>;
|
|
33
|
+
buildCreateQueryEngineUserRequest(params: RequestParams<nVizzlyQueryEngine.CreateQueryEngineUserParams>): Request<{}>;
|
|
34
|
+
fetchDataSets(params: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
35
|
+
buildFetchDataSetsRequest(params?: RequestParams): Request<{}>;
|
|
36
|
+
fetchSelfHostedQueryEngineConfig(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
37
|
+
buildFetchSelfHostedQueryEngineConfigRequest(params?: RequestParams): Request<{}>;
|
|
38
|
+
fetchProject(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
39
|
+
buildFetchProjectRequest(params?: RequestParams): Request<{}>;
|
|
40
|
+
getStarted(params: RequestParams<nVizzlyQueryEngine.GetStartedParams>): Promise<import("../types").Response<{
|
|
39
41
|
reason?: string | undefined;
|
|
40
42
|
}>>;
|
|
41
|
-
buildGetStartedRequest(params: nVizzlyQueryEngine.GetStartedParams): Request<{}>;
|
|
42
|
-
getTeamMembers(): Promise<import("../types").Response<unknown>>;
|
|
43
|
-
buildGetTeamMembersRequest(): Request<{}>;
|
|
44
|
-
isVizzly(): Promise<import("../types").Response<unknown>>;
|
|
45
|
-
buildIsVizzlyRequest(): Request<{}>;
|
|
46
|
-
saveConfig(params: nVizzlyQueryEngine.SaveConfigParams): Promise<import("../types").Response<unknown>>;
|
|
47
|
-
buildSaveConfigRequest(params: nVizzlyQueryEngine.SaveConfigParams): Request<{}>;
|
|
48
|
-
saveConnection(params: nVizzlyQueryEngine.SaveConnectionParams): Promise<import("../types").Response<unknown>>;
|
|
49
|
-
buildSaveConnectionRequest(params: nVizzlyQueryEngine.SaveConnectionParams): Request<{}>;
|
|
50
|
-
signInWithQueryEngineAccessToken(): Promise<import("../types").Response<unknown>>;
|
|
51
|
-
buildSignInWithQueryEngineAccessTokenRequest(): Request<{}>;
|
|
52
|
-
signInWithEmailAndPassword(params: nVizzlyQueryEngine.SignInWithEmailAndPasswordParams): Promise<import("../types").Response<unknown>>;
|
|
53
|
-
buildSignInWithEmailAndPasswordRequest(params: nVizzlyQueryEngine.SignInWithEmailAndPasswordParams): Request<{}>;
|
|
54
|
-
status(): Promise<import("../types").Response<unknown>>;
|
|
55
|
-
buildStatusRequest(): Request<{}>;
|
|
56
|
-
createGlobalLibrary(params: CreateGlobalLibraryParams): Promise<{
|
|
43
|
+
buildGetStartedRequest(params: RequestParams<nVizzlyQueryEngine.GetStartedParams>): Request<{}>;
|
|
44
|
+
getTeamMembers(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
45
|
+
buildGetTeamMembersRequest(params?: RequestParams): Request<{}>;
|
|
46
|
+
isVizzly(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
47
|
+
buildIsVizzlyRequest(params?: RequestParams): Request<{}>;
|
|
48
|
+
saveConfig(params: RequestParams<nVizzlyQueryEngine.SaveConfigParams>): Promise<import("../types").Response<unknown>>;
|
|
49
|
+
buildSaveConfigRequest(params: RequestParams<nVizzlyQueryEngine.SaveConfigParams>): Request<{}>;
|
|
50
|
+
saveConnection(params: RequestParams<nVizzlyQueryEngine.SaveConnectionParams>): Promise<import("../types").Response<unknown>>;
|
|
51
|
+
buildSaveConnectionRequest(params: RequestParams<nVizzlyQueryEngine.SaveConnectionParams>): Request<{}>;
|
|
52
|
+
signInWithQueryEngineAccessToken(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
53
|
+
buildSignInWithQueryEngineAccessTokenRequest(params?: RequestParams): Request<{}>;
|
|
54
|
+
signInWithEmailAndPassword(params: RequestParams<nVizzlyQueryEngine.SignInWithEmailAndPasswordParams>): Promise<import("../types").Response<unknown>>;
|
|
55
|
+
buildSignInWithEmailAndPasswordRequest(params: RequestParams<nVizzlyQueryEngine.SignInWithEmailAndPasswordParams>): Request<{}>;
|
|
56
|
+
status(params?: RequestParams): Promise<import("../types").Response<unknown>>;
|
|
57
|
+
buildStatusRequest(params?: RequestParams): Request<{}>;
|
|
58
|
+
createGlobalLibrary(params: RequestParams<CreateGlobalLibraryParams>): Promise<{
|
|
57
59
|
global_library: GlobalLibrary;
|
|
58
60
|
permissions: Array<GlobalLibraryPermission>;
|
|
59
61
|
}>;
|
|
60
|
-
buildCreateGlobalLibraryRequest(params: CreateGlobalLibraryParams): Request<{}>;
|
|
61
|
-
fetchGlobalLibraries(params: {
|
|
62
|
+
buildCreateGlobalLibraryRequest(params: RequestParams<CreateGlobalLibraryParams>): Request<{}>;
|
|
63
|
+
fetchGlobalLibraries(params: RequestParams<{
|
|
62
64
|
globalLibraryAccessTokens: string[];
|
|
63
|
-
}): Promise<import("../types").Response<{
|
|
65
|
+
}>): Promise<import("../types").Response<{
|
|
64
66
|
found: GlobalLibrary[];
|
|
65
67
|
not_found: string[];
|
|
66
68
|
}>>;
|
|
67
|
-
buildFetchGlobalLibrariesRequest(params: {
|
|
69
|
+
buildFetchGlobalLibrariesRequest(params: RequestParams<{
|
|
68
70
|
globalLibraryAccessTokens: string[];
|
|
69
|
-
}): Request<{
|
|
71
|
+
}>): Request<{
|
|
70
72
|
globalLibraryAccessTokens: string[];
|
|
71
73
|
}>;
|
|
72
|
-
updateGlobalLibrary(params: UpdateGlobalLibraryParams): Promise<import("../types").Response<{
|
|
74
|
+
updateGlobalLibrary(params: RequestParams<UpdateGlobalLibraryParams>): Promise<import("../types").Response<{
|
|
73
75
|
global_library: GlobalLibrary;
|
|
74
76
|
}>>;
|
|
75
|
-
buildUpdateGlobalLibraryRequest(params: UpdateGlobalLibraryParams): Request<{}>;
|
|
76
|
-
updateDashboard(params: UpdateDashboardParams): Promise<import("../types").Response<unknown>>;
|
|
77
|
-
buildUpdateDashboardRequest(params: UpdateDashboardParams): Request<{}>;
|
|
78
|
-
updateQueryEngineUser(params: nVizzlyQueryEngine.UpdateQueryEngineUserParams): Promise<import("../types").Response<unknown>>;
|
|
79
|
-
buildUpdateQueryEngineUserRequest(params: nVizzlyQueryEngine.UpdateQueryEngineUserParams): Request<{}>;
|
|
80
|
-
uploadDataToVizzlyCloud(params: nVizzlyQueryEngine.UploadDataToVizzlyCloudParams): Promise<import("../types").Response<unknown>>;
|
|
81
|
-
buildUploadDataToVizzlyCloudRequest(params: nVizzlyQueryEngine.UploadDataToVizzlyCloudParams): Request<{}>;
|
|
77
|
+
buildUpdateGlobalLibraryRequest(params: RequestParams<UpdateGlobalLibraryParams>): Request<{}>;
|
|
78
|
+
updateDashboard(params: RequestParams<UpdateDashboardParams>): Promise<import("../types").Response<unknown>>;
|
|
79
|
+
buildUpdateDashboardRequest(params: RequestParams<UpdateDashboardParams>): Request<{}>;
|
|
80
|
+
updateQueryEngineUser(params: RequestParams<nVizzlyQueryEngine.UpdateQueryEngineUserParams>): Promise<import("../types").Response<unknown>>;
|
|
81
|
+
buildUpdateQueryEngineUserRequest(params: RequestParams<nVizzlyQueryEngine.UpdateQueryEngineUserParams>): Request<{}>;
|
|
82
|
+
uploadDataToVizzlyCloud(params: RequestParams<nVizzlyQueryEngine.UploadDataToVizzlyCloudParams>): Promise<import("../types").Response<unknown>>;
|
|
83
|
+
buildUploadDataToVizzlyCloudRequest(params: RequestParams<nVizzlyQueryEngine.UploadDataToVizzlyCloudParams>): Request<{}>;
|
|
82
84
|
}
|
|
@@ -23,6 +23,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
23
23
|
return {
|
|
24
24
|
path: '/api/v1/dashboard',
|
|
25
25
|
method: 'post',
|
|
26
|
+
abortSignal: params.abortSignal,
|
|
26
27
|
body: {
|
|
27
28
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
28
29
|
definition: params.definition,
|
|
@@ -32,37 +33,40 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
32
33
|
},
|
|
33
34
|
};
|
|
34
35
|
}
|
|
35
|
-
buildFetchDashboardAccessTokensRequest() {
|
|
36
|
+
buildFetchDashboardAccessTokensRequest(params) {
|
|
36
37
|
return {
|
|
37
38
|
path: '/api/v1/dashboard/access',
|
|
38
39
|
method: 'post',
|
|
40
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
39
41
|
body: {
|
|
40
42
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
41
43
|
projectAdminOverrideToken: this.auth.getProjectAdminOverrideToken(),
|
|
42
44
|
},
|
|
43
45
|
};
|
|
44
46
|
}
|
|
45
|
-
fetchGlobalLibraryAccessTokens() {
|
|
47
|
+
fetchGlobalLibraryAccessTokens(params) {
|
|
46
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
return yield this.execute(this.buildFetchGlobalLibraryAccessTokensRequest());
|
|
49
|
+
return yield this.execute(this.buildFetchGlobalLibraryAccessTokensRequest(params));
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
|
-
buildFetchGlobalLibraryAccessTokensRequest() {
|
|
52
|
+
buildFetchGlobalLibraryAccessTokensRequest(params) {
|
|
51
53
|
return {
|
|
52
54
|
path: '/api/v1/global-library/access',
|
|
53
55
|
method: 'post',
|
|
56
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
54
57
|
body: {
|
|
55
58
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
56
59
|
projectAdminOverrideToken: this.auth.getProjectAdminOverrideToken(),
|
|
57
60
|
},
|
|
58
61
|
};
|
|
59
62
|
}
|
|
60
|
-
buildFetchDashboardsRequest(
|
|
63
|
+
buildFetchDashboardsRequest(params) {
|
|
61
64
|
return {
|
|
62
65
|
path: '/api/v1/get-dashboards',
|
|
63
66
|
method: 'post',
|
|
67
|
+
abortSignal: params.abortSignal,
|
|
64
68
|
body: {
|
|
65
|
-
dashboardAccessTokens: dashboardSessionAccessTokens,
|
|
69
|
+
dashboardAccessTokens: params.dashboardSessionAccessTokens,
|
|
66
70
|
},
|
|
67
71
|
};
|
|
68
72
|
}
|
|
@@ -75,6 +79,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
75
79
|
return {
|
|
76
80
|
path: `/api/v1/create-config-from-upload`,
|
|
77
81
|
method: 'post',
|
|
82
|
+
abortSignal: params.abortSignal,
|
|
78
83
|
body: {
|
|
79
84
|
queryEngineAccessToken: this.auth.getQueryEngineAccessToken(),
|
|
80
85
|
table: params.table,
|
|
@@ -91,6 +96,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
91
96
|
return {
|
|
92
97
|
path: `/api/v1/create-results`,
|
|
93
98
|
method: 'post',
|
|
99
|
+
abortSignal: params.abortSignal,
|
|
94
100
|
body: {
|
|
95
101
|
queries: params.queries,
|
|
96
102
|
virtualFields: {},
|
|
@@ -111,6 +117,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
111
117
|
return {
|
|
112
118
|
path: `/api/v1/create-sql-preview`,
|
|
113
119
|
method: 'post',
|
|
120
|
+
abortSignal: params.abortSignal,
|
|
114
121
|
body: {
|
|
115
122
|
sql: params.sql,
|
|
116
123
|
parameters: params.parameters,
|
|
@@ -127,51 +134,55 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
127
134
|
return {
|
|
128
135
|
path: `/api/v1/query-engine-user`,
|
|
129
136
|
method: 'post',
|
|
137
|
+
abortSignal: params.abortSignal,
|
|
130
138
|
body: {
|
|
131
139
|
email: params.email,
|
|
132
140
|
password: params.password,
|
|
133
141
|
},
|
|
134
142
|
};
|
|
135
143
|
}
|
|
136
|
-
fetchDataSets() {
|
|
144
|
+
fetchDataSets(params) {
|
|
137
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
const request = this.buildFetchDataSetsRequest();
|
|
146
|
+
const request = this.buildFetchDataSetsRequest(params);
|
|
139
147
|
const result = yield this.execute(request);
|
|
140
148
|
if (result.status === 200)
|
|
141
149
|
return result;
|
|
142
150
|
throw new FailedToResolveDataSets_1.FailedToResolveDataSets(`Failed to resolve data sets from ${request.path}. Received status ${result.status}`);
|
|
143
151
|
});
|
|
144
152
|
}
|
|
145
|
-
buildFetchDataSetsRequest() {
|
|
153
|
+
buildFetchDataSetsRequest(params) {
|
|
146
154
|
return {
|
|
147
155
|
path: `/api/v1/resolve-data-sets`,
|
|
148
156
|
method: 'post',
|
|
157
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
149
158
|
body: {
|
|
150
159
|
integritySignature: this.auth.getDataAccessToken(),
|
|
151
160
|
},
|
|
152
161
|
};
|
|
153
162
|
}
|
|
154
|
-
fetchSelfHostedQueryEngineConfig() {
|
|
163
|
+
fetchSelfHostedQueryEngineConfig(params) {
|
|
155
164
|
return __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
return this.execute(this.buildFetchSelfHostedQueryEngineConfigRequest());
|
|
165
|
+
return this.execute(this.buildFetchSelfHostedQueryEngineConfigRequest(params));
|
|
157
166
|
});
|
|
158
167
|
}
|
|
159
|
-
buildFetchSelfHostedQueryEngineConfigRequest() {
|
|
168
|
+
buildFetchSelfHostedQueryEngineConfigRequest(params) {
|
|
160
169
|
return {
|
|
161
170
|
path: `/api/v1/support`,
|
|
162
171
|
method: 'post',
|
|
172
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
163
173
|
body: {},
|
|
164
174
|
};
|
|
165
175
|
}
|
|
166
|
-
fetchProject() {
|
|
176
|
+
fetchProject(params) {
|
|
167
177
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
return this.execute(this.buildFetchProjectRequest());
|
|
178
|
+
return this.execute(this.buildFetchProjectRequest(params));
|
|
169
179
|
});
|
|
170
180
|
}
|
|
171
|
-
buildFetchProjectRequest() {
|
|
181
|
+
buildFetchProjectRequest(params) {
|
|
172
182
|
return {
|
|
173
183
|
path: `/api/v1/project`,
|
|
174
184
|
method: 'get',
|
|
185
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
175
186
|
body: {},
|
|
176
187
|
};
|
|
177
188
|
}
|
|
@@ -190,32 +201,35 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
190
201
|
return {
|
|
191
202
|
path: `/api/v2/get-started`,
|
|
192
203
|
method: 'post',
|
|
204
|
+
abortSignal: params.abortSignal,
|
|
193
205
|
body: {
|
|
194
206
|
email: params.email,
|
|
195
207
|
password: params.password,
|
|
196
208
|
},
|
|
197
209
|
};
|
|
198
210
|
}
|
|
199
|
-
getTeamMembers() {
|
|
211
|
+
getTeamMembers(params) {
|
|
200
212
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
return this.execute(this.buildGetTeamMembersRequest());
|
|
213
|
+
return this.execute(this.buildGetTeamMembersRequest(params));
|
|
202
214
|
});
|
|
203
215
|
}
|
|
204
|
-
buildGetTeamMembersRequest() {
|
|
216
|
+
buildGetTeamMembersRequest(params) {
|
|
205
217
|
return {
|
|
206
218
|
path: `/api/v1/team-members`,
|
|
207
219
|
method: 'get',
|
|
220
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
208
221
|
};
|
|
209
222
|
}
|
|
210
|
-
isVizzly() {
|
|
223
|
+
isVizzly(params) {
|
|
211
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
return this.execute(this.buildIsVizzlyRequest());
|
|
225
|
+
return this.execute(this.buildIsVizzlyRequest(params));
|
|
213
226
|
});
|
|
214
227
|
}
|
|
215
|
-
buildIsVizzlyRequest() {
|
|
228
|
+
buildIsVizzlyRequest(params) {
|
|
216
229
|
return {
|
|
217
230
|
path: `/api/is-vizzly`,
|
|
218
231
|
method: 'get',
|
|
232
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
219
233
|
};
|
|
220
234
|
}
|
|
221
235
|
saveConfig(params) {
|
|
@@ -227,6 +241,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
227
241
|
return {
|
|
228
242
|
path: `/api/v1/save-config`,
|
|
229
243
|
method: 'post',
|
|
244
|
+
abortSignal: params.abortSignal,
|
|
230
245
|
body: {
|
|
231
246
|
config: params.config,
|
|
232
247
|
},
|
|
@@ -241,21 +256,23 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
241
256
|
return {
|
|
242
257
|
path: `/api/v1/save-connection`,
|
|
243
258
|
method: 'post',
|
|
259
|
+
abortSignal: params.abortSignal,
|
|
244
260
|
body: {
|
|
245
261
|
connection: params.connection,
|
|
246
262
|
client: params.client,
|
|
247
263
|
},
|
|
248
264
|
};
|
|
249
265
|
}
|
|
250
|
-
signInWithQueryEngineAccessToken() {
|
|
266
|
+
signInWithQueryEngineAccessToken(params) {
|
|
251
267
|
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
-
return this.execute(this.buildSignInWithQueryEngineAccessTokenRequest());
|
|
268
|
+
return this.execute(this.buildSignInWithQueryEngineAccessTokenRequest(params));
|
|
253
269
|
});
|
|
254
270
|
}
|
|
255
|
-
buildSignInWithQueryEngineAccessTokenRequest() {
|
|
271
|
+
buildSignInWithQueryEngineAccessTokenRequest(params) {
|
|
256
272
|
return {
|
|
257
273
|
path: `/api/v1/sign-in`,
|
|
258
274
|
method: 'post',
|
|
275
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
259
276
|
body: {},
|
|
260
277
|
};
|
|
261
278
|
}
|
|
@@ -268,21 +285,23 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
268
285
|
return {
|
|
269
286
|
path: `/api/v1/sign-in`,
|
|
270
287
|
method: 'post',
|
|
288
|
+
abortSignal: params.abortSignal,
|
|
271
289
|
body: {
|
|
272
290
|
email: params.email,
|
|
273
291
|
password: params.password,
|
|
274
292
|
},
|
|
275
293
|
};
|
|
276
294
|
}
|
|
277
|
-
status() {
|
|
295
|
+
status(params) {
|
|
278
296
|
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
-
return this.execute(this.buildStatusRequest());
|
|
297
|
+
return this.execute(this.buildStatusRequest(params));
|
|
280
298
|
});
|
|
281
299
|
}
|
|
282
|
-
buildStatusRequest() {
|
|
300
|
+
buildStatusRequest(params) {
|
|
283
301
|
return {
|
|
284
302
|
path: `/api/status`,
|
|
285
303
|
method: 'post',
|
|
304
|
+
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
286
305
|
body: {},
|
|
287
306
|
};
|
|
288
307
|
}
|
|
@@ -298,6 +317,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
298
317
|
return {
|
|
299
318
|
path: '/api/v1/global-library',
|
|
300
319
|
method: 'post',
|
|
320
|
+
abortSignal: params.abortSignal,
|
|
301
321
|
body: {
|
|
302
322
|
dashboardAccessToken: this.auth.getDashboardAccessToken(),
|
|
303
323
|
parentGlobalLibraryId: params.parentGlobalLibraryId,
|
|
@@ -315,6 +335,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
315
335
|
return {
|
|
316
336
|
path: '/api/v1/get-global-libraries',
|
|
317
337
|
method: 'post',
|
|
338
|
+
abortSignal: params.abortSignal,
|
|
318
339
|
body: {
|
|
319
340
|
globalLibraryAccessTokens: params.globalLibraryAccessTokens,
|
|
320
341
|
},
|
|
@@ -329,6 +350,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
329
350
|
return {
|
|
330
351
|
path: '/api/v1/global-library',
|
|
331
352
|
method: 'put',
|
|
353
|
+
abortSignal: params.abortSignal,
|
|
332
354
|
body: {
|
|
333
355
|
globalLibrarySessionToken: params.globalLibrarySessionToken,
|
|
334
356
|
deleted: params.deleted,
|
|
@@ -345,6 +367,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
345
367
|
return {
|
|
346
368
|
path: `/api/v1/dashboard`,
|
|
347
369
|
method: 'put',
|
|
370
|
+
abortSignal: params.abortSignal,
|
|
348
371
|
body: {
|
|
349
372
|
dashboardSessionToken: params.dashboardPermission.token,
|
|
350
373
|
definition: params.definition,
|
|
@@ -362,6 +385,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
362
385
|
return {
|
|
363
386
|
path: `/api/v1/query-engine-user`,
|
|
364
387
|
method: 'put',
|
|
388
|
+
abortSignal: params.abortSignal,
|
|
365
389
|
body: {
|
|
366
390
|
queryEngineUserId: params.queryEngineUserId,
|
|
367
391
|
password: params.password,
|
|
@@ -377,6 +401,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
|
|
|
377
401
|
return {
|
|
378
402
|
path: `/api/v1/ingest`,
|
|
379
403
|
method: 'post',
|
|
404
|
+
abortSignal: params.abortSignal,
|
|
380
405
|
body: {
|
|
381
406
|
queryEngineAccessToken: this.auth.getQueryEngineAccessToken(),
|
|
382
407
|
ingest: params.ingest,
|
package/dist/types.d.ts
CHANGED
|
@@ -61,6 +61,9 @@ export type APIs = {
|
|
|
61
61
|
export type extraHeaders = () => {
|
|
62
62
|
[key: string]: string;
|
|
63
63
|
};
|
|
64
|
+
export type RequestParams<T = {}> = T & {
|
|
65
|
+
abortSignal?: AbortSignal;
|
|
66
|
+
};
|
|
64
67
|
export type AuthParams = {
|
|
65
68
|
projectAdminOverrideToken?: string;
|
|
66
69
|
queryEngineAccessToken?: string;
|