@gooddata/sdk-backend-tiger 11.35.0-alpha.6 → 11.35.0-alpha.7
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/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/backend/workspace/genAI/index.d.ts +4 -1
- package/esm/backend/workspace/genAI/index.js +27 -0
- package/esm/convertors/fromBackend/AutomationConverter.d.ts +10 -1
- package/esm/convertors/fromBackend/AutomationConverter.js +35 -3
- package/esm/convertors/fromBackend/ParameterConverter.js +10 -5
- package/esm/convertors/toBackend/ParameterConverter.js +14 -14
- package/package.json +11 -11
package/esm/__version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.35.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.35.0-alpha.7";
|
|
2
2
|
export declare const LIB_DESCRIPTION = "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN";
|
|
3
3
|
export declare const LIB_NAME = "@gooddata/sdk-backend-tiger";
|
package/esm/__version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2021 GoodData Corporation
|
|
2
2
|
// DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
|
|
3
|
-
export const LIB_VERSION = "11.35.0-alpha.
|
|
3
|
+
export const LIB_VERSION = "11.35.0-alpha.7";
|
|
4
4
|
export const LIB_DESCRIPTION = "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN";
|
|
5
5
|
export const LIB_NAME = "@gooddata/sdk-backend-tiger";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IAnalyticsCatalogService, IChatConversations, IChatThread, IGenAIService, IKnowledgeDocumentsService, IMemoryItemsService, ISemanticQualityService, ISemanticSearchQuery } from "@gooddata/sdk-backend-spi";
|
|
1
|
+
import type { IAnalyticsCatalogService, IChatConversations, IChatThread, IDashboardSummary, IDashboardSummaryRequest, IGenAIService, IKnowledgeDocumentsService, IMemoryItemsService, ISemanticQualityService, ISemanticSearchQuery } from "@gooddata/sdk-backend-spi";
|
|
2
2
|
import { type DateNormalizer } from "../../../convertors/fromBackend/dateFormatting/types.js";
|
|
3
3
|
import { type TigerAuthenticatedCallGuard } from "../../../types/index.js";
|
|
4
4
|
export declare class GenAIService implements IGenAIService {
|
|
@@ -17,4 +17,7 @@ export declare class GenAIService implements IGenAIService {
|
|
|
17
17
|
getMemoryItems(): IMemoryItemsService;
|
|
18
18
|
getAnalyticsCatalog(): IAnalyticsCatalogService;
|
|
19
19
|
getSemanticQuality(): ISemanticQualityService;
|
|
20
|
+
summarizeDashboard(request: IDashboardSummaryRequest, options?: {
|
|
21
|
+
signal?: AbortSignal;
|
|
22
|
+
}): Promise<IDashboardSummary>;
|
|
20
23
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { ActionsApi_MetadataSync, ActionsApi_ResolveLlmProviders, } from "@gooddata/api-client-tiger/endpoints/actions";
|
|
3
|
+
import { GenAiApi_SummarizeDashboard } from "@gooddata/api-client-tiger/endpoints/genAI";
|
|
3
4
|
import { AnalyticsCatalogService } from "./AnalyticsCatalogService.js";
|
|
4
5
|
import { ChatConversationsService } from "./ChatConversations.js";
|
|
5
6
|
import { ChatThreadService } from "./ChatThread.js";
|
|
@@ -48,4 +49,30 @@ export class GenAIService {
|
|
|
48
49
|
getSemanticQuality() {
|
|
49
50
|
return new SemanticQualityService(this.authCall, this.workspaceId);
|
|
50
51
|
}
|
|
52
|
+
async summarizeDashboard(request, options) {
|
|
53
|
+
const response = await this.authCall((client) => GenAiApi_SummarizeDashboard(client.axios, client.basePath, {
|
|
54
|
+
workspaceId: this.workspaceId,
|
|
55
|
+
aiSummarizeRequest: {
|
|
56
|
+
dashboardId: request.dashboardId,
|
|
57
|
+
// Casts strip `| null` from our SPI types — the generated client still
|
|
58
|
+
// declares these required. Drop the casts once backend allows null.
|
|
59
|
+
visualizations: request.visualizations,
|
|
60
|
+
filterContext: request.filterContext,
|
|
61
|
+
},
|
|
62
|
+
}, { signal: options?.signal }));
|
|
63
|
+
return {
|
|
64
|
+
summary: response.data.summary,
|
|
65
|
+
filterContext: response.data.filterContext,
|
|
66
|
+
visualizationsIncluded: response.data.visualizationsIncluded.map((v) => ({
|
|
67
|
+
visualizationId: v.visualizationId,
|
|
68
|
+
title: v.title,
|
|
69
|
+
})),
|
|
70
|
+
visualizationsExcluded: response.data.visualizationsExcluded.map((v) => ({
|
|
71
|
+
visualizationId: v.visualizationId,
|
|
72
|
+
reason: v.reason,
|
|
73
|
+
title: v.title,
|
|
74
|
+
})),
|
|
75
|
+
generatedAt: response.data.generatedAt,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
51
78
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { type JsonApiAutomationOutIncludes, type JsonApiAutomationOutList, type JsonApiAutomationOutWithLinks, type JsonApiWorkspaceAutomationOutWithLinks } from "@gooddata/api-client-tiger";
|
|
2
|
-
import { type IAutomationMetadataObject } from "@gooddata/sdk-model";
|
|
2
|
+
import { type FilterContextItem, type IAutomationMetadataObject, type IFilter } from "@gooddata/sdk-model";
|
|
3
3
|
export declare function convertAutomation(automation: JsonApiAutomationOutWithLinks | JsonApiWorkspaceAutomationOutWithLinks, included: JsonApiAutomationOutIncludes[], enableAutomationFilterContext: boolean, enableNewScheduledExport: boolean): IAutomationMetadataObject;
|
|
4
4
|
export declare const convertAutomationListToAutomations: (automationList: JsonApiAutomationOutList, enableAutomationFilterContext: boolean, enableNewScheduledExport: boolean) => IAutomationMetadataObject[];
|
|
5
|
+
/**
|
|
6
|
+
* Converts a legacy execution-level filter to a dashboard `FilterContextItem`. Used during
|
|
7
|
+
* lazy migration of XLSX export definitions that historically stored `IFilter[]` instead of
|
|
8
|
+
* `FilterContextItem[]`. Pure: no random ids — the caller passes a deterministic
|
|
9
|
+
* `fallbackLocalIdentifier` for MVFs that lack one.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function convertExecutionFilterToFilterContextItem(filter: IFilter, fallbackLocalIdentifier: string): FilterContextItem | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { compact } from "lodash-es";
|
|
3
|
-
import { filterAttributeElements, filterLocalIdentifier, filterObjRef, idRef, isAbsoluteDateFilter, isAllTimeDateFilter, isArbitraryAttributeFilter, isAttributeFilterWithSelection, isAutomationUserRecipient, isExportDefinitionVisualizationObjectRequestPayload, isFilter, isFilterContextItem, isMatchAttributeFilter, isNegativeAttributeFilter, isRelativeBoundedDateFilter, isRelativeDateFilter, newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
3
|
+
import { filterAttributeElements, filterLocalIdentifier, filterObjRef, idRef, isAbsoluteDateFilter, isAllTimeDateFilter, isArbitraryAttributeFilter, isAttributeFilterWithSelection, isAutomationUserRecipient, isExportDefinitionVisualizationObjectRequestPayload, isFilter, isFilterContextItem, isMatchAttributeFilter, isMeasureValueFilter, isNegativeAttributeFilter, isObjRef, isRelativeBoundedDateFilter, isRelativeDateFilter, measureValueFilterConditions, measureValueFilterMeasure, newAbsoluteDashboardDateFilter, newAllTimeDashboardDateFilter, newRelativeDashboardDateFilter, } from "@gooddata/sdk-model";
|
|
4
4
|
import { fixNumber } from "../../utils/fixNumber.js";
|
|
5
5
|
import { convertFilter } from "./afm/FilterConverter.js";
|
|
6
6
|
import { convertMeasure } from "./afm/MeasureConverter.js";
|
|
@@ -260,7 +260,9 @@ function convertLegacyTabularFiltersToFilterContext(exportDefinition) {
|
|
|
260
260
|
return exportDefinition;
|
|
261
261
|
}
|
|
262
262
|
const convertedFilters = filters
|
|
263
|
-
.map((filter) =>
|
|
263
|
+
.map((filter, index) => isFilter(filter)
|
|
264
|
+
? convertExecutionFilterToFilterContextItem(filter, `legacy-mvf-${index}`)
|
|
265
|
+
: undefined)
|
|
264
266
|
.filter((filter) => Boolean(filter));
|
|
265
267
|
if (!convertedFilters.length) {
|
|
266
268
|
return exportDefinition;
|
|
@@ -276,7 +278,15 @@ function convertLegacyTabularFiltersToFilterContext(exportDefinition) {
|
|
|
276
278
|
},
|
|
277
279
|
};
|
|
278
280
|
}
|
|
279
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Converts a legacy execution-level filter to a dashboard `FilterContextItem`. Used during
|
|
283
|
+
* lazy migration of XLSX export definitions that historically stored `IFilter[]` instead of
|
|
284
|
+
* `FilterContextItem[]`. Pure: no random ids — the caller passes a deterministic
|
|
285
|
+
* `fallbackLocalIdentifier` for MVFs that lack one.
|
|
286
|
+
*
|
|
287
|
+
* @internal
|
|
288
|
+
*/
|
|
289
|
+
export function convertExecutionFilterToFilterContextItem(filter, fallbackLocalIdentifier) {
|
|
280
290
|
if (isAttributeFilterWithSelection(filter)) {
|
|
281
291
|
return {
|
|
282
292
|
attributeFilter: {
|
|
@@ -319,5 +329,27 @@ function convertExecutionFilterToFilterContextItem(filter) {
|
|
|
319
329
|
if (isRelativeDateFilter(filter)) {
|
|
320
330
|
return newRelativeDashboardDateFilter(filter.relativeDateFilter.granularity, filter.relativeDateFilter.from, filter.relativeDateFilter.to, filter.relativeDateFilter.dataSet, filter.relativeDateFilter.localIdentifier, isRelativeBoundedDateFilter(filter) ? filter.relativeDateFilter.boundedFilter : undefined, filter.relativeDateFilter.emptyValueHandling);
|
|
321
331
|
}
|
|
332
|
+
if (isMeasureValueFilter(filter)) {
|
|
333
|
+
const measure = measureValueFilterMeasure(filter);
|
|
334
|
+
// Dashboard MVF requires an ObjRef catalog metric. LocalIdRef-keyed MVFs only exist on
|
|
335
|
+
// execution filters coming from insights and must not appear here — log and drop.
|
|
336
|
+
if (!isObjRef(measure)) {
|
|
337
|
+
console.warn("MeasureValueFilter with LocalIdRef cannot be converted to a dashboard MVF — dropped", filter);
|
|
338
|
+
return undefined;
|
|
339
|
+
}
|
|
340
|
+
const body = filter.measureValueFilter;
|
|
341
|
+
const conditions = measureValueFilterConditions(filter);
|
|
342
|
+
// The SDK execution-side body does not declare `title`, but inputs may carry one at runtime
|
|
343
|
+
// (e.g. exports coming from a richer source). Propagate it if present.
|
|
344
|
+
const title = "title" in body ? body.title : undefined;
|
|
345
|
+
return {
|
|
346
|
+
dashboardMeasureValueFilter: {
|
|
347
|
+
measure,
|
|
348
|
+
localIdentifier: body.localIdentifier ?? fallbackLocalIdentifier,
|
|
349
|
+
...(conditions ? { conditions } : {}),
|
|
350
|
+
...(title ? { title } : {}),
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
}
|
|
322
354
|
return undefined;
|
|
323
355
|
}
|
|
@@ -25,9 +25,14 @@ export function convertParameter(parameter, included = []) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
function convertParameterDefinition(definition) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
if (definition.type === "NUMBER") {
|
|
29
|
+
return {
|
|
30
|
+
type: "NUMBER",
|
|
31
|
+
defaultValue: definition.defaultValue,
|
|
32
|
+
...(definition.constraints ? { constraints: definition.constraints } : {}),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw new Error(`Unsupported parameter definition type: ${definition.type}`);
|
|
37
|
+
}
|
|
33
38
|
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
|
+
function convertParameterDefinitionToBackend(definition) {
|
|
3
|
+
if (definition.type === "NUMBER") {
|
|
4
|
+
return {
|
|
5
|
+
type: "NUMBER",
|
|
6
|
+
defaultValue: definition.defaultValue,
|
|
7
|
+
...(definition.constraints === undefined ? {} : { constraints: definition.constraints }),
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
throw new Error(`Unsupported parameter definition type: ${definition.type}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
2
14
|
export function convertParameterToBackendCreate(parameter) {
|
|
3
15
|
return {
|
|
4
16
|
title: parameter.title,
|
|
5
17
|
description: parameter.description,
|
|
6
18
|
tags: parameter.tags,
|
|
7
|
-
definition:
|
|
8
|
-
type: parameter.definition.type,
|
|
9
|
-
defaultValue: parameter.definition.defaultValue,
|
|
10
|
-
constraints: parameter.definition.constraints,
|
|
11
|
-
},
|
|
19
|
+
definition: convertParameterDefinitionToBackend(parameter.definition),
|
|
12
20
|
};
|
|
13
21
|
}
|
|
14
22
|
export function convertParameterToBackendUpdate(parameter) {
|
|
@@ -18,14 +26,6 @@ export function convertParameterToBackendUpdate(parameter) {
|
|
|
18
26
|
...(parameter.tags === undefined ? {} : { tags: parameter.tags }),
|
|
19
27
|
...(parameter.definition === undefined
|
|
20
28
|
? {}
|
|
21
|
-
: {
|
|
22
|
-
definition: {
|
|
23
|
-
type: parameter.definition.type,
|
|
24
|
-
defaultValue: parameter.definition.defaultValue,
|
|
25
|
-
...(parameter.definition.constraints === undefined
|
|
26
|
-
? {}
|
|
27
|
-
: { constraints: parameter.definition.constraints }),
|
|
28
|
-
},
|
|
29
|
-
}),
|
|
29
|
+
: { definition: convertParameterDefinitionToBackend(parameter.definition) }),
|
|
30
30
|
};
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-tiger",
|
|
3
|
-
"version": "11.35.0-alpha.
|
|
3
|
+
"version": "11.35.0-alpha.7",
|
|
4
4
|
"description": "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"ts-invariant": "0.10.3",
|
|
34
34
|
"tslib": "2.8.1",
|
|
35
35
|
"uuid": "11.1.0",
|
|
36
|
-
"@gooddata/api-client-tiger": "11.35.0-alpha.
|
|
37
|
-
"@gooddata/sdk-backend-base": "11.35.0-alpha.
|
|
38
|
-
"@gooddata/sdk-
|
|
39
|
-
"@gooddata/sdk-model": "11.35.0-alpha.
|
|
40
|
-
"@gooddata/sdk-
|
|
41
|
-
"@gooddata/util": "11.35.0-alpha.
|
|
36
|
+
"@gooddata/api-client-tiger": "11.35.0-alpha.7",
|
|
37
|
+
"@gooddata/sdk-backend-base": "11.35.0-alpha.7",
|
|
38
|
+
"@gooddata/sdk-backend-spi": "11.35.0-alpha.7",
|
|
39
|
+
"@gooddata/sdk-model": "11.35.0-alpha.7",
|
|
40
|
+
"@gooddata/sdk-code-convertors": "11.35.0-alpha.7",
|
|
41
|
+
"@gooddata/util": "11.35.0-alpha.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@gooddata/fixtures": "3.3.12",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"oxlint-tsgolint": "0.11.4",
|
|
66
66
|
"typescript": "5.9.3",
|
|
67
67
|
"vitest": "4.1.0",
|
|
68
|
-
"@gooddata/catalog-export": "11.35.0-alpha.
|
|
69
|
-
"@gooddata/
|
|
70
|
-
"@gooddata/reference-workspace": "11.35.0-alpha.
|
|
71
|
-
"@gooddata/
|
|
68
|
+
"@gooddata/catalog-export": "11.35.0-alpha.7",
|
|
69
|
+
"@gooddata/oxlint-config": "11.35.0-alpha.7",
|
|
70
|
+
"@gooddata/reference-workspace": "11.35.0-alpha.7",
|
|
71
|
+
"@gooddata/eslint-config": "11.35.0-alpha.7"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"_phase:build": "npm run build",
|