@gooddata/sdk-backend-tiger 11.36.0-alpha.0 → 11.36.0-alpha.2
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/features/feature.js +2 -1
- package/esm/backend/organization/llmEndpoints.d.ts +1 -2
- package/esm/backend/organization/llmEndpoints.js +0 -32
- package/esm/backend/settings/mapping.js +1 -0
- package/esm/backend/uiFeatures.d.ts +7 -4
- package/esm/backend/uiFeatures.js +6 -3
- package/esm/backend/workspace/genAI/ChatConversations.js +4 -4
- package/esm/backend/workspace/genAI/index.js +1 -1
- package/esm/backend/workspace/references/index.d.ts +2 -2
- package/esm/backend/workspace/references/index.js +64 -83
- package/esm/convertors/fromBackend/llmEndpointConvertor.d.ts +2 -3
- package/esm/convertors/fromBackend/llmEndpointConvertor.js +1 -9
- package/esm/convertors/fromBackend/llmProviderConvertor.js +15 -0
- package/package.json +11 -11
package/esm/__version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.36.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.36.0-alpha.2";
|
|
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.36.0-alpha.
|
|
3
|
+
export const LIB_VERSION = "11.36.0-alpha.2";
|
|
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";
|
|
@@ -139,6 +139,7 @@ export function mapFeatures(features) {
|
|
|
139
139
|
...loadFeature(features, TigerFeaturesNames.EnableGenAIReasoningVisibility, "enableGenAIReasoningVisibility", "BOOLEAN", FeatureFlagsValues.enableGenAIReasoningVisibility),
|
|
140
140
|
...loadFeature(features, TigerFeaturesNames.EnableAiAgenticConversations, "enableAiAgenticConversations", "BOOLEAN", FeatureFlagsValues.enableAiAgenticConversations),
|
|
141
141
|
...loadFeature(features, TigerFeaturesNames.EnableAiAgenticMultiConversations, "enableAiAgenticMultiConversations", "BOOLEAN", FeatureFlagsValues.enableAiAgenticMultiConversations),
|
|
142
|
+
...loadFeature(features, TigerFeaturesNames.EnableAiLlmAnthropicProvider, "enableAiLlmAnthropicProvider", "BOOLEAN", FeatureFlagsValues.enableAiLlmAnthropicProvider),
|
|
142
143
|
...loadFeature(features, TigerFeaturesNames.EnableGenAiVisualizationSummarySkill, "enableGenAiVisualizationSummarySkill", "BOOLEAN", FeatureFlagsValues.enableGenAiVisualizationSummarySkill),
|
|
143
144
|
...loadFeature(features, TigerFeaturesNames.EnableGenAiAgenticDataShareOptOut, "enableGenAiAgenticDataShareOptOut", "BOOLEAN", FeatureFlagsValues.enableGenAiAgenticDataShareOptOut),
|
|
144
145
|
...loadFeature(features, TigerFeaturesNames.AIChatSearchLimit, "aiChatSearchLimit", "NUMBER", FeatureFlagsValues.aiChatSearchLimit),
|
|
@@ -160,13 +161,13 @@ export function mapFeatures(features) {
|
|
|
160
161
|
...loadFeature(features, TigerFeaturesNames.EnableMeasureValueFilterKD, "enableMeasureValueFilterKD", "BOOLEAN", FeatureFlagsValues.enableMeasureValueFilterKD),
|
|
161
162
|
...loadFeature(features, TigerFeaturesNames.EnableFilterControlInDrillingConfiguration, "enableFilterControlInDrillingConfiguration", "BOOLEAN", FeatureFlagsValues.enableFilterControlInDrillingConfiguration),
|
|
162
163
|
...loadFeature(features, TigerFeaturesNames.EnableShellApplication, "enableShellApplication", "BOOLEAN", FeatureFlagsValues.enableShellApplication),
|
|
164
|
+
...loadFeature(features, TigerFeaturesNames.EnableShellApplicationCatalog, "enableShellApplication_catalog", "BOOLEAN", FeatureFlagsValues.enableShellApplication_catalog),
|
|
163
165
|
...loadFeature(features, TigerFeaturesNames.EnableNullJoins, "enableNullJoins", "BOOLEAN", FeatureFlagsValues.enableNullJoins),
|
|
164
166
|
...loadFeature(features, TigerFeaturesNames.EnableDashboardDensitySetting, "enableDashboardDensitySetting", "BOOLEAN", FeatureFlagsValues.enableDashboardDensitySetting),
|
|
165
167
|
...loadFeature(features, TigerFeaturesNames.EnableDashboardsSearch, "enableDashboardsSearch", "BOOLEAN", FeatureFlagsValues.enableDashboardsSearch),
|
|
166
168
|
...loadFeature(features, TigerFeaturesNames.EnableAiHub, "enableAiHub", "BOOLEAN", FeatureFlagsValues.enableAiHub),
|
|
167
169
|
...loadFeature(features, TigerFeaturesNames.EnableAutomationTrigger, "enableAutomationTrigger", "BOOLEAN", FeatureFlagsValues.enableAutomationTrigger),
|
|
168
170
|
...loadFeature(features, TigerFeaturesNames.EnableUserDataFiltersUi, "enableUserDataFiltersUi", "BOOLEAN", FeatureFlagsValues.enableUserDataFiltersUi),
|
|
169
|
-
...loadFeature(features, TigerFeaturesNames.EnableDateTimeSemanticsSetting, "enableDateTimeSemanticsSetting", "BOOLEAN", FeatureFlagsValues.enableDateTimeSemanticsSetting),
|
|
170
171
|
...loadFeature(features, TigerFeaturesNames.EnableEnhancedInsightPicker, "enableEnhancedInsightPicker", "BOOLEAN", FeatureFlagsValues.enableEnhancedInsightPicker),
|
|
171
172
|
};
|
|
172
173
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ILlmEndpointsQuery, type IOrganizationLlmEndpointsService } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type ILlmEndpointOpenAI, type LlmEndpointOpenAIPatch
|
|
2
|
+
import { type ILlmEndpointOpenAI, type LlmEndpointOpenAIPatch } from "@gooddata/sdk-model";
|
|
3
3
|
import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
|
|
4
4
|
export declare class OrganizationLlmEndpointsService implements IOrganizationLlmEndpointsService {
|
|
5
5
|
readonly authCall: TigerAuthenticatedCallGuard;
|
|
@@ -11,5 +11,4 @@ export declare class OrganizationLlmEndpointsService implements IOrganizationLlm
|
|
|
11
11
|
updateLlmEndpoint(endpoint: ILlmEndpointOpenAI, token: string): Promise<ILlmEndpointOpenAI>;
|
|
12
12
|
patchLlmEndpoint(endpoint: LlmEndpointOpenAIPatch, token?: string): Promise<ILlmEndpointOpenAI>;
|
|
13
13
|
deleteLlmEndpoint(id: string): Promise<void>;
|
|
14
|
-
testLlmEndpoint(endpoint: Partial<LlmEndpointOpenAIPatch>, token?: string): Promise<LlmEndpointTestResults>;
|
|
15
14
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { EntitiesApi_CreateEntityLlmEndpoints, EntitiesApi_DeleteEntityLlmEndpoints, EntitiesApi_GetAllEntitiesLlmEndpoints, EntitiesApi_GetEntityLlmEndpoints, EntitiesApi_PatchEntityLlmEndpoints, EntitiesApi_UpdateEntityLlmEndpoints, } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
|
|
3
|
-
import { GenAiApi_ValidateLLMEndpoint, GenAiApi_ValidateLLMEndpointById, } from "@gooddata/api-client-tiger/endpoints/genAI";
|
|
4
3
|
import { convertLlmEndpoint } from "../../convertors/fromBackend/llmEndpointConvertor.js";
|
|
5
4
|
import { LlmEndpointsQuery } from "./llmEndpointsQuery.js";
|
|
6
5
|
export class OrganizationLlmEndpointsService {
|
|
@@ -109,35 +108,4 @@ export class OrganizationLlmEndpointsService {
|
|
|
109
108
|
await EntitiesApi_DeleteEntityLlmEndpoints(client.axios, client.basePath, { id });
|
|
110
109
|
});
|
|
111
110
|
}
|
|
112
|
-
testLlmEndpoint(endpoint, token) {
|
|
113
|
-
return this.authCall(async (client) => {
|
|
114
|
-
if (endpoint.id) {
|
|
115
|
-
const result = await GenAiApi_ValidateLLMEndpointById(client.axios, client.basePath, {
|
|
116
|
-
llmEndpointId: endpoint.id,
|
|
117
|
-
validateLLMEndpointByIdRequest: {
|
|
118
|
-
...(endpoint.provider ? { provider: endpoint.provider } : {}),
|
|
119
|
-
...(token ? { token } : {}),
|
|
120
|
-
...(endpoint.organization ? { llmOrganization: endpoint.organization } : {}),
|
|
121
|
-
...(endpoint.model ? { llmModel: endpoint.model } : {}),
|
|
122
|
-
},
|
|
123
|
-
});
|
|
124
|
-
return {
|
|
125
|
-
success: result.data?.successful,
|
|
126
|
-
message: result.data?.message,
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
const result = await GenAiApi_ValidateLLMEndpoint(client.axios, client.basePath, {
|
|
130
|
-
validateLLMEndpointRequest: {
|
|
131
|
-
provider: endpoint.provider ?? "OPENAI",
|
|
132
|
-
token: token ?? "",
|
|
133
|
-
llmOrganization: endpoint.organization,
|
|
134
|
-
llmModel: endpoint.model,
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
return {
|
|
138
|
-
success: result.data?.successful,
|
|
139
|
-
message: result.data?.message,
|
|
140
|
-
};
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
111
|
}
|
|
@@ -38,6 +38,7 @@ const TYPE_TO_KEY_MAP = {
|
|
|
38
38
|
RESTRICT_BASE_UI: "restrictBaseUi",
|
|
39
39
|
ACTIVE_LLM_PROVIDER: "activeLlmProvider",
|
|
40
40
|
SORT_COLLATION: "sortCollation",
|
|
41
|
+
ENABLE_PARTIAL_DATA_RESULTS: "enablePartialDataResults",
|
|
41
42
|
};
|
|
42
43
|
export function mapTypeToKey(type, fallback = "") {
|
|
43
44
|
// For undefined or unmapped type - return fallback
|
|
@@ -160,15 +160,16 @@ export declare enum TigerFeaturesNames {
|
|
|
160
160
|
EnableMeasureValueFilterKD = "enableMeasureValueFilterKD",
|
|
161
161
|
EnableFilterControlInDrillingConfiguration = "enableFilterControlInDrillingConfiguration",
|
|
162
162
|
EnableShellApplication = "enableShellApplication",
|
|
163
|
+
EnableShellApplicationCatalog = "enableShellApplication_catalog",
|
|
163
164
|
EnableNullJoins = "enableNullJoins",
|
|
164
165
|
EnableDashboardDensitySetting = "enableDashboardDensitySetting",
|
|
165
166
|
EnableDashboardsSearch = "enableDashboardsSearch",
|
|
166
167
|
EnableAiHub = "enableAiHub",
|
|
167
168
|
EnableAutomationTrigger = "enableAutomationTrigger",
|
|
168
169
|
EnableUserDataFiltersUi = "enableUserDataFiltersUi",
|
|
169
|
-
EnableDateTimeSemanticsSetting = "enableDateTimeSemanticsSetting",
|
|
170
170
|
EnableEnhancedInsightPicker = "enableEnhancedInsightPicker",
|
|
171
|
-
EnableAiAgenticMultiConversations = "enableAiAgenticMultiConversations"
|
|
171
|
+
EnableAiAgenticMultiConversations = "enableAiAgenticMultiConversations",
|
|
172
|
+
EnableAiLlmAnthropicProvider = "enableAiLlmAnthropicProvider"
|
|
172
173
|
}
|
|
173
174
|
export type ITigerFeatureFlags = {
|
|
174
175
|
dashboardEditModeDevRollout: (typeof FeatureFlagsValues)["dashboardEditModeDevRollout"][number];
|
|
@@ -325,6 +326,7 @@ export type ITigerFeatureFlags = {
|
|
|
325
326
|
enableMeasureValueFilterKD: (typeof FeatureFlagsValues)["enableMeasureValueFilterKD"][number];
|
|
326
327
|
enableFilterControlInDrillingConfiguration: (typeof FeatureFlagsValues)["enableFilterControlInDrillingConfiguration"][number];
|
|
327
328
|
enableShellApplication: (typeof FeatureFlagsValues)["enableShellApplication"][number];
|
|
329
|
+
enableShellApplication_catalog: (typeof FeatureFlagsValues)["enableShellApplication_catalog"][number];
|
|
328
330
|
enableNullJoins: (typeof FeatureFlagsValues)["enableNullJoins"][number];
|
|
329
331
|
enableDashboardDensitySetting: (typeof FeatureFlagsValues)["enableDashboardDensitySetting"][number];
|
|
330
332
|
enableDashboardsSearch: (typeof FeatureFlagsValues)["enableDashboardsSearch"][number];
|
|
@@ -334,8 +336,8 @@ export type ITigerFeatureFlags = {
|
|
|
334
336
|
enableGenAiVisualizationSummarySkill: (typeof FeatureFlagsValues)["enableGenAiVisualizationSummarySkill"][number];
|
|
335
337
|
enableAutomationTrigger: (typeof FeatureFlagsValues)["enableAutomationTrigger"][number];
|
|
336
338
|
enableUserDataFiltersUi: (typeof FeatureFlagsValues)["enableUserDataFiltersUi"][number];
|
|
337
|
-
enableDateTimeSemanticsSetting: (typeof FeatureFlagsValues)["enableDateTimeSemanticsSetting"][number];
|
|
338
339
|
enableEnhancedInsightPicker: (typeof FeatureFlagsValues)["enableEnhancedInsightPicker"][number];
|
|
340
|
+
enableAiLlmAnthropicProvider: (typeof FeatureFlagsValues)["enableAiLlmAnthropicProvider"][number];
|
|
339
341
|
};
|
|
340
342
|
export declare const DefaultFeatureFlags: ITigerFeatureFlags;
|
|
341
343
|
export declare const FeatureFlagsValues: {
|
|
@@ -494,6 +496,7 @@ export declare const FeatureFlagsValues: {
|
|
|
494
496
|
enableMeasureValueFilterKD: readonly [false, true];
|
|
495
497
|
enableFilterControlInDrillingConfiguration: readonly [true, false];
|
|
496
498
|
enableShellApplication: readonly [true, false];
|
|
499
|
+
enableShellApplication_catalog: readonly [false, true];
|
|
497
500
|
enableNullJoins: readonly [true, false];
|
|
498
501
|
enableDashboardDensitySetting: readonly [true, false];
|
|
499
502
|
enableDashboardsSearch: readonly [false, true];
|
|
@@ -503,6 +506,6 @@ export declare const FeatureFlagsValues: {
|
|
|
503
506
|
enableGenAiVisualizationSummarySkill: readonly [false, true];
|
|
504
507
|
enableAutomationTrigger: readonly [true, false];
|
|
505
508
|
enableUserDataFiltersUi: readonly [true, false];
|
|
506
|
-
enableDateTimeSemanticsSetting: readonly [true, false];
|
|
507
509
|
enableEnhancedInsightPicker: readonly [true, false];
|
|
510
|
+
enableAiLlmAnthropicProvider: readonly [true, false];
|
|
508
511
|
};
|
|
@@ -164,15 +164,16 @@ var TigerFeaturesNames;
|
|
|
164
164
|
TigerFeaturesNames["EnableMeasureValueFilterKD"] = "enableMeasureValueFilterKD";
|
|
165
165
|
TigerFeaturesNames["EnableFilterControlInDrillingConfiguration"] = "enableFilterControlInDrillingConfiguration";
|
|
166
166
|
TigerFeaturesNames["EnableShellApplication"] = "enableShellApplication";
|
|
167
|
+
TigerFeaturesNames["EnableShellApplicationCatalog"] = "enableShellApplication_catalog";
|
|
167
168
|
TigerFeaturesNames["EnableNullJoins"] = "enableNullJoins";
|
|
168
169
|
TigerFeaturesNames["EnableDashboardDensitySetting"] = "enableDashboardDensitySetting";
|
|
169
170
|
TigerFeaturesNames["EnableDashboardsSearch"] = "enableDashboardsSearch";
|
|
170
171
|
TigerFeaturesNames["EnableAiHub"] = "enableAiHub";
|
|
171
172
|
TigerFeaturesNames["EnableAutomationTrigger"] = "enableAutomationTrigger";
|
|
172
173
|
TigerFeaturesNames["EnableUserDataFiltersUi"] = "enableUserDataFiltersUi";
|
|
173
|
-
TigerFeaturesNames["EnableDateTimeSemanticsSetting"] = "enableDateTimeSemanticsSetting";
|
|
174
174
|
TigerFeaturesNames["EnableEnhancedInsightPicker"] = "enableEnhancedInsightPicker";
|
|
175
175
|
TigerFeaturesNames["EnableAiAgenticMultiConversations"] = "enableAiAgenticMultiConversations";
|
|
176
|
+
TigerFeaturesNames["EnableAiLlmAnthropicProvider"] = "enableAiLlmAnthropicProvider";
|
|
176
177
|
})(TigerFeaturesNames || (TigerFeaturesNames = {}));
|
|
177
178
|
export const DefaultFeatureFlags = {
|
|
178
179
|
dashboardEditModeDevRollout: true,
|
|
@@ -329,6 +330,7 @@ export const DefaultFeatureFlags = {
|
|
|
329
330
|
enableMeasureValueFilterKD: false,
|
|
330
331
|
enableFilterControlInDrillingConfiguration: true,
|
|
331
332
|
enableShellApplication: true,
|
|
333
|
+
enableShellApplication_catalog: false,
|
|
332
334
|
enableNullJoins: false,
|
|
333
335
|
enableDashboardDensitySetting: false,
|
|
334
336
|
enableDashboardsSearch: false,
|
|
@@ -338,8 +340,8 @@ export const DefaultFeatureFlags = {
|
|
|
338
340
|
enableGenAiVisualizationSummarySkill: false,
|
|
339
341
|
enableAutomationTrigger: false,
|
|
340
342
|
enableUserDataFiltersUi: false,
|
|
341
|
-
enableDateTimeSemanticsSetting: false,
|
|
342
343
|
enableEnhancedInsightPicker: false,
|
|
344
|
+
enableAiLlmAnthropicProvider: false,
|
|
343
345
|
};
|
|
344
346
|
export const FeatureFlagsValues = {
|
|
345
347
|
dashboardEditModeDevRollout: [true, false],
|
|
@@ -497,6 +499,7 @@ export const FeatureFlagsValues = {
|
|
|
497
499
|
enableMeasureValueFilterKD: [false, true],
|
|
498
500
|
enableFilterControlInDrillingConfiguration: [true, false],
|
|
499
501
|
enableShellApplication: [true, false],
|
|
502
|
+
enableShellApplication_catalog: [false, true],
|
|
500
503
|
enableNullJoins: [true, false],
|
|
501
504
|
enableDashboardDensitySetting: [true, false],
|
|
502
505
|
enableDashboardsSearch: [false, true],
|
|
@@ -506,6 +509,6 @@ export const FeatureFlagsValues = {
|
|
|
506
509
|
enableGenAiVisualizationSummarySkill: [false, true],
|
|
507
510
|
enableAutomationTrigger: [true, false],
|
|
508
511
|
enableUserDataFiltersUi: [true, false],
|
|
509
|
-
enableDateTimeSemanticsSetting: [true, false],
|
|
510
512
|
enableEnhancedInsightPicker: [true, false],
|
|
513
|
+
enableAiLlmAnthropicProvider: [true, false],
|
|
511
514
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
import { EventSourceParserStream } from "eventsource-parser/stream";
|
|
3
|
-
import { GenAiApi_DeleteConversation, GenAiApi_GetConversation, GenAiApi_GetConversationItems, GenAiApi_GetConversationResponses, GenAiApi_GetConversations, GenAiApi_PatchConversation,
|
|
3
|
+
import { GenAiApi_DeleteConversation, GenAiApi_GetConversation, GenAiApi_GetConversationItems, GenAiApi_GetConversationResponses, GenAiApi_GetConversations, GenAiApi_PatchConversation, GenAiApi_PatchVisualization, GenAiApi_PostConversationFeedback, GenAiApi_PostConversations, GenAiApi_PostGenerateConversationTitle, GenAiApi_PostMessages, } from "@gooddata/api-client-tiger/endpoints/genAI";
|
|
4
4
|
import { ServerPaging } from "@gooddata/sdk-backend-base";
|
|
5
5
|
import { objRefToString, } from "@gooddata/sdk-model";
|
|
6
6
|
import { convertChatConversationErrorFromBackend, convertChatConversationFromBackend, convertChatConversationItemFromBackend, convertChatSuggestionItemFromBackend, } from "../../../convertors/fromBackend/genAIConvertor.js";
|
|
@@ -167,11 +167,11 @@ export class ConversationThread {
|
|
|
167
167
|
throw new Error("Conversation ID is not set");
|
|
168
168
|
}
|
|
169
169
|
await this.authCall((client) => {
|
|
170
|
-
return
|
|
170
|
+
return GenAiApi_PostConversationFeedback(client.axios, client.basePath, {
|
|
171
171
|
workspaceId: this.workspaceId,
|
|
172
172
|
conversationId,
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
aiConversationFeedbackRequest: {
|
|
174
|
+
responseId,
|
|
175
175
|
feedback: feedback === "NONE"
|
|
176
176
|
? null
|
|
177
177
|
: {
|
|
@@ -1,6 +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
|
+
import { GenAiApi_SummarizeDashboard, } from "@gooddata/api-client-tiger/endpoints/genAI";
|
|
4
4
|
import { AnalyticsCatalogService } from "./AnalyticsCatalogService.js";
|
|
5
5
|
import { ChatConversationsService } from "./ChatConversations.js";
|
|
6
6
|
import { ChatThreadService } from "./ChatThread.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type IReferencesOption, type IReferencesResult, type IReferencesService } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type
|
|
2
|
+
import { type IdentifierRef } from "@gooddata/sdk-model";
|
|
3
3
|
import { type TigerAuthenticatedCallGuard } from "../../../types/index.js";
|
|
4
4
|
export declare class TigerReferencesService implements IReferencesService {
|
|
5
5
|
private readonly authCall;
|
|
6
6
|
private readonly workspace;
|
|
7
7
|
constructor(authCall: TigerAuthenticatedCallGuard, workspace: string);
|
|
8
|
-
getReferences(root:
|
|
8
|
+
getReferences(root: IdentifierRef | IdentifierRef[], opts?: IReferencesOption): Promise<IReferencesResult>;
|
|
9
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
|
+
import { uniqBy } from "lodash-es";
|
|
2
3
|
import { ActionsApi_GetDependentEntitiesGraphFromEntryPoints, } from "@gooddata/api-client-tiger";
|
|
3
|
-
import {
|
|
4
|
-
import { objectTypeToTigerIdType, tigerIdTypeToObjectType, } from "../../../types/refTypeMapping.js";
|
|
5
|
-
|
|
4
|
+
import { serializeObjRef } from "@gooddata/sdk-model";
|
|
5
|
+
import { isTigerType, objectTypeToTigerIdType, tigerIdTypeToObjectType, } from "../../../types/refTypeMapping.js";
|
|
6
|
+
const sdkObjectTypeToTigerType = objectTypeToTigerIdType;
|
|
6
7
|
export class TigerReferencesService {
|
|
7
8
|
authCall;
|
|
8
9
|
workspace;
|
|
@@ -11,97 +12,77 @@ export class TigerReferencesService {
|
|
|
11
12
|
this.workspace = workspace;
|
|
12
13
|
}
|
|
13
14
|
async getReferences(root, opts) {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
edges: [],
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
if (opts?.direction === "both") {
|
|
26
|
-
const dependenciesGraph = await getData(this.authCall, this.workspace, id, type, "DEPENDENCIES");
|
|
27
|
-
const dependentsGraph = await getData(this.authCall, this.workspace, id, type, "DEPENDENTS");
|
|
28
|
-
const graph = mergeGraphs(dependenciesGraph, dependentsGraph, root);
|
|
29
|
-
return {
|
|
30
|
-
nodes: graph.nodes,
|
|
31
|
-
edges: revertGraphDirection(graph.edges, opts),
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
const entitiesGraph = await getData(this.authCall, this.workspace, id, type, opts?.direction === "up" ? "DEPENDENTS" : "DEPENDENCIES");
|
|
36
|
-
const graph = createGraph(entitiesGraph, root);
|
|
37
|
-
return {
|
|
38
|
-
nodes: graph.nodes,
|
|
39
|
-
edges: revertGraphDirection(graph.edges, opts),
|
|
40
|
-
};
|
|
15
|
+
const roots = Array.isArray(root) ? root : [root];
|
|
16
|
+
const direction = opts?.direction;
|
|
17
|
+
if (direction === "both") {
|
|
18
|
+
const [dependencies, dependents] = await Promise.all([
|
|
19
|
+
getGraph(this.authCall, this.workspace, roots, "DEPENDENCIES"),
|
|
20
|
+
getGraph(this.authCall, this.workspace, roots, "DEPENDENTS"),
|
|
21
|
+
]);
|
|
22
|
+
return mergeGraphs(dependencies, dependents);
|
|
41
23
|
}
|
|
24
|
+
return getGraph(this.authCall, this.workspace, roots, direction === "up" ? "DEPENDENTS" : "DEPENDENCIES");
|
|
42
25
|
}
|
|
43
26
|
}
|
|
44
|
-
async function
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
27
|
+
async function getGraph(authCall, workspace, roots, relation) {
|
|
28
|
+
const identifiers = roots.flatMap(refToEntityIdentifier);
|
|
29
|
+
if (identifiers.length === 0) {
|
|
30
|
+
return { nodes: [], edges: [] };
|
|
31
|
+
}
|
|
32
|
+
const rootKeys = new Set(identifiers.map(entityKey));
|
|
33
|
+
const entitiesGraph = await authCall(async (client) => {
|
|
34
|
+
const response = await ActionsApi_GetDependentEntitiesGraphFromEntryPoints(client.axios, client.basePath, {
|
|
35
|
+
workspaceId: workspace,
|
|
36
|
+
dependentEntitiesRequest: {
|
|
37
|
+
identifiers,
|
|
38
|
+
relation,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
return response.data.graph;
|
|
42
|
+
});
|
|
43
|
+
return createGraph(entitiesGraph, rootKeys, relation);
|
|
52
44
|
}
|
|
53
|
-
function
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (!nodes.some((n) => areObjRefsEqual(n, node))) {
|
|
59
|
-
nodes.push(node);
|
|
45
|
+
function createGraph(entitiesGraph, rootKeys, relation) {
|
|
46
|
+
const nodes = entitiesGraph.nodes.flatMap((node) => {
|
|
47
|
+
const ref = tigerNodeToRef(node);
|
|
48
|
+
if (!ref) {
|
|
49
|
+
return [];
|
|
60
50
|
}
|
|
51
|
+
return [{ ...ref, title: node.title ?? node.id, isRoot: rootKeys.has(entityKey(node)) }];
|
|
61
52
|
});
|
|
62
|
-
const edges =
|
|
63
|
-
|
|
64
|
-
if (!
|
|
65
|
-
|
|
53
|
+
const edges = entitiesGraph.edges.flatMap((edge) => {
|
|
54
|
+
const [from, to] = edge;
|
|
55
|
+
if (!from || !to) {
|
|
56
|
+
return [];
|
|
66
57
|
}
|
|
58
|
+
const fromRef = tigerNodeToRef(from);
|
|
59
|
+
const toRef = tigerNodeToRef(to);
|
|
60
|
+
if (!fromRef || !toRef) {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
return relation === "DEPENDENCIES" ? [{ from: toRef, to: fromRef }] : [{ from: fromRef, to: toRef }];
|
|
67
64
|
});
|
|
68
|
-
return {
|
|
69
|
-
nodes,
|
|
70
|
-
edges,
|
|
71
|
-
};
|
|
65
|
+
return { nodes, edges };
|
|
72
66
|
}
|
|
73
|
-
function
|
|
74
|
-
const nodes = [];
|
|
75
|
-
entitiesGraph.nodes.forEach((node) => {
|
|
76
|
-
const ref = createRef(node.id, node.type);
|
|
77
|
-
nodes.push({
|
|
78
|
-
...ref,
|
|
79
|
-
title: node.title ?? node.id,
|
|
80
|
-
isRoot: areObjRefsEqual(ref, root),
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
const edges = [];
|
|
84
|
-
entitiesGraph.edges.forEach(([from, to]) => {
|
|
85
|
-
edges.push({
|
|
86
|
-
from: createRef(from.id, from.type),
|
|
87
|
-
to: createRef(to.id, to.type),
|
|
88
|
-
});
|
|
89
|
-
});
|
|
67
|
+
function mergeGraphs(a, b) {
|
|
90
68
|
return {
|
|
91
|
-
nodes,
|
|
92
|
-
edges,
|
|
69
|
+
nodes: uniqBy([...a.nodes, ...b.nodes], serializeObjRef),
|
|
70
|
+
edges: uniqBy([...a.edges, ...b.edges], (edge) => `${serializeObjRef(edge.from)}|${serializeObjRef(edge.to)}`),
|
|
93
71
|
};
|
|
94
72
|
}
|
|
95
|
-
function
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
return edges.map((edge) => ({ from: edge.to, to: edge.from }));
|
|
99
|
-
}
|
|
100
|
-
return edges;
|
|
73
|
+
function refToEntityIdentifier(ref) {
|
|
74
|
+
const tigerType = ref.type ? sdkObjectTypeToTigerType[ref.type] : "visualizationObject";
|
|
75
|
+
return isGraphSupportedType(tigerType) ? [{ id: ref.identifier, type: tigerType }] : [];
|
|
101
76
|
}
|
|
102
|
-
function
|
|
103
|
-
return
|
|
104
|
-
identifier: id,
|
|
105
|
-
|
|
106
|
-
|
|
77
|
+
function tigerNodeToRef(node) {
|
|
78
|
+
return isTigerType(node.type)
|
|
79
|
+
? { identifier: node.id, type: tigerIdTypeToObjectType[node.type] }
|
|
80
|
+
: undefined;
|
|
81
|
+
}
|
|
82
|
+
// Prompt is not accepted by the dependency graph endpoint.
|
|
83
|
+
function isGraphSupportedType(type) {
|
|
84
|
+
return type !== undefined && type !== "prompt";
|
|
85
|
+
}
|
|
86
|
+
function entityKey(entity) {
|
|
87
|
+
return `${entity.type}/${entity.id}`;
|
|
107
88
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type JsonApiLlmEndpointOutWithLinks
|
|
2
|
-
import { type
|
|
1
|
+
import { type JsonApiLlmEndpointOutWithLinks } from "@gooddata/api-client-tiger";
|
|
2
|
+
import { type ILlmEndpointOpenAI } from "@gooddata/sdk-model";
|
|
3
3
|
export declare function convertLlmEndpoint(endpoint: JsonApiLlmEndpointOutWithLinks): ILlmEndpointOpenAI;
|
|
4
|
-
export declare function convertResolvedLlmEndpoint(endpoints: ResolvedLlmEndpoint[]): ILlmEndpointBase[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// (C) 2024-
|
|
1
|
+
// (C) 2024-2026 GoodData Corporation
|
|
2
2
|
export function convertLlmEndpoint(endpoint) {
|
|
3
3
|
if (endpoint.attributes?.provider === "OPENAI") {
|
|
4
4
|
return {
|
|
@@ -20,11 +20,3 @@ export function convertLlmEndpoint(endpoint) {
|
|
|
20
20
|
}
|
|
21
21
|
throw new Error(`Unknown llm endpoint provider: ${endpoint.attributes?.provider}`);
|
|
22
22
|
}
|
|
23
|
-
export function convertResolvedLlmEndpoint(endpoints) {
|
|
24
|
-
return endpoints.map((e) => {
|
|
25
|
-
return {
|
|
26
|
-
id: e.id,
|
|
27
|
-
title: e.title,
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
}
|
|
@@ -86,6 +86,15 @@ function convertLlmProviderConfigToBackend(config) {
|
|
|
86
86
|
apiKey: config.apiKey,
|
|
87
87
|
},
|
|
88
88
|
};
|
|
89
|
+
case "anthropic":
|
|
90
|
+
return {
|
|
91
|
+
type: "ANTHROPIC",
|
|
92
|
+
baseUrl: config.baseUrl,
|
|
93
|
+
auth: {
|
|
94
|
+
type: "API_KEY",
|
|
95
|
+
apiKey: config.apiKey,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
89
98
|
}
|
|
90
99
|
}
|
|
91
100
|
function convertLlmProviderConfigFromBackend(config) {
|
|
@@ -114,6 +123,12 @@ function convertLlmProviderConfigFromBackend(config) {
|
|
|
114
123
|
endpoint: config.endpoint,
|
|
115
124
|
apiKey: config.auth.apiKey ?? undefined,
|
|
116
125
|
};
|
|
126
|
+
case "ANTHROPIC":
|
|
127
|
+
return {
|
|
128
|
+
type: "anthropic",
|
|
129
|
+
baseUrl: config.baseUrl ?? undefined,
|
|
130
|
+
apiKey: config.auth.apiKey ?? undefined,
|
|
131
|
+
};
|
|
117
132
|
default:
|
|
118
133
|
return undefined;
|
|
119
134
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-tiger",
|
|
3
|
-
"version": "11.36.0-alpha.
|
|
3
|
+
"version": "11.36.0-alpha.2",
|
|
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/sdk-backend-base": "11.36.0-alpha.
|
|
37
|
-
"@gooddata/sdk-backend-spi": "11.36.0-alpha.
|
|
38
|
-
"@gooddata/
|
|
39
|
-
"@gooddata/
|
|
40
|
-
"@gooddata/sdk-
|
|
41
|
-
"@gooddata/util": "11.36.0-alpha.
|
|
36
|
+
"@gooddata/sdk-backend-base": "11.36.0-alpha.2",
|
|
37
|
+
"@gooddata/sdk-backend-spi": "11.36.0-alpha.2",
|
|
38
|
+
"@gooddata/sdk-code-convertors": "11.36.0-alpha.2",
|
|
39
|
+
"@gooddata/api-client-tiger": "11.36.0-alpha.2",
|
|
40
|
+
"@gooddata/sdk-model": "11.36.0-alpha.2",
|
|
41
|
+
"@gooddata/util": "11.36.0-alpha.2"
|
|
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/
|
|
69
|
-
"@gooddata/
|
|
70
|
-
"@gooddata/
|
|
71
|
-
"@gooddata/reference-workspace": "11.36.0-alpha.
|
|
68
|
+
"@gooddata/oxlint-config": "11.36.0-alpha.2",
|
|
69
|
+
"@gooddata/eslint-config": "11.36.0-alpha.2",
|
|
70
|
+
"@gooddata/catalog-export": "11.36.0-alpha.2",
|
|
71
|
+
"@gooddata/reference-workspace": "11.36.0-alpha.2"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"_phase:build": "npm run build",
|