@gooddata/sdk-backend-tiger 11.41.0-alpha.0 → 11.41.0-alpha.1
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 -0
- package/esm/backend/organization/fromBackend/userConvertor.js +2 -0
- package/esm/backend/organization/index.d.ts +2 -1
- package/esm/backend/organization/index.js +4 -0
- package/esm/backend/organization/ipAllowlists.d.ts +11 -0
- package/esm/backend/organization/ipAllowlists.js +111 -0
- package/esm/backend/uiFeatures.d.ts +7 -1
- package/esm/backend/uiFeatures.js +7 -1
- package/package.json +11 -11
package/esm/__version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.41.0-alpha.
|
|
1
|
+
export declare const LIB_VERSION = "11.41.0-alpha.1";
|
|
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.41.0-alpha.
|
|
3
|
+
export const LIB_VERSION = "11.41.0-alpha.1";
|
|
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";
|
|
@@ -174,6 +174,8 @@ export function mapFeatures(features) {
|
|
|
174
174
|
...loadFeature(features, TigerFeaturesNames.EnableMetricEditorRemoteModule, "enableShellApplication_metricEditor", "BOOLEAN", FeatureFlagsValues.enableShellApplication_metricEditor),
|
|
175
175
|
...loadFeature(features, TigerFeaturesNames.EnableAnalyticalDesignerRemoteModule, "enableShellApplication_analyticalDesigner", "BOOLEAN", FeatureFlagsValues.enableShellApplication_analyticalDesigner),
|
|
176
176
|
...loadFeature(features, TigerFeaturesNames.EnableDashboardSidebarResize, "enableDashboardSidebarResize", "BOOLEAN", FeatureFlagsValues.enableDashboardSidebarResize),
|
|
177
|
+
...loadFeature(features, TigerFeaturesNames.EnableIpAllowlistsUi, "enableIpAllowlistsUi", "BOOLEAN", FeatureFlagsValues.enableIpAllowlistsUi),
|
|
178
|
+
...loadFeature(features, TigerFeaturesNames.EnableLdmModelerRemoteModule, "enableShellApplication_ldmModeler", "BOOLEAN", FeatureFlagsValues.enableShellApplication_ldmModeler),
|
|
177
179
|
};
|
|
178
180
|
}
|
|
179
181
|
function loadFeature(features, feature, name, outputType, possibleValues) {
|
|
@@ -67,6 +67,7 @@ export const convertEntityUserToOrganizationUser = (user) => {
|
|
|
67
67
|
email: user.attributes?.email,
|
|
68
68
|
fullName: constructFullName(firstName, lastName),
|
|
69
69
|
isOrganizationAdmin: false,
|
|
70
|
+
isSystemAccount: user.attributes?.systemAccount ?? false,
|
|
70
71
|
assignedUserGroups: [],
|
|
71
72
|
assignedWorkspaces: [],
|
|
72
73
|
assignedDataSources: [],
|
|
@@ -78,6 +79,7 @@ export const convertOrganizationUser = (user) => ({
|
|
|
78
79
|
email: user.email,
|
|
79
80
|
fullName: user.name,
|
|
80
81
|
isOrganizationAdmin: user.organizationAdmin,
|
|
82
|
+
isSystemAccount: user.systemAccount ?? false,
|
|
81
83
|
assignedUserGroups: user.userGroups.map(convertUserGroupIdentifier),
|
|
82
84
|
assignedWorkspaces: user.workspaces.map((ws) => convertWorkspacePermissionsAssignment(user.id, "user", ws)),
|
|
83
85
|
assignedDataSources: user.dataSources.map((ds) => convertDataSourcePermissionsAssignment(user.id, "user", ds)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type IOrganization, type IOrganizationAgentsService, type IOrganizationAutomationService, type IOrganizationExportTemplatesService, type IOrganizationGenAIService, type IOrganizationLlmProvidersService, type IOrganizationNotificationChannelService, type IOrganizationNotificationService, type IOrganizationPermissionService, type IOrganizationSettingsService, type IOrganizationStylingService, type IOrganizationUserService, type IOrganizations, type ISecuritySettingsService } from "@gooddata/sdk-backend-spi";
|
|
1
|
+
import { type IOrganization, type IOrganizationAgentsService, type IOrganizationAutomationService, type IOrganizationExportTemplatesService, type IOrganizationGenAIService, type IOrganizationIpAllowlistService, type IOrganizationLlmProvidersService, type IOrganizationNotificationChannelService, type IOrganizationNotificationService, type IOrganizationPermissionService, type IOrganizationSettingsService, type IOrganizationStylingService, type IOrganizationUserService, type IOrganizations, type ISecuritySettingsService } from "@gooddata/sdk-backend-spi";
|
|
2
2
|
import { type IOrganizationDescriptor, type IOrganizationDescriptorUpdate } from "@gooddata/sdk-model";
|
|
3
3
|
import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
|
|
4
4
|
export declare class TigerOrganization implements IOrganization {
|
|
@@ -20,6 +20,7 @@ export declare class TigerOrganization implements IOrganization {
|
|
|
20
20
|
agents(): IOrganizationAgentsService;
|
|
21
21
|
genAI(): IOrganizationGenAIService;
|
|
22
22
|
exportTemplates(): IOrganizationExportTemplatesService;
|
|
23
|
+
ipAllowlists(): IOrganizationIpAllowlistService;
|
|
23
24
|
}
|
|
24
25
|
export declare class TigerOrganizations implements IOrganizations {
|
|
25
26
|
private readonly authCall;
|
|
@@ -6,6 +6,7 @@ import { OrganizationAgentsService } from "./agents.js";
|
|
|
6
6
|
import { TigerOrganizationAutomationService } from "./automations/index.js";
|
|
7
7
|
import { OrganizationExportTemplatesService } from "./exportTemplates.js";
|
|
8
8
|
import { TigerOrganizationGenAIService } from "./genAI/index.js";
|
|
9
|
+
import { OrganizationIpAllowlistService } from "./ipAllowlists.js";
|
|
9
10
|
import { OrganizationLlmProvidersService } from "./llmProviders.js";
|
|
10
11
|
import { OrganizationNotificationChannelService } from "./notificationChannels.js";
|
|
11
12
|
import { OrganizationNotificationService } from "./notifications.js";
|
|
@@ -138,6 +139,9 @@ export class TigerOrganization {
|
|
|
138
139
|
exportTemplates() {
|
|
139
140
|
return new OrganizationExportTemplatesService(this.authCall);
|
|
140
141
|
}
|
|
142
|
+
ipAllowlists() {
|
|
143
|
+
return new OrganizationIpAllowlistService(this.authCall);
|
|
144
|
+
}
|
|
141
145
|
}
|
|
142
146
|
export class TigerOrganizations {
|
|
143
147
|
authCall;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type IOrganizationIpAllowlistService } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { type IIpAllowlist, type IIpAllowlistDefinition } from "@gooddata/sdk-model";
|
|
3
|
+
import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
|
|
4
|
+
export declare class OrganizationIpAllowlistService implements IOrganizationIpAllowlistService {
|
|
5
|
+
readonly authCall: TigerAuthenticatedCallGuard;
|
|
6
|
+
constructor(authCall: TigerAuthenticatedCallGuard);
|
|
7
|
+
getAll(): Promise<IIpAllowlist[]>;
|
|
8
|
+
create(definition: IIpAllowlistDefinition): Promise<IIpAllowlist>;
|
|
9
|
+
update(definition: IIpAllowlistDefinition): Promise<IIpAllowlist>;
|
|
10
|
+
delete(id: string): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import { EntitiesApi_CreateEntityIpAllowlistPolicies, EntitiesApi_DeleteEntityIpAllowlistPolicies, EntitiesApi_GetAllEntitiesIpAllowlistPolicies, EntitiesApi_UpdateEntityIpAllowlistPolicies, } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
|
|
3
|
+
import { UnexpectedError } from "@gooddata/sdk-backend-spi";
|
|
4
|
+
const buildIncludedMaps = (included) => {
|
|
5
|
+
const usersById = new Map();
|
|
6
|
+
const userGroupsById = new Map();
|
|
7
|
+
for (const inc of included ?? []) {
|
|
8
|
+
if (inc.type === "user") {
|
|
9
|
+
usersById.set(inc.id, inc);
|
|
10
|
+
}
|
|
11
|
+
else if (inc.type === "userGroup") {
|
|
12
|
+
userGroupsById.set(inc.id, inc);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return { usersById, userGroupsById };
|
|
16
|
+
};
|
|
17
|
+
const resolveUser = (id, maps) => {
|
|
18
|
+
const attrs = maps.usersById.get(id)?.attributes;
|
|
19
|
+
const firstname = attrs?.firstname?.trim();
|
|
20
|
+
const lastname = attrs?.lastname?.trim();
|
|
21
|
+
const fullName = [firstname, lastname].filter(Boolean).join(" ") || undefined;
|
|
22
|
+
return {
|
|
23
|
+
id,
|
|
24
|
+
fullName,
|
|
25
|
+
email: attrs?.email,
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
const resolveUserGroup = (id, maps) => ({
|
|
29
|
+
id,
|
|
30
|
+
name: maps.userGroupsById.get(id)?.attributes?.name,
|
|
31
|
+
});
|
|
32
|
+
// Maps a policy resource (from the list or single-entity endpoints) plus the response's
|
|
33
|
+
// resolved `included` users/groups into the SDK model. Shared by getAll/create/update.
|
|
34
|
+
const mapPolicy = (item, maps) => {
|
|
35
|
+
const userIds = (item.relationships?.users?.data ?? []).map((u) => u.id);
|
|
36
|
+
const userGroupIds = (item.relationships?.userGroups?.data ?? []).map((g) => g.id);
|
|
37
|
+
return {
|
|
38
|
+
id: item.id,
|
|
39
|
+
allowedSources: item.attributes?.allowedSources ?? [],
|
|
40
|
+
userIds,
|
|
41
|
+
userGroupIds,
|
|
42
|
+
users: userIds.map((id) => resolveUser(id, maps)),
|
|
43
|
+
userGroups: userGroupIds.map((id) => resolveUserGroup(id, maps)),
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
// Builds the JSON:API request body shared by create/update.
|
|
47
|
+
const buildPolicyDocument = (definition) => ({
|
|
48
|
+
data: {
|
|
49
|
+
id: definition.id,
|
|
50
|
+
type: "ipAllowlistPolicy",
|
|
51
|
+
attributes: {
|
|
52
|
+
allowedSources: definition.allowedSources,
|
|
53
|
+
},
|
|
54
|
+
relationships: {
|
|
55
|
+
users: {
|
|
56
|
+
data: definition.userIds.map((id) => ({ id, type: "user" })),
|
|
57
|
+
},
|
|
58
|
+
userGroups: {
|
|
59
|
+
data: definition.userGroupIds.map((id) => ({ id, type: "userGroup" })),
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
export class OrganizationIpAllowlistService {
|
|
65
|
+
authCall;
|
|
66
|
+
constructor(authCall) {
|
|
67
|
+
this.authCall = authCall;
|
|
68
|
+
}
|
|
69
|
+
getAll() {
|
|
70
|
+
return this.authCall(async (client) => {
|
|
71
|
+
const result = await EntitiesApi_GetAllEntitiesIpAllowlistPolicies(client.axios, client.basePath,
|
|
72
|
+
// page size 200 (there should be a limit of 100 so this is sufficiently more)
|
|
73
|
+
// see IpAllowlistPolicyValidation.kt#L12-L15
|
|
74
|
+
{ include: ["users", "userGroups"], size: 200 });
|
|
75
|
+
const maps = buildIncludedMaps(result.data?.included);
|
|
76
|
+
return (result.data?.data ?? []).map((item) => mapPolicy(item, maps));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
create(definition) {
|
|
80
|
+
return this.authCall(async (client) => {
|
|
81
|
+
const result = await EntitiesApi_CreateEntityIpAllowlistPolicies(client.axios, client.basePath, {
|
|
82
|
+
include: ["users", "userGroups"],
|
|
83
|
+
jsonApiIpAllowlistPolicyInDocument: buildPolicyDocument(definition),
|
|
84
|
+
});
|
|
85
|
+
const created = result.data?.data;
|
|
86
|
+
if (!created) {
|
|
87
|
+
throw new UnexpectedError("Failed to create IP allowlist policy");
|
|
88
|
+
}
|
|
89
|
+
return mapPolicy(created, buildIncludedMaps(result.data?.included));
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
update(definition) {
|
|
93
|
+
return this.authCall(async (client) => {
|
|
94
|
+
const result = await EntitiesApi_UpdateEntityIpAllowlistPolicies(client.axios, client.basePath, {
|
|
95
|
+
id: definition.id,
|
|
96
|
+
include: ["users", "userGroups"],
|
|
97
|
+
jsonApiIpAllowlistPolicyInDocument: buildPolicyDocument(definition),
|
|
98
|
+
});
|
|
99
|
+
const updated = result.data?.data;
|
|
100
|
+
if (!updated) {
|
|
101
|
+
throw new UnexpectedError("Failed to update IP allowlist policy");
|
|
102
|
+
}
|
|
103
|
+
return mapPolicy(updated, buildIncludedMaps(result.data?.included));
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
delete(id) {
|
|
107
|
+
return this.authCall(async (client) => {
|
|
108
|
+
await EntitiesApi_DeleteEntityIpAllowlistPolicies(client.axios, client.basePath, { id });
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -174,7 +174,9 @@ export declare enum TigerFeaturesNames {
|
|
|
174
174
|
EnableRadarChart = "enableRadarChart",
|
|
175
175
|
EnableMetricEditorRemoteModule = "enableShellApplication_metricEditor",
|
|
176
176
|
EnableAnalyticalDesignerRemoteModule = "enableShellApplication_analyticalDesigner",
|
|
177
|
-
EnableDashboardSidebarResize = "enableDashboardSidebarResize"
|
|
177
|
+
EnableDashboardSidebarResize = "enableDashboardSidebarResize",
|
|
178
|
+
EnableIpAllowlistsUi = "enableIpAllowlistsUi",
|
|
179
|
+
EnableLdmModelerRemoteModule = "enableShellApplication_ldmModeler"
|
|
178
180
|
}
|
|
179
181
|
export type ITigerFeatureFlags = {
|
|
180
182
|
dashboardEditModeDevRollout: (typeof FeatureFlagsValues)["dashboardEditModeDevRollout"][number];
|
|
@@ -348,6 +350,8 @@ export type ITigerFeatureFlags = {
|
|
|
348
350
|
enableShellApplication_metricEditor: (typeof FeatureFlagsValues)["enableShellApplication_metricEditor"][number];
|
|
349
351
|
enableShellApplication_analyticalDesigner: (typeof FeatureFlagsValues)["enableShellApplication_analyticalDesigner"][number];
|
|
350
352
|
enableDashboardSidebarResize: (typeof FeatureFlagsValues)["enableDashboardSidebarResize"][number];
|
|
353
|
+
enableIpAllowlistsUi: (typeof FeatureFlagsValues)["enableIpAllowlistsUi"][number];
|
|
354
|
+
enableShellApplication_ldmModeler: (typeof FeatureFlagsValues)["enableShellApplication_ldmModeler"][number];
|
|
351
355
|
};
|
|
352
356
|
export declare const DefaultFeatureFlags: ITigerFeatureFlags;
|
|
353
357
|
export declare const FeatureFlagsValues: {
|
|
@@ -523,4 +527,6 @@ export declare const FeatureFlagsValues: {
|
|
|
523
527
|
enableShellApplication_metricEditor: readonly [true, false];
|
|
524
528
|
enableShellApplication_analyticalDesigner: readonly [true, false];
|
|
525
529
|
enableDashboardSidebarResize: readonly [true, false];
|
|
530
|
+
enableIpAllowlistsUi: readonly [false, true];
|
|
531
|
+
enableShellApplication_ldmModeler: readonly [true, false];
|
|
526
532
|
};
|
|
@@ -179,6 +179,8 @@ var TigerFeaturesNames;
|
|
|
179
179
|
TigerFeaturesNames["EnableMetricEditorRemoteModule"] = "enableShellApplication_metricEditor";
|
|
180
180
|
TigerFeaturesNames["EnableAnalyticalDesignerRemoteModule"] = "enableShellApplication_analyticalDesigner";
|
|
181
181
|
TigerFeaturesNames["EnableDashboardSidebarResize"] = "enableDashboardSidebarResize";
|
|
182
|
+
TigerFeaturesNames["EnableIpAllowlistsUi"] = "enableIpAllowlistsUi";
|
|
183
|
+
TigerFeaturesNames["EnableLdmModelerRemoteModule"] = "enableShellApplication_ldmModeler";
|
|
182
184
|
})(TigerFeaturesNames || (TigerFeaturesNames = {}));
|
|
183
185
|
export const DefaultFeatureFlags = {
|
|
184
186
|
dashboardEditModeDevRollout: true,
|
|
@@ -250,7 +252,7 @@ export const DefaultFeatureFlags = {
|
|
|
250
252
|
enableAIDataSetting: false,
|
|
251
253
|
enableAlertingRollout: false,
|
|
252
254
|
enableDashboardFilterViews: true,
|
|
253
|
-
enableSystemAccountFiltering:
|
|
255
|
+
enableSystemAccountFiltering: true,
|
|
254
256
|
enableCustomizedDashboardsWithoutPluginOverlay: true,
|
|
255
257
|
enableNewInsightChangedPostMessageEvent: false,
|
|
256
258
|
enableKDVisualizationSwitcher: true,
|
|
@@ -352,6 +354,8 @@ export const DefaultFeatureFlags = {
|
|
|
352
354
|
enableShellApplication_metricEditor: false,
|
|
353
355
|
enableShellApplication_analyticalDesigner: false,
|
|
354
356
|
enableDashboardSidebarResize: false,
|
|
357
|
+
enableIpAllowlistsUi: false,
|
|
358
|
+
enableShellApplication_ldmModeler: false,
|
|
355
359
|
};
|
|
356
360
|
export const FeatureFlagsValues = {
|
|
357
361
|
dashboardEditModeDevRollout: [true, false],
|
|
@@ -526,4 +530,6 @@ export const FeatureFlagsValues = {
|
|
|
526
530
|
enableShellApplication_metricEditor: [true, false],
|
|
527
531
|
enableShellApplication_analyticalDesigner: [true, false],
|
|
528
532
|
enableDashboardSidebarResize: [true, false],
|
|
533
|
+
enableIpAllowlistsUi: [false, true],
|
|
534
|
+
enableShellApplication_ldmModeler: [true, false],
|
|
529
535
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-tiger",
|
|
3
|
-
"version": "11.41.0-alpha.
|
|
3
|
+
"version": "11.41.0-alpha.1",
|
|
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.41.0-alpha.
|
|
37
|
-
"@gooddata/sdk-backend-base": "11.41.0-alpha.
|
|
38
|
-
"@gooddata/sdk-backend-spi": "11.41.0-alpha.
|
|
39
|
-
"@gooddata/sdk-
|
|
40
|
-
"@gooddata/sdk-
|
|
41
|
-
"@gooddata/util": "11.41.0-alpha.
|
|
36
|
+
"@gooddata/api-client-tiger": "11.41.0-alpha.1",
|
|
37
|
+
"@gooddata/sdk-backend-base": "11.41.0-alpha.1",
|
|
38
|
+
"@gooddata/sdk-backend-spi": "11.41.0-alpha.1",
|
|
39
|
+
"@gooddata/sdk-code-convertors": "11.41.0-alpha.1",
|
|
40
|
+
"@gooddata/sdk-model": "11.41.0-alpha.1",
|
|
41
|
+
"@gooddata/util": "11.41.0-alpha.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@gooddata/fixtures": "3.3.12",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"oxlint-tsgolint": "0.15.0",
|
|
66
66
|
"typescript": "5.9.3",
|
|
67
67
|
"vitest": "4.1.8",
|
|
68
|
-
"@gooddata/catalog-export": "11.41.0-alpha.
|
|
69
|
-
"@gooddata/eslint-config": "11.41.0-alpha.
|
|
70
|
-
"@gooddata/oxlint-config": "11.41.0-alpha.
|
|
71
|
-
"@gooddata/reference-workspace": "11.41.0-alpha.
|
|
68
|
+
"@gooddata/catalog-export": "11.41.0-alpha.1",
|
|
69
|
+
"@gooddata/eslint-config": "11.41.0-alpha.1",
|
|
70
|
+
"@gooddata/oxlint-config": "11.41.0-alpha.1",
|
|
71
|
+
"@gooddata/reference-workspace": "11.41.0-alpha.1"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"_phase:build": "npm run build",
|