@vizzly/api-client 0.0.53 → 0.0.56
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.
|
@@ -48,10 +48,14 @@ export declare class VizzlyApi extends Api {
|
|
|
48
48
|
permissions: Array<GlobalLibraryPermissionFromAPI>;
|
|
49
49
|
}>;
|
|
50
50
|
buildCreateGlobalLibraryRequest(params: RequestParams<CreateGlobalLibraryParams>): Request<{}>;
|
|
51
|
-
getProjects(params?: RequestParams
|
|
51
|
+
getProjects(params?: RequestParams<{
|
|
52
|
+
withParentDashboards?: boolean;
|
|
53
|
+
}>): Promise<{
|
|
52
54
|
projects: Array<ProjectFromAPI>;
|
|
53
55
|
}>;
|
|
54
|
-
buildGetProjectsRequest(params?: RequestParams
|
|
56
|
+
buildGetProjectsRequest(params?: RequestParams<{
|
|
57
|
+
withParentDashboards?: boolean;
|
|
58
|
+
}>): Request<{}>;
|
|
55
59
|
createProjectApiKey(params: RequestParams<nVizzlyApi.CreateProjectApiKeyParams>): Promise<Response<{
|
|
56
60
|
api_key: string;
|
|
57
61
|
}>>;
|
|
@@ -65,7 +69,24 @@ export declare class VizzlyApi extends Api {
|
|
|
65
69
|
buildCreateManagedQueryEngineProjectRequest(params?: RequestParams): Request<{}>;
|
|
66
70
|
createVizzlyConfigVersion(params: RequestParams<nVizzlyApi.CreateVizzlyConfigVersionParams>): Promise<Response<unknown>>;
|
|
67
71
|
buildCreateVizzlyConfigVersionRequest(params: RequestParams<nVizzlyApi.CreateVizzlyConfigVersionParams>): Request<{}>;
|
|
72
|
+
duplicateDashboards(params: RequestParams<nVizzlyApi.DuplicateDashboardParams>): Promise<Response<{
|
|
73
|
+
copies: {
|
|
74
|
+
[copiedDashboardId: string]: {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}>>;
|
|
80
|
+
buildDuplicateDashboardsRequest(params: RequestParams<nVizzlyApi.DuplicateDashboardParams>): Request<{
|
|
81
|
+
dashboardIds: string[];
|
|
82
|
+
}>;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated
|
|
85
|
+
*/
|
|
68
86
|
duplicateParentDashboard(params: RequestParams<nVizzlyApi.DuplicateParentDashboardParams>): Promise<Response<unknown>>;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated
|
|
89
|
+
*/
|
|
69
90
|
buildDuplicateParentDashboardRequest(params: RequestParams<nVizzlyApi.DuplicateParentDashboardParams>): Request<{}>;
|
|
70
91
|
getConnection(params: RequestParams<nVizzlyApi.GetConnectionParams>): Promise<{
|
|
71
92
|
encryptedCredentials: string | null;
|
package/dist/models/VizzlyApi.js
CHANGED
|
@@ -156,8 +156,9 @@ class VizzlyApi extends Api_1.Api {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
buildGetProjectsRequest(params) {
|
|
159
|
+
const queryString = (params === null || params === void 0 ? void 0 : params.withParentDashboards) ? '?with_parent_dashboards=true' : '';
|
|
159
160
|
return {
|
|
160
|
-
path: `/api/v2/projects`,
|
|
161
|
+
path: `/api/v2/projects${queryString}`,
|
|
161
162
|
method: 'get',
|
|
162
163
|
abortSignal: params === null || params === void 0 ? void 0 : params.abortSignal,
|
|
163
164
|
};
|
|
@@ -249,11 +250,33 @@ class VizzlyApi extends Api_1.Api {
|
|
|
249
250
|
abortSignal: params.abortSignal,
|
|
250
251
|
};
|
|
251
252
|
}
|
|
253
|
+
duplicateDashboards(params) {
|
|
254
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
+
return yield this.execute(this.buildDuplicateDashboardsRequest(params));
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
buildDuplicateDashboardsRequest(params) {
|
|
259
|
+
return {
|
|
260
|
+
path: `/api/v2/duplicate-dashboards`,
|
|
261
|
+
method: 'post',
|
|
262
|
+
body: {
|
|
263
|
+
dashboardIds: params.dashboardIds,
|
|
264
|
+
},
|
|
265
|
+
abortSignal: params.abortSignal,
|
|
266
|
+
acceptedAuthParams: ['projectApiKey'],
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @deprecated
|
|
271
|
+
*/
|
|
252
272
|
duplicateParentDashboard(params) {
|
|
253
273
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
274
|
return yield this.execute(this.buildDuplicateParentDashboardRequest(params));
|
|
255
275
|
});
|
|
256
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* @deprecated
|
|
279
|
+
*/
|
|
257
280
|
buildDuplicateParentDashboardRequest(params) {
|
|
258
281
|
return {
|
|
259
282
|
path: `/api/v2/duplicate-parent-dashboard`,
|
|
@@ -307,8 +330,9 @@ class VizzlyApi extends Api_1.Api {
|
|
|
307
330
|
});
|
|
308
331
|
}
|
|
309
332
|
buildGetProjectRequest(params) {
|
|
333
|
+
const queryString = params.withParentDashboards ? '?with_parent_dashboards=true' : '';
|
|
310
334
|
return {
|
|
311
|
-
path: `/api/v3/project/${params.projectId}`,
|
|
335
|
+
path: `/api/v3/project/${params.projectId}${queryString}`,
|
|
312
336
|
method: 'get',
|
|
313
337
|
abortSignal: params.abortSignal,
|
|
314
338
|
acceptedAuthParams: ['projectApiKey', 'projectAccessToken', 'appSessionToken'],
|
package/dist/types/project.d.ts
CHANGED
|
@@ -8,7 +8,13 @@ export type ProjectFromAPI = {
|
|
|
8
8
|
type: ProjectType;
|
|
9
9
|
created_at: Date;
|
|
10
10
|
share_links?: ShareLink[];
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* To include parent dashboards, use the withParentDashboards param.
|
|
13
|
+
* However only do this when strictly necessary as it inceases
|
|
14
|
+
* load on the Vizzly API for projects that create many parent dashboards, like
|
|
15
|
+
* the GTi next gen application.
|
|
16
|
+
* */
|
|
17
|
+
parent_dashboards: DashboardFromAPI[] | null;
|
|
12
18
|
parent_global_libraries: GlobalLibrary[];
|
|
13
19
|
key_pairs: RawKeyPair[];
|
|
14
20
|
encrypted_encryption_secret: string | null;
|
package/dist/types.d.ts
CHANGED
|
@@ -52,7 +52,6 @@ export type CreateGlobalLibraryParams = {
|
|
|
52
52
|
usage_metadata?: FieldUsage;
|
|
53
53
|
};
|
|
54
54
|
export type FieldUsage = {
|
|
55
|
-
lowest_date_granularity_function: string | null;
|
|
56
55
|
fields: Array<{
|
|
57
56
|
data_set_id: string;
|
|
58
57
|
field_id: string;
|
|
@@ -221,6 +220,7 @@ export declare namespace nVizzlyApi {
|
|
|
221
220
|
};
|
|
222
221
|
type GetProjectParams = {
|
|
223
222
|
projectId: string;
|
|
223
|
+
withParentDashboards?: boolean;
|
|
224
224
|
};
|
|
225
225
|
type GetManagedQueryEngineKeyPairParams = {
|
|
226
226
|
managedProjectId: string;
|
|
@@ -232,6 +232,9 @@ export declare namespace nVizzlyApi {
|
|
|
232
232
|
type DuplicateParentDashboardParams = {
|
|
233
233
|
dashboardId: string;
|
|
234
234
|
};
|
|
235
|
+
type DuplicateDashboardParams = {
|
|
236
|
+
dashboardIds: string[];
|
|
237
|
+
};
|
|
235
238
|
type CreateVizzlyConfigVersionParams = {
|
|
236
239
|
projectId: string;
|
|
237
240
|
encryptedConfig: string;
|