@gooddata/sdk-backend-tiger 11.40.0-alpha.0 → 11.40.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.
@@ -1,3 +1,3 @@
1
- export declare const LIB_VERSION = "11.40.0-alpha.0";
1
+ export declare const LIB_VERSION = "11.40.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.40.0-alpha.0";
3
+ export const LIB_VERSION = "11.40.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";
@@ -73,6 +73,7 @@ export function mapFeatures(features) {
73
73
  ...loadFeature(features, TigerFeaturesNames.EnableCertification, "enableCertification", "BOOLEAN", FeatureFlagsValues.enableCertification),
74
74
  ...loadFeature(features, TigerFeaturesNames.EnableAIDataSetting, "enableAIDataSetting", "BOOLEAN", FeatureFlagsValues.enableAIDataSetting),
75
75
  ...loadFeature(features, TigerFeaturesNames.EnableDashboardFilterViews, "enableDashboardFilterViews", "BOOLEAN", FeatureFlagsValues.enableDashboardFilterViews),
76
+ ...loadFeature(features, TigerFeaturesNames.EnableSystemAccountFiltering, "enableSystemAccountFiltering", "BOOLEAN", FeatureFlagsValues.enableSystemAccountFiltering),
76
77
  ...loadFeature(features, TigerFeaturesNames.EnableCustomizedDashboardsWithoutPluginOverlay, "enableCustomizedDashboardsWithoutPluginOverlay", "BOOLEAN", FeatureFlagsValues.enableCustomizedDashboardsWithoutPluginOverlay),
77
78
  ...loadFeature(features, TigerFeaturesNames.EnableNewInsightChangedPostMessageEvent, "enableNewInsightChangedPostMessageEvent", "BOOLEAN", FeatureFlagsValues.enableNewInsightChangedPostMessageEvent),
78
79
  ...loadFeature(features, TigerFeaturesNames.EnableKDVisualizationSwitcher, "enableKDVisualizationSwitcher", "BOOLEAN", FeatureFlagsValues.enableKDVisualizationSwitcher),
@@ -14,6 +14,7 @@ export const convertUser = (user) => {
14
14
  fullName: constructFullName(firstName, lastName),
15
15
  firstName,
16
16
  lastName,
17
+ systemAccount: user.data.attributes?.systemAccount,
17
18
  };
18
19
  };
19
20
  export const convertWorkspaceUser = (user) => {
@@ -54,6 +55,7 @@ export const convertIncludedUser = (user) => {
54
55
  fullName: constructFullName(firstName, lastName),
55
56
  firstName,
56
57
  lastName,
58
+ systemAccount: user.attributes?.systemAccount,
57
59
  };
58
60
  };
59
61
  export const convertEntityUserToOrganizationUser = (user) => {
@@ -36,6 +36,7 @@ export class OrganizationUsersService {
36
36
  email: user.email,
37
37
  firstname: user.firstName,
38
38
  lastname: user.lastName,
39
+ systemAccount: user.systemAccount,
39
40
  },
40
41
  },
41
42
  },
@@ -52,7 +53,7 @@ export class OrganizationUsersService {
52
53
  };
53
54
  updateUser = async (user) => {
54
55
  return this.authCall(async (client) => {
55
- const { login, firstName, lastName, email } = user;
56
+ const { login, firstName, lastName, email, systemAccount } = user;
56
57
  await EntitiesApi_PatchEntityUsers(client.axios, client.basePath, {
57
58
  id: login,
58
59
  jsonApiUserPatchDocument: {
@@ -63,6 +64,7 @@ export class OrganizationUsersService {
63
64
  firstname: firstName,
64
65
  lastname: lastName,
65
66
  email: email,
67
+ systemAccount,
66
68
  },
67
69
  },
68
70
  },
@@ -74,6 +74,7 @@ export declare enum TigerFeaturesNames {
74
74
  EnableCertification = "enableCertification",
75
75
  EnableAIDataSetting = "enableAIDataSetting",
76
76
  EnableDashboardFilterViews = "enableDashboardFilterViews",
77
+ EnableSystemAccountFiltering = "enableSystemAccountFiltering",
77
78
  EnableCustomizedDashboardsWithoutPluginOverlay = "enableCustomizedDashboardsWithoutPluginOverlay",
78
79
  EnableAlertingRollout = "enableAlertingRollout",
79
80
  EnableNewInsightChangedPostMessageEvent = "enableNewInsightChangedPostMessageEvent",
@@ -240,6 +241,7 @@ export type ITigerFeatureFlags = {
240
241
  enableAIDataSetting: (typeof FeatureFlagsValues)["enableAIDataSetting"][number];
241
242
  enableAlertingRollout: (typeof FeatureFlagsValues)["enableAlertingRollout"][number];
242
243
  enableDashboardFilterViews: (typeof FeatureFlagsValues)["enableDashboardFilterViews"][number];
244
+ enableSystemAccountFiltering: (typeof FeatureFlagsValues)["enableSystemAccountFiltering"][number];
243
245
  enableCustomizedDashboardsWithoutPluginOverlay: (typeof FeatureFlagsValues)["enableCustomizedDashboardsWithoutPluginOverlay"][number];
244
246
  enableNewInsightChangedPostMessageEvent: (typeof FeatureFlagsValues)["enableNewInsightChangedPostMessageEvent"][number];
245
247
  enableKDVisualizationSwitcher: (typeof FeatureFlagsValues)["enableKDVisualizationSwitcher"][number];
@@ -408,6 +410,7 @@ export declare const FeatureFlagsValues: {
408
410
  enableAIDataSetting: readonly [true, false];
409
411
  enableAlertingRollout: readonly [true, false];
410
412
  enableDashboardFilterViews: readonly [true, false];
413
+ enableSystemAccountFiltering: readonly [true, false];
411
414
  enableCustomizedDashboardsWithoutPluginOverlay: readonly [true, false];
412
415
  enableNewInsightChangedPostMessageEvent: readonly [true, false];
413
416
  enableKDVisualizationSwitcher: readonly [true, false];
@@ -78,6 +78,7 @@ var TigerFeaturesNames;
78
78
  TigerFeaturesNames["EnableCertification"] = "enableCertification";
79
79
  TigerFeaturesNames["EnableAIDataSetting"] = "enableAIDataSetting";
80
80
  TigerFeaturesNames["EnableDashboardFilterViews"] = "enableDashboardFilterViews";
81
+ TigerFeaturesNames["EnableSystemAccountFiltering"] = "enableSystemAccountFiltering";
81
82
  TigerFeaturesNames["EnableCustomizedDashboardsWithoutPluginOverlay"] = "enableCustomizedDashboardsWithoutPluginOverlay";
82
83
  TigerFeaturesNames["EnableAlertingRollout"] = "enableAlertingRollout";
83
84
  TigerFeaturesNames["EnableNewInsightChangedPostMessageEvent"] = "enableNewInsightChangedPostMessageEvent";
@@ -244,6 +245,7 @@ export const DefaultFeatureFlags = {
244
245
  enableAIDataSetting: false,
245
246
  enableAlertingRollout: false,
246
247
  enableDashboardFilterViews: true,
248
+ enableSystemAccountFiltering: false,
247
249
  enableCustomizedDashboardsWithoutPluginOverlay: true,
248
250
  enableNewInsightChangedPostMessageEvent: false,
249
251
  enableKDVisualizationSwitcher: true,
@@ -411,6 +413,7 @@ export const FeatureFlagsValues = {
411
413
  enableAIDataSetting: [true, false],
412
414
  enableAlertingRollout: [true, false],
413
415
  enableDashboardFilterViews: [true, false],
416
+ enableSystemAccountFiltering: [true, false],
414
417
  enableCustomizedDashboardsWithoutPluginOverlay: [true, false],
415
418
  enableNewInsightChangedPostMessageEvent: [true, false],
416
419
  enableKDVisualizationSwitcher: [true, false],
@@ -1,7 +1,7 @@
1
1
  import { type IDashboardExportImageOptions, type IDashboardExportPdfOptions, type IDashboardExportPresentationOptions, type IDashboardExportRawOptions, type IDashboardExportTabularOptions, type IDashboardReferences, type IDashboardSummaryWorkflowStartResult, type IDashboardSummaryWorkflowStatusResult, type IDashboardWithReferences, type IDashboardsQuery, type IExportResult, type IGetDashboardOptions, type IGetDashboardPluginOptions, type IRawExportCustomOverrides, type IWorkspaceDashboardsService, type SupportedDashboardReferenceTypes } from "@gooddata/sdk-backend-spi";
2
2
  import { type FilterContextItem, type IDashboard, type IDashboardAttributeFilterConfig, type IDashboardBase, type IDashboardDefinition, type IDashboardFilterView, type IDashboardFilterViewSaveRequest, type IDashboardObjectIdentity, type IDashboardPermissions, type IDashboardPlugin, type IDashboardPluginDefinition, type IDashboardTab, type IDashboardWidget, type IDateFilter, type IExecutionDefinition, type IFilter, type IFilterContext, type IListedDashboard, type IObjectCertificationWrite, type IWidget, type ObjRef } from "@gooddata/sdk-model";
3
3
  import { type FiltersByTab, type TigerAuthenticatedCallGuard } from "../../../types/index.js";
4
- export declare function getDeletedDashboardTabs(originalTabs: IDashboardTab[], updatedTabs: IDashboardTab[]): IDashboardTab<IDashboardWidget>[];
4
+ export declare function getOrphanedTabFilterContexts(originalTabs: IDashboardTab[], currentTabs: IDashboardTab[]): IFilterContext[];
5
5
  export declare class TigerWorkspaceDashboards implements IWorkspaceDashboardsService {
6
6
  private readonly authCall;
7
7
  readonly workspace: string;
@@ -81,6 +81,7 @@ export declare class TigerWorkspaceDashboards implements IWorkspaceDashboardsSer
81
81
  private processDashboardTabsFilterContexts;
82
82
  private processFilterContextUpdate;
83
83
  private updateFilterContext;
84
+ private cleanupOrphanedTabFilterContexts;
84
85
  private deleteFilterContext;
85
86
  private getFilterContext;
86
87
  private prepareMetadata;
@@ -1,5 +1,5 @@
1
1
  // (C) 2020-2026 GoodData Corporation
2
- import { differenceBy, isEmpty, isEqual } from "lodash-es";
2
+ import { isEmpty, isEqual } from "lodash-es";
3
3
  import { invariant } from "ts-invariant";
4
4
  import { v4 as uuid } from "uuid";
5
5
  import { AnalyticalDashboardModelV2, MetadataUtilities, ValidateRelationsHeader, isDashboardPluginsItem, isDataSetItem, isVisualizationObjectsItem, } from "@gooddata/api-client-tiger";
@@ -27,8 +27,15 @@ import { getSettingsForCurrentUser } from "../settings/index.js";
27
27
  import { buildDashboardPermissions } from "./dashboardPermissions.js";
28
28
  import { DashboardsQuery } from "./dashboardsQuery.js";
29
29
  import { resolveWidgetFilters, resolveWidgetFiltersWithMultipleDateFilters } from "./widgetFilters.js";
30
- export function getDeletedDashboardTabs(originalTabs, updatedTabs) {
31
- return differenceBy(originalTabs, updatedTabs, "localIdentifier");
30
+ export function getOrphanedTabFilterContexts(originalTabs, currentTabs) {
31
+ const currentRefs = currentTabs
32
+ .map(({ filterContext }) => filterContext)
33
+ .filter(isFilterContext)
34
+ .map(({ ref }) => ref);
35
+ return originalTabs
36
+ .map(({ filterContext }) => filterContext)
37
+ .filter(isFilterContext)
38
+ .filter((filterContext) => !currentRefs.some((ref) => areObjRefsEqual(ref, filterContext.ref)));
32
39
  }
33
40
  export class TigerWorkspaceDashboards {
34
41
  authCall;
@@ -300,14 +307,7 @@ export class TigerWorkspaceDashboards {
300
307
  *
301
308
  * The following code prevents the creation of new filter-context orphans.
302
309
  */
303
- getDeletedDashboardTabs(originalDashboard.tabs ?? [], dashboard.tabs ?? [])
304
- .map(({ filterContext }) => filterContext)
305
- .filter(isFilterContext)
306
- .forEach((filterContext) => {
307
- this.deleteFilterContext(filterContext).catch((error) => {
308
- console.warn(`Failed to cleanup orphaned filter context`, filterContext.ref, error);
309
- });
310
- });
310
+ await this.cleanupOrphanedTabFilterContexts(originalDashboard.tabs ?? [], dashboard.tabs ?? []);
311
311
  return dashboard;
312
312
  };
313
313
  /**
@@ -495,6 +495,12 @@ export class TigerWorkspaceDashboards {
495
495
  }, {}),
496
496
  }
497
497
  : {};
498
+ const dashboardTabsParametersOverridesObj = options?.dashboardTabsParametersOverrides &&
499
+ Object.keys(options.dashboardTabsParametersOverrides).length > 0
500
+ ? {
501
+ dashboardTabsParametersOverrides: options.dashboardTabsParametersOverrides,
502
+ }
503
+ : {};
498
504
  const format = options?.format || "XLSX";
499
505
  const tabularExport = await ExportApi_CreateDashboardExportRequest(client.axios, client.basePath, {
500
506
  exportDashboardTabularExportRequest: {
@@ -516,6 +522,7 @@ export class TigerWorkspaceDashboards {
516
522
  widgetIds: options?.widgetIds,
517
523
  ...dashboardFiltersOverrideObj,
518
524
  ...dashboardTabsFiltersOverridesObj,
525
+ ...dashboardTabsParametersOverridesObj,
519
526
  },
520
527
  workspaceId: this.workspace,
521
528
  dashboardId,
@@ -1045,6 +1052,11 @@ export class TigerWorkspaceDashboards {
1045
1052
  });
1046
1053
  return convertFilterContextFromBackend(result.data);
1047
1054
  };
1055
+ cleanupOrphanedTabFilterContexts = async (originalTabs, currentTabs) => {
1056
+ await Promise.all(getOrphanedTabFilterContexts(originalTabs, currentTabs).map((filterContext) => this.deleteFilterContext(filterContext).catch((error) => {
1057
+ console.warn(`Failed to cleanup orphaned filter context`, filterContext.ref, error);
1058
+ })));
1059
+ };
1048
1060
  deleteFilterContext = async (filterContext) => {
1049
1061
  await this.authCall((client) => FilterContextApi_DeleteEntityFilterContexts(client.axios, client.basePath, {
1050
1062
  workspaceId: this.workspace,
@@ -1,11 +1,11 @@
1
- // (C) 2024 GoodData Corporation
1
+ // (C) 2024-2026 GoodData Corporation
2
2
  import { v4 as uuidv4 } from "uuid";
3
3
  let counter = 0;
4
4
  /**
5
5
  * When running e2e tests, we need to generate deterministic widget local identifiers.
6
6
  */
7
7
  export function generateWidgetLocalIdentifier() {
8
- if (window?.useSafeWidgetLocalIdentifiersForE2e === true) {
8
+ if (window?.useSafeLocalIdentifiersForE2e === true) {
9
9
  return `test_widget_local_identifier_${counter++}`;
10
10
  }
11
11
  return uuidv4();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-tiger",
3
- "version": "11.40.0-alpha.0",
3
+ "version": "11.40.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.40.0-alpha.0",
37
- "@gooddata/sdk-backend-spi": "11.40.0-alpha.0",
38
- "@gooddata/sdk-code-convertors": "11.40.0-alpha.0",
39
- "@gooddata/sdk-model": "11.40.0-alpha.0",
40
- "@gooddata/api-client-tiger": "11.40.0-alpha.0",
41
- "@gooddata/util": "11.40.0-alpha.0"
36
+ "@gooddata/api-client-tiger": "11.40.0-alpha.2",
37
+ "@gooddata/sdk-backend-base": "11.40.0-alpha.2",
38
+ "@gooddata/sdk-backend-spi": "11.40.0-alpha.2",
39
+ "@gooddata/sdk-code-convertors": "11.40.0-alpha.2",
40
+ "@gooddata/sdk-model": "11.40.0-alpha.2",
41
+ "@gooddata/util": "11.40.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/catalog-export": "11.40.0-alpha.0",
69
- "@gooddata/eslint-config": "11.40.0-alpha.0",
70
- "@gooddata/oxlint-config": "11.40.0-alpha.0",
71
- "@gooddata/reference-workspace": "11.40.0-alpha.0"
68
+ "@gooddata/catalog-export": "11.40.0-alpha.2",
69
+ "@gooddata/eslint-config": "11.40.0-alpha.2",
70
+ "@gooddata/oxlint-config": "11.40.0-alpha.2",
71
+ "@gooddata/reference-workspace": "11.40.0-alpha.2"
72
72
  },
73
73
  "scripts": {
74
74
  "_phase:build": "npm run build",