@gooddata/sdk-backend-tiger 11.40.0-alpha.3 → 11.40.0-alpha.5
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 +3 -0
- package/esm/backend/uiFeatures.d.ts +10 -1
- package/esm/backend/uiFeatures.js +9 -0
- package/esm/backend/workspace/index.d.ts +2 -1
- package/esm/backend/workspace/index.js +4 -0
- package/esm/backend/workspace/objectPermissions/index.d.ts +13 -0
- package/esm/backend/workspace/objectPermissions/index.js +129 -0
- package/package.json +15 -15
package/esm/__version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.40.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.40.0-alpha.5";
|
|
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
|
+
export const LIB_VERSION = "11.40.0-alpha.5";
|
|
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";
|
|
@@ -141,6 +141,7 @@ export function mapFeatures(features) {
|
|
|
141
141
|
...loadFeature(features, TigerFeaturesNames.EnableAiAgenticMultiConversations, "enableAiAgenticMultiConversations", "BOOLEAN", FeatureFlagsValues.enableAiAgenticMultiConversations),
|
|
142
142
|
...loadFeature(features, TigerFeaturesNames.EnableAiLlmAnthropicProvider, "enableAiLlmAnthropicProvider", "BOOLEAN", FeatureFlagsValues.enableAiLlmAnthropicProvider),
|
|
143
143
|
...loadFeature(features, TigerFeaturesNames.EnableGenAiVisualizationSummarySkill, "enableGenAiVisualizationSummarySkill", "BOOLEAN", FeatureFlagsValues.enableGenAiVisualizationSummarySkill),
|
|
144
|
+
...loadFeature(features, TigerFeaturesNames.EnableGenAiDashboardSummarySkill, "enableGenAiDashboardSummarySkill", "BOOLEAN", FeatureFlagsValues.enableGenAiDashboardSummarySkill),
|
|
144
145
|
...loadFeature(features, TigerFeaturesNames.EnableGenAiAgenticDataShareOptOut, "enableGenAiAgenticDataShareOptOut", "BOOLEAN", FeatureFlagsValues.enableGenAiAgenticDataShareOptOut),
|
|
145
146
|
...loadFeature(features, TigerFeaturesNames.AIChatSearchLimit, "aiChatSearchLimit", "NUMBER", FeatureFlagsValues.aiChatSearchLimit),
|
|
146
147
|
...loadFeature(features, TigerFeaturesNames.EnableKDEmptyDateValuesFilter, "enableKDEmptyDateValuesFilter", "BOOLEAN", FeatureFlagsValues.enableKDEmptyDateValuesFilter),
|
|
@@ -169,6 +170,8 @@ export function mapFeatures(features) {
|
|
|
169
170
|
...loadFeature(features, TigerFeaturesNames.EnableUserDataFiltersUi, "enableUserDataFiltersUi", "BOOLEAN", FeatureFlagsValues.enableUserDataFiltersUi),
|
|
170
171
|
...loadFeature(features, TigerFeaturesNames.EnableEnhancedInsightPicker, "enableEnhancedInsightPicker", "BOOLEAN", FeatureFlagsValues.enableEnhancedInsightPicker),
|
|
171
172
|
...loadFeature(features, TigerFeaturesNames.EnableMetricEditorRemoteModule, "enableShellApplication_metricEditor", "BOOLEAN", FeatureFlagsValues.enableShellApplication_metricEditor),
|
|
173
|
+
...loadFeature(features, TigerFeaturesNames.EnableAnalyticalDesignerRemoteModule, "enableShellApplication_analyticalDesigner", "BOOLEAN", FeatureFlagsValues.enableShellApplication_analyticalDesigner),
|
|
174
|
+
...loadFeature(features, TigerFeaturesNames.EnableDashboardSidebarResize, "enableDashboardSidebarResize", "BOOLEAN", FeatureFlagsValues.enableDashboardSidebarResize),
|
|
172
175
|
};
|
|
173
176
|
}
|
|
174
177
|
function loadFeature(features, feature, name, outputType, possibleValues) {
|
|
@@ -140,6 +140,7 @@ export declare enum TigerFeaturesNames {
|
|
|
140
140
|
EnableAiAgenticConversations = "enableAiAgenticConversations",
|
|
141
141
|
EnableGenAiAgenticDataShareOptOut = "enableGenAiAgenticDataShareOptOut",
|
|
142
142
|
EnableGenAiVisualizationSummarySkill = "enableGenAiVisualizationSummarySkill",
|
|
143
|
+
EnableGenAiDashboardSummarySkill = "enableGenAiDashboardSummarySkill",
|
|
143
144
|
AIChatSearchLimit = "aiChatSearchLimit",
|
|
144
145
|
EnableKDEmptyDateValuesFilter = "enableKDEmptyDateValuesFilter",
|
|
145
146
|
EnableRichTextWidgetFilterConfiguration = "enableRichTextWidgetFilterConfiguration",
|
|
@@ -169,7 +170,9 @@ export declare enum TigerFeaturesNames {
|
|
|
169
170
|
EnableAiAgenticMultiConversations = "enableAiAgenticMultiConversations",
|
|
170
171
|
EnableAiLlmAnthropicProvider = "enableAiLlmAnthropicProvider",
|
|
171
172
|
EnableRadarChart = "enableRadarChart",
|
|
172
|
-
EnableMetricEditorRemoteModule = "enableShellApplication_metricEditor"
|
|
173
|
+
EnableMetricEditorRemoteModule = "enableShellApplication_metricEditor",
|
|
174
|
+
EnableAnalyticalDesignerRemoteModule = "enableShellApplication_analyticalDesigner",
|
|
175
|
+
EnableDashboardSidebarResize = "enableDashboardSidebarResize"
|
|
173
176
|
}
|
|
174
177
|
export type ITigerFeatureFlags = {
|
|
175
178
|
dashboardEditModeDevRollout: (typeof FeatureFlagsValues)["dashboardEditModeDevRollout"][number];
|
|
@@ -333,11 +336,14 @@ export type ITigerFeatureFlags = {
|
|
|
333
336
|
enableAiAgenticConversations: (typeof FeatureFlagsValues)["enableAiAgenticConversations"][number];
|
|
334
337
|
enableGenAiAgenticDataShareOptOut: (typeof FeatureFlagsValues)["enableGenAiAgenticDataShareOptOut"][number];
|
|
335
338
|
enableGenAiVisualizationSummarySkill: (typeof FeatureFlagsValues)["enableGenAiVisualizationSummarySkill"][number];
|
|
339
|
+
enableGenAiDashboardSummarySkill: (typeof FeatureFlagsValues)["enableGenAiDashboardSummarySkill"][number];
|
|
336
340
|
enableAutomationTrigger: (typeof FeatureFlagsValues)["enableAutomationTrigger"][number];
|
|
337
341
|
enableUserDataFiltersUi: (typeof FeatureFlagsValues)["enableUserDataFiltersUi"][number];
|
|
338
342
|
enableEnhancedInsightPicker: (typeof FeatureFlagsValues)["enableEnhancedInsightPicker"][number];
|
|
339
343
|
enableAiLlmAnthropicProvider: (typeof FeatureFlagsValues)["enableAiLlmAnthropicProvider"][number];
|
|
340
344
|
enableShellApplication_metricEditor: (typeof FeatureFlagsValues)["enableShellApplication_metricEditor"][number];
|
|
345
|
+
enableShellApplication_analyticalDesigner: (typeof FeatureFlagsValues)["enableShellApplication_analyticalDesigner"][number];
|
|
346
|
+
enableDashboardSidebarResize: (typeof FeatureFlagsValues)["enableDashboardSidebarResize"][number];
|
|
341
347
|
};
|
|
342
348
|
export declare const DefaultFeatureFlags: ITigerFeatureFlags;
|
|
343
349
|
export declare const FeatureFlagsValues: {
|
|
@@ -503,9 +509,12 @@ export declare const FeatureFlagsValues: {
|
|
|
503
509
|
enableAiAgenticConversations: readonly [true, false];
|
|
504
510
|
enableGenAiAgenticDataShareOptOut: readonly [true, false];
|
|
505
511
|
enableGenAiVisualizationSummarySkill: readonly [false, true];
|
|
512
|
+
enableGenAiDashboardSummarySkill: readonly [false, true];
|
|
506
513
|
enableAutomationTrigger: readonly [true, false];
|
|
507
514
|
enableUserDataFiltersUi: readonly [true, false];
|
|
508
515
|
enableEnhancedInsightPicker: readonly [true, false];
|
|
509
516
|
enableAiLlmAnthropicProvider: readonly [true, false];
|
|
510
517
|
enableShellApplication_metricEditor: readonly [true, false];
|
|
518
|
+
enableShellApplication_analyticalDesigner: readonly [true, false];
|
|
519
|
+
enableDashboardSidebarResize: readonly [true, false];
|
|
511
520
|
};
|
|
@@ -144,6 +144,7 @@ var TigerFeaturesNames;
|
|
|
144
144
|
TigerFeaturesNames["EnableAiAgenticConversations"] = "enableAiAgenticConversations";
|
|
145
145
|
TigerFeaturesNames["EnableGenAiAgenticDataShareOptOut"] = "enableGenAiAgenticDataShareOptOut";
|
|
146
146
|
TigerFeaturesNames["EnableGenAiVisualizationSummarySkill"] = "enableGenAiVisualizationSummarySkill";
|
|
147
|
+
TigerFeaturesNames["EnableGenAiDashboardSummarySkill"] = "enableGenAiDashboardSummarySkill";
|
|
147
148
|
TigerFeaturesNames["AIChatSearchLimit"] = "aiChatSearchLimit";
|
|
148
149
|
TigerFeaturesNames["EnableKDEmptyDateValuesFilter"] = "enableKDEmptyDateValuesFilter";
|
|
149
150
|
TigerFeaturesNames["EnableRichTextWidgetFilterConfiguration"] = "enableRichTextWidgetFilterConfiguration";
|
|
@@ -174,6 +175,8 @@ var TigerFeaturesNames;
|
|
|
174
175
|
TigerFeaturesNames["EnableAiLlmAnthropicProvider"] = "enableAiLlmAnthropicProvider";
|
|
175
176
|
TigerFeaturesNames["EnableRadarChart"] = "enableRadarChart";
|
|
176
177
|
TigerFeaturesNames["EnableMetricEditorRemoteModule"] = "enableShellApplication_metricEditor";
|
|
178
|
+
TigerFeaturesNames["EnableAnalyticalDesignerRemoteModule"] = "enableShellApplication_analyticalDesigner";
|
|
179
|
+
TigerFeaturesNames["EnableDashboardSidebarResize"] = "enableDashboardSidebarResize";
|
|
177
180
|
})(TigerFeaturesNames || (TigerFeaturesNames = {}));
|
|
178
181
|
export const DefaultFeatureFlags = {
|
|
179
182
|
dashboardEditModeDevRollout: true,
|
|
@@ -337,11 +340,14 @@ export const DefaultFeatureFlags = {
|
|
|
337
340
|
enableAiAgenticConversations: false,
|
|
338
341
|
enableGenAiAgenticDataShareOptOut: false,
|
|
339
342
|
enableGenAiVisualizationSummarySkill: false,
|
|
343
|
+
enableGenAiDashboardSummarySkill: false,
|
|
340
344
|
enableAutomationTrigger: false,
|
|
341
345
|
enableUserDataFiltersUi: false,
|
|
342
346
|
enableEnhancedInsightPicker: false,
|
|
343
347
|
enableAiLlmAnthropicProvider: false,
|
|
344
348
|
enableShellApplication_metricEditor: false,
|
|
349
|
+
enableShellApplication_analyticalDesigner: false,
|
|
350
|
+
enableDashboardSidebarResize: false,
|
|
345
351
|
};
|
|
346
352
|
export const FeatureFlagsValues = {
|
|
347
353
|
dashboardEditModeDevRollout: [true, false],
|
|
@@ -506,9 +512,12 @@ export const FeatureFlagsValues = {
|
|
|
506
512
|
enableAiAgenticConversations: [true, false],
|
|
507
513
|
enableGenAiAgenticDataShareOptOut: [true, false],
|
|
508
514
|
enableGenAiVisualizationSummarySkill: [false, true],
|
|
515
|
+
enableGenAiDashboardSummarySkill: [false, true],
|
|
509
516
|
enableAutomationTrigger: [true, false],
|
|
510
517
|
enableUserDataFiltersUi: [true, false],
|
|
511
518
|
enableEnhancedInsightPicker: [true, false],
|
|
512
519
|
enableAiLlmAnthropicProvider: [true, false],
|
|
513
520
|
enableShellApplication_metricEditor: [true, false],
|
|
521
|
+
enableShellApplication_analyticalDesigner: [true, false],
|
|
522
|
+
enableDashboardSidebarResize: [true, false],
|
|
514
523
|
};
|
|
@@ -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
|
+
"version": "11.40.0-alpha.5",
|
|
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/
|
|
37
|
-
"@gooddata/
|
|
38
|
-
"@gooddata/sdk-backend-spi": "11.40.0-alpha.
|
|
39
|
-
"@gooddata/sdk-code-convertors": "11.40.0-alpha.
|
|
40
|
-
"@gooddata/sdk-model": "11.40.0-alpha.
|
|
41
|
-
"@gooddata/util": "11.40.0-alpha.
|
|
36
|
+
"@gooddata/api-client-tiger": "11.40.0-alpha.5",
|
|
37
|
+
"@gooddata/sdk-backend-base": "11.40.0-alpha.5",
|
|
38
|
+
"@gooddata/sdk-backend-spi": "11.40.0-alpha.5",
|
|
39
|
+
"@gooddata/sdk-code-convertors": "11.40.0-alpha.5",
|
|
40
|
+
"@gooddata/sdk-model": "11.40.0-alpha.5",
|
|
41
|
+
"@gooddata/util": "11.40.0-alpha.5"
|
|
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.
|
|
64
|
-
"oxlint": "
|
|
65
|
-
"oxlint-tsgolint": "0.
|
|
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.
|
|
68
|
-
"@gooddata/
|
|
69
|
-
"@gooddata/
|
|
70
|
-
"@gooddata/oxlint-config": "11.40.0-alpha.
|
|
71
|
-
"@gooddata/reference-workspace": "11.40.0-alpha.
|
|
67
|
+
"vitest": "4.1.8",
|
|
68
|
+
"@gooddata/catalog-export": "11.40.0-alpha.5",
|
|
69
|
+
"@gooddata/eslint-config": "11.40.0-alpha.5",
|
|
70
|
+
"@gooddata/oxlint-config": "11.40.0-alpha.5",
|
|
71
|
+
"@gooddata/reference-workspace": "11.40.0-alpha.5"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"_phase:build": "npm run build",
|