Skip to content

Commit f22689e

Browse files
committed
add missing interface
1 parent 7a17d6b commit f22689e

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

src/data-set.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
import { FuusorApiClient } from '.';
22

3+
export interface IFuusorDataSetResponse {
4+
Datasetid: string;
5+
DatasetName: string;
6+
DatasetType: string;
7+
Periods: {
8+
Begin: string;
9+
End: string;
10+
}[];
11+
DimensionFields: {
12+
Id: string;
13+
Name: string;
14+
Items: any[];
15+
}[];
16+
DateFields: IFuusorDataSetResponseItem[];
17+
ValueFields: IFuusorDataSetResponseItem[];
18+
DescriptionFields: IFuusorDataSetResponseItem[];
19+
Rows: any[];
20+
}
21+
22+
export interface IFuusorDataSetResponseItem {
23+
Id: string | number;
24+
Name: string;
25+
}
26+
327
export interface IFuusorDataSetOptions {
428
groupId: string;
529
datasetId: string;

src/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import got, { Got, Headers, Method, OptionsOfJSONResponseBody } from 'got';
2-
import { FuusorDataSet, IFuusorDataSetOptions } from './data-set';
2+
import { FuusorDataSet, IFuusorDataSetOptions, IFuusorDataSetResponse } from './data-set';
33
import { FuusorUser } from './user';
44
import { FuusorUserGroup } from './user-group';
55
import { HttpsAgent } from 'agentkeepalive';
@@ -160,7 +160,11 @@ export class FuusorApiClient {
160160
* @param includeHierarchies - Whether to include hierarchies in the response
161161
* @param includeConnectedDataSets - Whether to include connected datasets in the response
162162
*/
163-
async getDataSet(dataSetId: string, includeHierarchies: boolean = false, includeConnectedDataSets: boolean = false): Promise<any> {
163+
async getDataSet(
164+
dataSetId: string,
165+
includeHierarchies: boolean = false,
166+
includeConnectedDataSets: boolean = false
167+
): Promise<IFuusorDataSetResponse[]> {
164168
const params = {
165169
DatasetId: dataSetId,
166170
IncludeHierarchies: includeHierarchies,

0 commit comments

Comments
 (0)