@gooddata/sdk-backend-tiger 11.40.0-alpha.3 → 11.40.0-alpha.4

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.3";
1
+ export declare const LIB_VERSION = "11.40.0-alpha.4";
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.3";
3
+ export const LIB_VERSION = "11.40.0-alpha.4";
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";
@@ -169,6 +169,7 @@ export function mapFeatures(features) {
169
169
  ...loadFeature(features, TigerFeaturesNames.EnableUserDataFiltersUi, "enableUserDataFiltersUi", "BOOLEAN", FeatureFlagsValues.enableUserDataFiltersUi),
170
170
  ...loadFeature(features, TigerFeaturesNames.EnableEnhancedInsightPicker, "enableEnhancedInsightPicker", "BOOLEAN", FeatureFlagsValues.enableEnhancedInsightPicker),
171
171
  ...loadFeature(features, TigerFeaturesNames.EnableMetricEditorRemoteModule, "enableShellApplication_metricEditor", "BOOLEAN", FeatureFlagsValues.enableShellApplication_metricEditor),
172
+ ...loadFeature(features, TigerFeaturesNames.EnableDashboardSidebarResize, "enableDashboardSidebarResize", "BOOLEAN", FeatureFlagsValues.enableDashboardSidebarResize),
172
173
  };
173
174
  }
174
175
  function loadFeature(features, feature, name, outputType, possibleValues) {
@@ -169,7 +169,8 @@ export declare enum TigerFeaturesNames {
169
169
  EnableAiAgenticMultiConversations = "enableAiAgenticMultiConversations",
170
170
  EnableAiLlmAnthropicProvider = "enableAiLlmAnthropicProvider",
171
171
  EnableRadarChart = "enableRadarChart",
172
- EnableMetricEditorRemoteModule = "enableShellApplication_metricEditor"
172
+ EnableMetricEditorRemoteModule = "enableShellApplication_metricEditor",
173
+ EnableDashboardSidebarResize = "enableDashboardSidebarResize"
173
174
  }
174
175
  export type ITigerFeatureFlags = {
175
176
  dashboardEditModeDevRollout: (typeof FeatureFlagsValues)["dashboardEditModeDevRollout"][number];
@@ -338,6 +339,7 @@ export type ITigerFeatureFlags = {
338
339
  enableEnhancedInsightPicker: (typeof FeatureFlagsValues)["enableEnhancedInsightPicker"][number];
339
340
  enableAiLlmAnthropicProvider: (typeof FeatureFlagsValues)["enableAiLlmAnthropicProvider"][number];
340
341
  enableShellApplication_metricEditor: (typeof FeatureFlagsValues)["enableShellApplication_metricEditor"][number];
342
+ enableDashboardSidebarResize: (typeof FeatureFlagsValues)["enableDashboardSidebarResize"][number];
341
343
  };
342
344
  export declare const DefaultFeatureFlags: ITigerFeatureFlags;
343
345
  export declare const FeatureFlagsValues: {
@@ -508,4 +510,5 @@ export declare const FeatureFlagsValues: {
508
510
  enableEnhancedInsightPicker: readonly [true, false];
509
511
  enableAiLlmAnthropicProvider: readonly [true, false];
510
512
  enableShellApplication_metricEditor: readonly [true, false];
513
+ enableDashboardSidebarResize: readonly [true, false];
511
514
  };
@@ -174,6 +174,7 @@ var TigerFeaturesNames;
174
174
  TigerFeaturesNames["EnableAiLlmAnthropicProvider"] = "enableAiLlmAnthropicProvider";
175
175
  TigerFeaturesNames["EnableRadarChart"] = "enableRadarChart";
176
176
  TigerFeaturesNames["EnableMetricEditorRemoteModule"] = "enableShellApplication_metricEditor";
177
+ TigerFeaturesNames["EnableDashboardSidebarResize"] = "enableDashboardSidebarResize";
177
178
  })(TigerFeaturesNames || (TigerFeaturesNames = {}));
178
179
  export const DefaultFeatureFlags = {
179
180
  dashboardEditModeDevRollout: true,
@@ -342,6 +343,7 @@ export const DefaultFeatureFlags = {
342
343
  enableEnhancedInsightPicker: false,
343
344
  enableAiLlmAnthropicProvider: false,
344
345
  enableShellApplication_metricEditor: false,
346
+ enableDashboardSidebarResize: false,
345
347
  };
346
348
  export const FeatureFlagsValues = {
347
349
  dashboardEditModeDevRollout: [true, false],
@@ -511,4 +513,5 @@ export const FeatureFlagsValues = {
511
513
  enableEnhancedInsightPicker: [true, false],
512
514
  enableAiLlmAnthropicProvider: [true, false],
513
515
  enableShellApplication_metricEditor: [true, false],
516
+ enableDashboardSidebarResize: [true, false],
514
517
  };
@@ -1,4 +1,4 @@
1
- import { type IAnalyticalWorkspace, type IAttributeHierarchiesService, type IDataFiltersService, type IDateFilterConfigsQuery, type IExecutionFactory, type IGenAIService, type IReferencesService, type IWorkspaceAccessControlService, type IWorkspaceAttributesService, type IWorkspaceAutomationService, type IWorkspaceCatalogFactory, type IWorkspaceDashboardsService, type IWorkspaceDatasetsService, type IWorkspaceDescriptor, type IWorkspaceDescriptorUpdate, type IWorkspaceExportDefinitionsService, type IWorkspaceFactsService, type IWorkspaceInsightsService, type IWorkspaceKeyDriverAnalysisService, type IWorkspaceLogicalModelService, type IWorkspaceMeasuresService, type IWorkspaceParametersService, type IWorkspacePermissionsService, type IWorkspaceSettingsService, type IWorkspaceStylingService, type IWorkspaceUserGroupsQuery, type IWorkspaceUsersQuery } from "@gooddata/sdk-backend-spi";
1
+ import { type IAnalyticalWorkspace, type IAttributeHierarchiesService, type IDataFiltersService, type IDateFilterConfigsQuery, type IExecutionFactory, type IGenAIService, type IReferencesService, type IWorkspaceAccessControlService, type IWorkspaceAttributesService, type IWorkspaceAutomationService, type IWorkspaceCatalogFactory, type IWorkspaceDashboardsService, type IWorkspaceDatasetsService, type IWorkspaceDescriptor, type IWorkspaceDescriptorUpdate, type IWorkspaceExportDefinitionsService, type IWorkspaceFactsService, type IWorkspaceInsightsService, type IWorkspaceKeyDriverAnalysisService, type IWorkspaceLogicalModelService, type IWorkspaceMeasuresService, type IWorkspaceObjectPermissionsService, type IWorkspaceParametersService, type IWorkspacePermissionsService, type IWorkspaceSettingsService, type IWorkspaceStylingService, type IWorkspaceUserGroupsQuery, type IWorkspaceUsersQuery } from "@gooddata/sdk-backend-spi";
2
2
  import { type DateFormatter, type DateNormalizer, type DateStringifier } from "../../convertors/fromBackend/dateFormatting/types.js";
3
3
  import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
4
4
  export declare class TigerWorkspace implements IAnalyticalWorkspace {
@@ -28,6 +28,7 @@ export declare class TigerWorkspace implements IAnalyticalWorkspace {
28
28
  users(): IWorkspaceUsersQuery;
29
29
  userGroups(): IWorkspaceUserGroupsQuery;
30
30
  accessControl(): IWorkspaceAccessControlService;
31
+ objectPermissions(): IWorkspaceObjectPermissionsService;
31
32
  dateFilterConfigs(): IDateFilterConfigsQuery;
32
33
  attributeHierarchies(): IAttributeHierarchiesService;
33
34
  exportDefinitions(): IWorkspaceExportDefinitionsService;
@@ -22,6 +22,7 @@ import { TigerWorkspaceInsights } from "./insights/index.js";
22
22
  import { TigerWorkspaceKeyDriverAnalysis } from "./keyDriverAnalysis/index.js";
23
23
  import { TigerWorkspaceLogicalModelService } from "./ldm/index.js";
24
24
  import { TigerWorkspaceMeasures } from "./measures/index.js";
25
+ import { TigerWorkspaceObjectPermissionsService } from "./objectPermissions/index.js";
25
26
  import { TigerWorkspaceParameters } from "./parameters/index.js";
26
27
  import { TigerWorkspacePermissionsFactory } from "./permissions/index.js";
27
28
  import { TigerReferencesService } from "./references/index.js";
@@ -126,6 +127,9 @@ export class TigerWorkspace {
126
127
  accessControl() {
127
128
  return new TigerWorkspaceAccessControlService(this.authCall, this.workspace);
128
129
  }
130
+ objectPermissions() {
131
+ return new TigerWorkspaceObjectPermissionsService(this.authCall, this.workspace);
132
+ }
129
133
  dateFilterConfigs() {
130
134
  return new TigerWorkspaceDateFilterConfigsQuery(this.authCall, this.workspace);
131
135
  }
@@ -0,0 +1,13 @@
1
+ import { type IObjectPermissionsObject, type IWorkspaceObjectPermissionsService } from "@gooddata/sdk-backend-spi";
2
+ import { type IAvailableAccessGrantee, type IGranularAccessGrantee, type IObjectAccessList } from "@gooddata/sdk-model";
3
+ import { type TigerAuthenticatedCallGuard } from "../../../types/index.js";
4
+ export declare class TigerWorkspaceObjectPermissionsService implements IWorkspaceObjectPermissionsService {
5
+ private readonly authCall;
6
+ private readonly workspace;
7
+ constructor(authCall: TigerAuthenticatedCallGuard, workspace: string);
8
+ getAccessList(target: IObjectPermissionsObject): Promise<IObjectAccessList>;
9
+ manageObjectPermissions(target: IObjectPermissionsObject, grantees: IGranularAccessGrantee[]): Promise<void>;
10
+ getAvailableAssignees(_target: IObjectPermissionsObject): Promise<IAvailableAccessGrantee[]>;
11
+ private fetchAllWorkspaceUsers;
12
+ private fetchAllWorkspaceUserGroups;
13
+ }
@@ -0,0 +1,129 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { ActionsApi_AttributePermissions, ActionsApi_FactPermissions, ActionsApi_LabelPermissions, ActionsApi_ListWorkspaceUserGroups, ActionsApi_ListWorkspaceUsers, ActionsApi_ManageAttributePermissions, ActionsApi_ManageFactPermissions, ActionsApi_ManageLabelPermissions, } from "@gooddata/api-client-tiger/endpoints/actions";
3
+ import { ProfileApi_GetCurrent } from "@gooddata/api-client-tiger/endpoints/profile";
4
+ import { isGranularUserAccessGrantee, } from "@gooddata/sdk-model";
5
+ import { convertRulesPermission, convertUserAssignee, convertUserGroupAssignee, convertUserGroupPermission, convertUserPermission, } from "../../../convertors/fromBackend/AccessControlConverter.js";
6
+ import { objRefToIdentifier } from "../../../utils/api.js";
7
+ const PAGE_SIZE = 1000;
8
+ export class TigerWorkspaceObjectPermissionsService {
9
+ authCall;
10
+ workspace;
11
+ constructor(authCall, workspace) {
12
+ this.authCall = authCall;
13
+ this.workspace = workspace;
14
+ }
15
+ async getAccessList(target) {
16
+ const objectId = objRefToIdentifier(target.ref, this.authCall);
17
+ const permissions = await this.authCall((client) => fetchPermissionsByKind(client, target.kind, this.workspace, objectId).then((result) => result.data));
18
+ return {
19
+ grants: [
20
+ ...permissions.rules.map(convertRulesPermission),
21
+ ...permissions.users.map(convertUserPermission),
22
+ ...permissions.userGroups.map(convertUserGroupPermission),
23
+ ],
24
+ };
25
+ }
26
+ async manageObjectPermissions(target, grantees) {
27
+ const objectId = objRefToIdentifier(target.ref, this.authCall);
28
+ const payload = grantees.map((grantee) => {
29
+ if (grantee.type === "allWorkspaceUsers") {
30
+ return {
31
+ assigneeRule: { type: grantee.type },
32
+ permissions: grantee.permissions,
33
+ };
34
+ }
35
+ return {
36
+ assigneeIdentifier: {
37
+ id: objRefToIdentifier(grantee.granteeRef, this.authCall),
38
+ type: isGranularUserAccessGrantee(grantee) ? "user" : "userGroup",
39
+ },
40
+ permissions: grantee.permissions,
41
+ };
42
+ });
43
+ await this.authCall((client) => manageByKind(client, target.kind, this.workspace, objectId, payload));
44
+ }
45
+ async getAvailableAssignees(_target) {
46
+ // Composed from workspace-wide user/group lists, filtered to exclude the
47
+ // current user. Admins aren't filtered: the listing endpoints don't
48
+ // expose role information.
49
+ const [currentUserId, users, userGroups] = await Promise.all([
50
+ this.authCall((client) => ProfileApi_GetCurrent(client.axios).then((p) => p.userId)),
51
+ this.fetchAllWorkspaceUsers(),
52
+ this.fetchAllWorkspaceUserGroups(),
53
+ ]);
54
+ return [
55
+ ...users
56
+ .filter((u) => u.id !== currentUserId)
57
+ .map((u) => convertUserAssignee(workspaceUserToAssignee(u))),
58
+ ...userGroups.map((g) => convertUserGroupAssignee(workspaceUserGroupToAssignee(g))),
59
+ ];
60
+ }
61
+ fetchAllWorkspaceUsers() {
62
+ return fetchAllPages((page) => this.authCall((client) => ActionsApi_ListWorkspaceUsers(client.axios, client.basePath, {
63
+ workspaceId: this.workspace,
64
+ page,
65
+ size: PAGE_SIZE,
66
+ }).then((result) => ({ items: result.data.users, totalCount: result.data.totalCount }))));
67
+ }
68
+ fetchAllWorkspaceUserGroups() {
69
+ return fetchAllPages((page) => this.authCall((client) => ActionsApi_ListWorkspaceUserGroups(client.axios, client.basePath, {
70
+ workspaceId: this.workspace,
71
+ page,
72
+ size: PAGE_SIZE,
73
+ }).then((result) => ({
74
+ items: result.data.userGroups,
75
+ totalCount: result.data.totalCount,
76
+ }))));
77
+ }
78
+ }
79
+ const fetchAllPages = async (fetchPage) => {
80
+ const first = await fetchPage(0);
81
+ const out = [...first.items];
82
+ const pageCount = Math.ceil(first.totalCount / PAGE_SIZE);
83
+ for (let page = 1; page < pageCount; page++) {
84
+ const next = await fetchPage(page);
85
+ out.push(...next.items);
86
+ }
87
+ return out;
88
+ };
89
+ const fetchPermissionsByKind = (client, kind, workspaceId, objectId) => {
90
+ const { axios, basePath } = client;
91
+ switch (kind) {
92
+ case "attribute":
93
+ return ActionsApi_AttributePermissions(axios, basePath, {
94
+ workspaceId,
95
+ attributeId: objectId,
96
+ });
97
+ case "fact":
98
+ return ActionsApi_FactPermissions(axios, basePath, { workspaceId, factId: objectId });
99
+ case "label":
100
+ return ActionsApi_LabelPermissions(axios, basePath, { workspaceId, labelId: objectId });
101
+ }
102
+ };
103
+ const manageByKind = (client, kind, workspaceId, objectId, manageLabelPermissionsRequestInner) => {
104
+ const { axios, basePath } = client;
105
+ switch (kind) {
106
+ case "attribute":
107
+ return ActionsApi_ManageAttributePermissions(axios, basePath, {
108
+ workspaceId,
109
+ attributeId: objectId,
110
+ manageLabelPermissionsRequestInner,
111
+ });
112
+ case "fact":
113
+ return ActionsApi_ManageFactPermissions(axios, basePath, {
114
+ workspaceId,
115
+ factId: objectId,
116
+ manageLabelPermissionsRequestInner,
117
+ });
118
+ case "label":
119
+ return ActionsApi_ManageLabelPermissions(axios, basePath, {
120
+ workspaceId,
121
+ labelId: objectId,
122
+ manageLabelPermissionsRequestInner,
123
+ });
124
+ }
125
+ };
126
+ // WorkspaceUser and UserAssignee carry the same fields. Same for groups. Pass through
127
+ // rather than introduce parallel converters.
128
+ const workspaceUserToAssignee = (u) => u;
129
+ const workspaceUserGroupToAssignee = (g) => g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-tiger",
3
- "version": "11.40.0-alpha.3",
3
+ "version": "11.40.0-alpha.4",
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.3",
37
- "@gooddata/api-client-tiger": "11.40.0-alpha.3",
38
- "@gooddata/sdk-backend-spi": "11.40.0-alpha.3",
39
- "@gooddata/sdk-code-convertors": "11.40.0-alpha.3",
40
- "@gooddata/sdk-model": "11.40.0-alpha.3",
41
- "@gooddata/util": "11.40.0-alpha.3"
36
+ "@gooddata/sdk-backend-base": "11.40.0-alpha.4",
37
+ "@gooddata/sdk-backend-spi": "11.40.0-alpha.4",
38
+ "@gooddata/api-client-tiger": "11.40.0-alpha.4",
39
+ "@gooddata/sdk-code-convertors": "11.40.0-alpha.4",
40
+ "@gooddata/sdk-model": "11.40.0-alpha.4",
41
+ "@gooddata/util": "11.40.0-alpha.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@gooddata/fixtures": "3.3.12",
@@ -60,15 +60,15 @@
60
60
  "eslint-plugin-no-barrel-files": "1.2.2",
61
61
  "eslint-plugin-sonarjs": "3.0.6",
62
62
  "npm-run-all": "^4.1.5",
63
- "oxfmt": "0.45.0",
64
- "oxlint": "^1.43.0",
65
- "oxlint-tsgolint": "0.11.4",
63
+ "oxfmt": "0.52.0",
64
+ "oxlint": "1.51.0",
65
+ "oxlint-tsgolint": "0.15.0",
66
66
  "typescript": "5.9.3",
67
- "vitest": "4.1.0",
68
- "@gooddata/eslint-config": "11.40.0-alpha.3",
69
- "@gooddata/catalog-export": "11.40.0-alpha.3",
70
- "@gooddata/oxlint-config": "11.40.0-alpha.3",
71
- "@gooddata/reference-workspace": "11.40.0-alpha.3"
67
+ "vitest": "4.1.8",
68
+ "@gooddata/catalog-export": "11.40.0-alpha.4",
69
+ "@gooddata/eslint-config": "11.40.0-alpha.4",
70
+ "@gooddata/oxlint-config": "11.40.0-alpha.4",
71
+ "@gooddata/reference-workspace": "11.40.0-alpha.4"
72
72
  },
73
73
  "scripts": {
74
74
  "_phase:build": "npm run build",