@vizzly/api-client 0.0.55 → 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): Promise<{
51
+ getProjects(params?: RequestParams<{
52
+ withParentDashboards?: boolean;
53
+ }>): Promise<{
52
54
  projects: Array<ProjectFromAPI>;
53
55
  }>;
54
- buildGetProjectsRequest(params?: RequestParams): Request<{}>;
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
  }>>;
@@ -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
  };
@@ -262,7 +263,7 @@ class VizzlyApi extends Api_1.Api {
262
263
  dashboardIds: params.dashboardIds,
263
264
  },
264
265
  abortSignal: params.abortSignal,
265
- acceptedAuthParams: ['projectApiKey']
266
+ acceptedAuthParams: ['projectApiKey'],
266
267
  };
267
268
  }
268
269
  /**
@@ -329,8 +330,9 @@ class VizzlyApi extends Api_1.Api {
329
330
  });
330
331
  }
331
332
  buildGetProjectRequest(params) {
333
+ const queryString = params.withParentDashboards ? '?with_parent_dashboards=true' : '';
332
334
  return {
333
- path: `/api/v3/project/${params.projectId}`,
335
+ path: `/api/v3/project/${params.projectId}${queryString}`,
334
336
  method: 'get',
335
337
  abortSignal: params.abortSignal,
336
338
  acceptedAuthParams: ['projectApiKey', 'projectAccessToken', 'appSessionToken'],
@@ -448,7 +448,7 @@ class VizzlyQueryEngineApi extends Api_1.Api {
448
448
  body: {
449
449
  company: { id: params.companyId },
450
450
  },
451
- acceptedAuthParams: ['queryEngineApiKey']
451
+ acceptedAuthParams: ['queryEngineApiKey'],
452
452
  };
453
453
  }
454
454
  }
@@ -8,7 +8,13 @@ export type ProjectFromAPI = {
8
8
  type: ProjectType;
9
9
  created_at: Date;
10
10
  share_links?: ShareLink[];
11
- parent_dashboards: DashboardFromAPI[];
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
@@ -220,6 +220,7 @@ export declare namespace nVizzlyApi {
220
220
  };
221
221
  type GetProjectParams = {
222
222
  projectId: string;
223
+ withParentDashboards?: boolean;
223
224
  };
224
225
  type GetManagedQueryEngineKeyPairParams = {
225
226
  managedProjectId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly/api-client",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "private": false,
5
5
  "license": "NONE",
6
6
  "source": "src/index.ts",