@gooddata/sdk-backend-tiger 11.62.0-alpha.1 → 11.62.0-alpha.3

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.
Files changed (56) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.js +1 -1
  3. package/esm/backend/features/feature.d.ts.map +1 -1
  4. package/esm/backend/features/feature.js +1 -0
  5. package/esm/backend/localization/aggregate.d.ts +27 -0
  6. package/esm/backend/localization/aggregate.d.ts.map +1 -0
  7. package/esm/backend/localization/aggregate.js +151 -0
  8. package/esm/backend/localization/fixture.d.ts +21 -0
  9. package/esm/backend/localization/fixture.d.ts.map +1 -0
  10. package/esm/backend/localization/fixture.js +125 -0
  11. package/esm/backend/localization/index.d.ts +35 -0
  12. package/esm/backend/localization/index.d.ts.map +1 -0
  13. package/esm/backend/localization/index.js +134 -0
  14. package/esm/backend/organization/index.d.ts +2 -1
  15. package/esm/backend/organization/index.d.ts.map +1 -1
  16. package/esm/backend/organization/index.js +4 -0
  17. package/esm/backend/organization/settings.d.ts +4 -1
  18. package/esm/backend/organization/settings.d.ts.map +1 -1
  19. package/esm/backend/organization/settings.js +12 -0
  20. package/esm/backend/settings/mapping.d.ts.map +1 -1
  21. package/esm/backend/settings/mapping.js +3 -0
  22. package/esm/backend/tigerSpecificFunctions.js +2 -3
  23. package/esm/backend/uiFeatures.d.ts +3 -0
  24. package/esm/backend/uiFeatures.d.ts.map +1 -1
  25. package/esm/backend/uiFeatures.js +3 -0
  26. package/esm/backend/user/settings.d.ts +1 -1
  27. package/esm/backend/user/settings.d.ts.map +1 -1
  28. package/esm/backend/workspace/attributes/elements/dependentDateFilters.d.ts.map +1 -1
  29. package/esm/backend/workspace/attributes/elements/dependentDateFilters.js +26 -10
  30. package/esm/backend/workspace/dashboards/referenceAvailability.d.ts +13 -10
  31. package/esm/backend/workspace/dashboards/referenceAvailability.d.ts.map +1 -1
  32. package/esm/backend/workspace/dashboards/referenceAvailability.js +28 -13
  33. package/esm/backend/workspace/genAI/index.d.ts.map +1 -1
  34. package/esm/backend/workspace/genAI/index.js +13 -5
  35. package/esm/backend/workspace/index.d.ts +2 -1
  36. package/esm/backend/workspace/index.d.ts.map +1 -1
  37. package/esm/backend/workspace/index.js +4 -0
  38. package/esm/backend/workspace/settings/index.d.ts +1 -1
  39. package/esm/backend/workspace/settings/index.d.ts.map +1 -1
  40. package/esm/convertors/fromBackend/AutomationConverter.d.ts.map +1 -1
  41. package/esm/convertors/fromBackend/AutomationConverter.js +4 -2
  42. package/esm/convertors/fromBackend/afm/FilterConverter.d.ts.map +1 -1
  43. package/esm/convertors/fromBackend/afm/FilterConverter.js +42 -0
  44. package/esm/convertors/fromBackend/genAIConvertor.d.ts.map +1 -1
  45. package/esm/convertors/fromBackend/genAIConvertor.js +11 -1
  46. package/esm/convertors/shared/absoluteGranularityLiterals.d.ts +38 -0
  47. package/esm/convertors/shared/absoluteGranularityLiterals.d.ts.map +1 -0
  48. package/esm/convertors/shared/absoluteGranularityLiterals.js +82 -0
  49. package/esm/convertors/shared/storedFilterConverter.d.ts +12 -2
  50. package/esm/convertors/shared/storedFilterConverter.d.ts.map +1 -1
  51. package/esm/convertors/shared/storedFilterConverter.js +16 -5
  52. package/esm/convertors/toBackend/InsightConverter.d.ts.map +1 -1
  53. package/esm/convertors/toBackend/InsightConverter.js +6 -3
  54. package/esm/convertors/toBackend/afm/FilterConverter.d.ts.map +1 -1
  55. package/esm/convertors/toBackend/afm/FilterConverter.js +23 -2
  56. package/package.json +13 -13
@@ -1,4 +1,4 @@
1
- export declare const LIB_VERSION = "11.62.0-alpha.1";
1
+ export declare const LIB_VERSION = "11.62.0-alpha.3";
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";
4
4
  //# sourceMappingURL=__version.d.ts.map
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.62.0-alpha.1";
3
+ export const LIB_VERSION = "11.62.0-alpha.3";
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";
@@ -1 +1 @@
1
- {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/backend/features/feature.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,kBAAkB,EAAsB,MAAM,kBAAkB,CAAC;AAInG,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAq3B9E"}
1
+ {"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../src/backend/features/feature.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,kBAAkB,EAAsB,MAAM,kBAAkB,CAAC;AAInG,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,OAAO,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,KAAK,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAErD,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA43B9E"}
@@ -36,6 +36,7 @@ export function mapFeatures(features) {
36
36
  ...loadFeature(features, TigerFeaturesNames.EnableSingleStoreDataSource, "enableSingleStoreDataSource", "BOOLEAN", FeatureFlagsValues.enableSingleStoreDataSource),
37
37
  ...loadFeature(features, TigerFeaturesNames.EnableCacheRetentionPolicy, "enableCacheRetentionPolicy", "BOOLEAN", FeatureFlagsValues.enableCacheRetentionPolicy),
38
38
  ...loadFeature(features, TigerFeaturesNames.EnableDenodoDataSource, "enableDenodoDataSource", "BOOLEAN", FeatureFlagsValues.enableDenodoDataSource),
39
+ ...loadFeature(features, TigerFeaturesNames.EnableTrinoDataSource, "enableTrinoDataSource", "BOOLEAN", FeatureFlagsValues.enableTrinoDataSource),
39
40
  ...loadFeature(features, TigerFeaturesNames.EnableOidcAuth, "enableOidcAuth", "BOOLEAN", FeatureFlagsValues.enableOidcAuth),
40
41
  ...loadFeature(features, TigerFeaturesNames.EnableSemanticSearch, "enableSemanticSearch", "BOOLEAN", FeatureFlagsValues.enableSemanticSearch),
41
42
  ...loadFeature(features, TigerFeaturesNames.EnableCatalogSmartSearchResults, "enableCatalogSmartSearchResults", "BOOLEAN", FeatureFlagsValues.enableCatalogSmartSearchResults),
@@ -0,0 +1,27 @@
1
+ import { type ILocalizationPageQuery, type ILocalizationResolvedValue, type ILocalizationStatistics, type ILocalizationStatisticsWorkspace, type ILocalizationUsage, type ILocalizationUsageListQuery, type ILocalizationUsageUser, type ILocalizationUsageWorkspace, type LocalizationSettingType } from "@gooddata/sdk-backend-spi";
2
+ import { type IFixturePerson, type IFixtureWorkspace } from "./fixture.js";
3
+ type ResolvedSettings = Partial<Record<LocalizationSettingType, ILocalizationResolvedValue>>;
4
+ export interface IUsageScope {
5
+ workspaces: IFixtureWorkspace[];
6
+ people: Array<IFixturePerson & {
7
+ settings: ResolvedSettings;
8
+ }>;
9
+ }
10
+ export declare function summarize(scope: IUsageScope, peopleWithoutValue: "own" | "effective"): ILocalizationUsage;
11
+ export declare function usageWorkspaces(scope: IUsageScope, query: ILocalizationUsageListQuery): {
12
+ workspaces: ILocalizationUsageWorkspace[];
13
+ totalCount: number;
14
+ };
15
+ export declare function usageUsers(scope: IUsageScope, query: ILocalizationUsageListQuery): {
16
+ users: ILocalizationUsageUser[];
17
+ totalCount: number;
18
+ };
19
+ export declare function statisticsSummary(rows: ILocalizationStatisticsWorkspace[]): ILocalizationStatistics;
20
+ export declare function statisticsPage(rows: ILocalizationStatisticsWorkspace[], query: ILocalizationPageQuery): {
21
+ workspaces: ILocalizationStatisticsWorkspace[];
22
+ totalCount: number;
23
+ };
24
+ export declare function ownSettings(person: IFixturePerson): ResolvedSettings;
25
+ export declare function effectiveSettings(person: IFixturePerson, workspace: IFixtureWorkspace): ResolvedSettings;
26
+ export {};
27
+ //# sourceMappingURL=aggregate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aggregate.d.ts","sourceRoot":"","sources":["../../../src/backend/localization/aggregate.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,kBAAkB,EAEvB,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAEhC,KAAK,uBAAuB,EAE/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,iBAAiB,EAEzB,MAAM,cAAc,CAAC;AAYtB,KAAK,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,CAAC,CAAC;AAM7F,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,cAAc,GAAG;QAAE,QAAQ,EAAE,gBAAgB,CAAA;KAAE,CAAC,CAAC;CAClE;AAgCD,wBAAgB,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,KAAK,GAAG,WAAW,GAAG,kBAAkB,CAgDzG;AA6BD,wBAAgB,eAAe,CAC3B,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,2BAA2B,GACnC;IAAE,UAAU,EAAE,2BAA2B,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAgBnE;AAED,wBAAgB,UAAU,CACtB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,2BAA2B,GACnC;IAAE,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAezD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,gCAAgC,EAAE,GAAG,uBAAuB,CAYnG;AAED,wBAAgB,cAAc,CAC1B,IAAI,EAAE,gCAAgC,EAAE,EACxC,KAAK,EAAE,sBAAsB,GAC9B;IAAE,UAAU,EAAE,gCAAgC,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAExE;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,gBAAgB,CAIpE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,GAAG,gBAAgB,CAOxG"}
@@ -0,0 +1,151 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { FIXTURE_DEFAULTS, LOCALIZATION_SETTINGS, } from "./fixture.js";
3
+ const SOURCE_STRENGTH = [
4
+ "USER",
5
+ "WORKSPACE",
6
+ "PARENT",
7
+ "ORGANIZATION",
8
+ "ENVIRONMENT",
9
+ "DEFAULT",
10
+ ];
11
+ const DEFAULT_PAGE_SIZE = 100;
12
+ function strongest(sources) {
13
+ return SOURCE_STRENGTH.find((source) => sources.includes(source)) ?? "DEFAULT";
14
+ }
15
+ function emptyCount() {
16
+ return { total: 0, bySource: {} };
17
+ }
18
+ function addTo(count, source) {
19
+ count.total += 1;
20
+ if (source) {
21
+ count.bySource[source] = (count.bySource[source] ?? 0) + 1;
22
+ }
23
+ }
24
+ // Groups the settings of one workspace or person by value; each value keeps its strongest source.
25
+ function valuesOf(subject) {
26
+ const byValue = new Map();
27
+ for (const type of LOCALIZATION_SETTINGS) {
28
+ const setting = subject.settings[type];
29
+ if (setting?.content.value) {
30
+ byValue.set(setting.content.value, [
31
+ ...(byValue.get(setting.content.value) ?? []),
32
+ setting.source,
33
+ ]);
34
+ }
35
+ }
36
+ return new Map([...byValue].map(([value, sources]) => [value, strongest(sources)]));
37
+ }
38
+ export function summarize(scope, peopleWithoutValue) {
39
+ const entries = new Map();
40
+ const entry = (value) => {
41
+ const existing = entries.get(value);
42
+ if (existing) {
43
+ return existing;
44
+ }
45
+ const created = {
46
+ content: { value },
47
+ workspaces: emptyCount(),
48
+ users: emptyCount(),
49
+ bySetting: {},
50
+ };
51
+ entries.set(value, created);
52
+ return created;
53
+ };
54
+ const settingCount = (value, type) => {
55
+ const target = entry(value);
56
+ return (target.bySetting[type] ??= { workspaces: emptyCount(), users: emptyCount() });
57
+ };
58
+ for (const workspace of scope.workspaces) {
59
+ for (const [value, source] of valuesOf(workspace)) {
60
+ addTo(entry(value).workspaces, source);
61
+ }
62
+ for (const type of LOCALIZATION_SETTINGS) {
63
+ const setting = workspace.settings[type];
64
+ addTo(settingCount(setting.content.value, type).workspaces, setting.source);
65
+ }
66
+ }
67
+ for (const person of scope.people) {
68
+ const values = valuesOf(person);
69
+ if (values.size === 0 && peopleWithoutValue === "own") {
70
+ addTo(entry(null).users, undefined);
71
+ }
72
+ for (const [value, source] of values) {
73
+ addTo(entry(value).users, source);
74
+ }
75
+ for (const type of LOCALIZATION_SETTINGS) {
76
+ const setting = person.settings[type];
77
+ if (setting) {
78
+ addTo(settingCount(setting.content.value, type).users, setting.source);
79
+ }
80
+ }
81
+ }
82
+ return { defaults: FIXTURE_DEFAULTS, values: [...entries.values()] };
83
+ }
84
+ function matches(settings, query) {
85
+ const types = query.setting ? [query.setting] : LOCALIZATION_SETTINGS;
86
+ const sources = types
87
+ .map((type) => settings[type])
88
+ .filter((setting) => !!setting && (query.value === undefined || setting.content.value === query.value))
89
+ .map((setting) => setting.source);
90
+ if (sources.length === 0) {
91
+ return undefined;
92
+ }
93
+ const source = strongest(sources);
94
+ return query.source === undefined || query.source === source ? source : undefined;
95
+ }
96
+ function page(items, query) {
97
+ const size = query.size ?? DEFAULT_PAGE_SIZE;
98
+ const start = (query.page ?? 0) * size;
99
+ return items.slice(start, start + size);
100
+ }
101
+ const byName = (a, b) => a.name.localeCompare(b.name);
102
+ export function usageWorkspaces(scope, query) {
103
+ const rows = scope.workspaces
104
+ .map((workspace) => ({ workspace, source: matches(workspace.settings, query) }))
105
+ .filter((row) => !!row.source)
106
+ .map(({ workspace, source }) => ({
107
+ id: workspace.id,
108
+ name: workspace.name,
109
+ parentId: workspace.parentId,
110
+ childrenCount: workspace.childrenCount,
111
+ source,
112
+ bySetting: workspace.settings,
113
+ }))
114
+ .sort(byName);
115
+ return { workspaces: page(rows, query), totalCount: rows.length };
116
+ }
117
+ export function usageUsers(scope, query) {
118
+ const rows = scope.people
119
+ .map((person) => ({ person, source: matches(person.settings, query) }))
120
+ .filter((row) => Boolean(row.source))
121
+ .map(({ person, source }) => ({
122
+ id: person.id,
123
+ name: person.name,
124
+ email: person.email,
125
+ source,
126
+ bySetting: person.settings,
127
+ }))
128
+ .sort((a, b) => (a.name ?? a.id).localeCompare(b.name ?? b.id));
129
+ return { users: page(rows, query), totalCount: rows.length };
130
+ }
131
+ export function statisticsSummary(rows) {
132
+ const locales = (kind) => [
133
+ ...new Set(rows.flatMap((row) => row[kind].locales.filter((locale) => locale.translated > 0).map((locale) => locale.locale))),
134
+ ];
135
+ return {
136
+ metadata: { locales: locales("metadata").map((locale) => ({ locale })) },
137
+ data: { locales: locales("data").map((locale) => ({ locale })) },
138
+ };
139
+ }
140
+ export function statisticsPage(rows, query) {
141
+ return { workspaces: page(rows, query), totalCount: rows.length };
142
+ }
143
+ export function ownSettings(person) {
144
+ return Object.fromEntries(Object.entries(person.own).map(([type, value]) => [type, { content: { value }, source: "USER" }]));
145
+ }
146
+ export function effectiveSettings(person, workspace) {
147
+ return Object.fromEntries(LOCALIZATION_SETTINGS.map((type) => {
148
+ const own = person.own[type];
149
+ return [type, own ? { content: { value: own }, source: "USER" } : workspace.settings[type]];
150
+ }));
151
+ }
@@ -0,0 +1,21 @@
1
+ import { type ILocalizationDefault, type ILocalizationResolvedValue, type ILocalizationStatisticsWorkspace, type LocalizationSettingType } from "@gooddata/sdk-backend-spi";
2
+ export declare const LOCALIZATION_SETTINGS: LocalizationSettingType[];
3
+ export interface IFixtureWorkspace {
4
+ id: string;
5
+ name: string;
6
+ parentId: string | null;
7
+ childrenCount: number;
8
+ settings: Record<LocalizationSettingType, ILocalizationResolvedValue>;
9
+ }
10
+ export interface IFixturePerson {
11
+ id: string;
12
+ name: string;
13
+ email: string;
14
+ own: Partial<Record<LocalizationSettingType, string>>;
15
+ workspaceIds: string[];
16
+ }
17
+ export declare const FIXTURE_DEFAULTS: Record<LocalizationSettingType, ILocalizationDefault | null>;
18
+ export declare function acmeWorkspaces(): IFixtureWorkspace[];
19
+ export declare function acmePeople(workspaceIds: string[]): IFixturePerson[];
20
+ export declare function acmeStatisticsWorkspaces(): ILocalizationStatisticsWorkspace[];
21
+ //# sourceMappingURL=fixture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixture.d.ts","sourceRoot":"","sources":["../../../src/backend/localization/fixture.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC/B,MAAM,2BAA2B,CAAC;AAKnC,eAAO,MAAM,qBAAqB,EAAE,uBAAuB,EAAiD,CAAC;AAE7G,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,CAAC;CACzE;AAED,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B;AA0DD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,uBAAuB,EAAE,oBAAoB,GAAG,IAAI,CAIzF,CAAC;AAgCF,wBAAgB,cAAc,IAAI,iBAAiB,EAAE,CAEpD;AAED,wBAAgB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,cAAc,EAAE,CAYnE;AAED,wBAAgB,wBAAwB,IAAI,gCAAgC,EAAE,CA2B7E"}
@@ -0,0 +1,125 @@
1
+ // (C) 2026 GoodData Corporation
2
+ // Fixture dataset of the localization overview prototype ("Acme"). It stands in for the backend
3
+ // localization endpoints until they exist.
4
+ export const LOCALIZATION_SETTINGS = ["LOCALE", "METADATA_LOCALE", "DATA_LOCALE"];
5
+ const ROOT_ID = "acme";
6
+ const ORGANIZATION_LOCALE = "en-US";
7
+ const BUILT_IN_METADATA_LOCALE = "en-US";
8
+ const PEOPLE_COUNT = 1240;
9
+ const GROUPS = [
10
+ {
11
+ id: ROOT_ID,
12
+ name: "Acme Retail",
13
+ size: 84,
14
+ locale: null,
15
+ metadataLocale: { value: "cs-CZ", count: 3 },
16
+ },
17
+ {
18
+ id: "dach",
19
+ name: "DACH region",
20
+ size: 42,
21
+ locale: "de-DE",
22
+ metadataLocale: { value: "de-DE", count: 36 },
23
+ dataLocale: { value: "de-DE", count: 2 },
24
+ },
25
+ {
26
+ id: "iberia",
27
+ name: "Iberia",
28
+ size: 25,
29
+ locale: "es-ES",
30
+ metadataLocale: { value: "es-ES", count: 25 },
31
+ },
32
+ { id: "italy", name: "Italy", size: 9, locale: "it-IT" },
33
+ { id: "france", name: "France", size: 9, locale: "fr-FR" },
34
+ { id: "latam", name: "Latin America", size: 6, locale: "es-419" },
35
+ { id: "britain", name: "Great Britain", size: 6, locale: "en-GB" },
36
+ { id: "quebec", name: "Quebec", size: 5, locale: "fr-CA" },
37
+ { id: "zurich", name: "Zurich store", size: 1, locale: "de-CH" },
38
+ { id: "warsaw", name: "Warsaw store", size: 1, locale: "pl-PL" },
39
+ ];
40
+ const OWN_SETTINGS = [
41
+ { count: 2, own: { LOCALE: "en-US" } },
42
+ { count: 1, own: { LOCALE: "de-DE" } },
43
+ { count: 2, own: { LOCALE: "es-ES" } },
44
+ { count: 3, own: { LOCALE: "ko-KR" } },
45
+ { count: 1, own: { LOCALE: "ja-JP" } },
46
+ { count: 1, own: { LOCALE: "de-CH" } },
47
+ { count: 1, own: { METADATA_LOCALE: "cs-CZ" } },
48
+ ];
49
+ export const FIXTURE_DEFAULTS = {
50
+ LOCALE: { content: { value: ORGANIZATION_LOCALE }, source: "ORGANIZATION" },
51
+ METADATA_LOCALE: { content: { value: BUILT_IN_METADATA_LOCALE }, source: "DEFAULT" },
52
+ DATA_LOCALE: null,
53
+ };
54
+ function groupWorkspaces(group) {
55
+ return Array.from({ length: group.size }, (_, index) => {
56
+ const isGroupRoot = index === 0;
57
+ const id = isGroupRoot ? group.id : `${group.id}-${String(index).padStart(2, "0")}`;
58
+ const parentId = isGroupRoot ? (group.id === ROOT_ID ? null : ROOT_ID) : group.id;
59
+ const hasMetadataLocale = group.metadataLocale && index >= group.size - group.metadataLocale.count;
60
+ const hasDataLocale = group.dataLocale && index < group.dataLocale.count;
61
+ return {
62
+ id,
63
+ name: isGroupRoot ? group.name : `${group.name} ${index}`,
64
+ parentId,
65
+ childrenCount: isGroupRoot ? group.size - 1 + (group.id === ROOT_ID ? GROUPS.length - 1 : 0) : 0,
66
+ settings: {
67
+ LOCALE: group.locale
68
+ ? isGroupRoot
69
+ ? { content: { value: group.locale }, source: "WORKSPACE" }
70
+ : { content: { value: group.locale }, source: "PARENT", originId: group.id }
71
+ : { content: { value: ORGANIZATION_LOCALE }, source: "ORGANIZATION" },
72
+ METADATA_LOCALE: hasMetadataLocale
73
+ ? { content: { value: group.metadataLocale.value }, source: "WORKSPACE" }
74
+ : { content: { value: BUILT_IN_METADATA_LOCALE }, source: "DEFAULT" },
75
+ DATA_LOCALE: hasDataLocale
76
+ ? { content: { value: group.dataLocale.value }, source: "WORKSPACE" }
77
+ : { content: { value: null }, source: "DEFAULT" },
78
+ },
79
+ };
80
+ });
81
+ }
82
+ export function acmeWorkspaces() {
83
+ return GROUPS.flatMap(groupWorkspaces);
84
+ }
85
+ export function acmePeople(workspaceIds) {
86
+ const own = OWN_SETTINGS.flatMap((entry) => Array.from({ length: entry.count }, () => entry.own));
87
+ return Array.from({ length: PEOPLE_COUNT }, (_, index) => {
88
+ const number = String(index + 1).padStart(4, "0");
89
+ return {
90
+ id: `user-${number}`,
91
+ name: `User ${number}`,
92
+ email: `user-${number}@example.com`,
93
+ own: own[index] ?? {},
94
+ workspaceIds: workspaceIds.length ? [workspaceIds[index % workspaceIds.length]] : [],
95
+ };
96
+ });
97
+ }
98
+ export function acmeStatisticsWorkspaces() {
99
+ return [
100
+ {
101
+ id: ROOT_ID,
102
+ name: "Acme Retail",
103
+ parentId: null,
104
+ sourceLanguage: "en-US",
105
+ metadata: {
106
+ total: 1000,
107
+ locales: [
108
+ { locale: "de-DE", translated: 1000 },
109
+ { locale: "es-ES", translated: 640 },
110
+ { locale: "cs-CZ", translated: 1000 },
111
+ { locale: "nl-NL", translated: 410 },
112
+ ],
113
+ },
114
+ data: { total: 6, locales: [{ locale: "de-DE", translated: 2 }] },
115
+ },
116
+ {
117
+ id: "dach",
118
+ name: "DACH region",
119
+ parentId: ROOT_ID,
120
+ sourceLanguage: "en-US",
121
+ metadata: { total: 20, locales: [{ locale: "de-DE", translated: 20 }] },
122
+ data: { total: 0, locales: [] },
123
+ },
124
+ ];
125
+ }
@@ -0,0 +1,35 @@
1
+ import { type ILocalizationPageQuery, type ILocalizationStatistics, type ILocalizationStatisticsWorkspace, type ILocalizationStatisticsWorkspacesPage, type ILocalizationUsage, type ILocalizationUsageListQuery, type ILocalizationUsageUsersPage, type ILocalizationUsageWorkspacesPage, type IOrganizationLocalizationService, type IWorkspaceLocalizationService } from "@gooddata/sdk-backend-spi";
2
+ import { type TigerAuthenticatedCallGuard } from "../../types/index.js";
3
+ import { type IFixtureWorkspace, acmePeople } from "./fixture.js";
4
+ interface IFixtureData {
5
+ workspaces: IFixtureWorkspace[];
6
+ people: ReturnType<typeof acmePeople>;
7
+ statistics: ILocalizationStatisticsWorkspace[];
8
+ }
9
+ declare abstract class FixtureLocalizationService {
10
+ protected readonly authCall: TigerAuthenticatedCallGuard;
11
+ private data;
12
+ constructor(authCall: TigerAuthenticatedCallGuard);
13
+ protected fixtureData(): Promise<IFixtureData>;
14
+ }
15
+ export declare class TigerOrganizationLocalizationService extends FixtureLocalizationService implements IOrganizationLocalizationService {
16
+ private scope;
17
+ getUsage(): Promise<ILocalizationUsage>;
18
+ getUsageWorkspaces(query?: ILocalizationUsageListQuery): Promise<ILocalizationUsageWorkspacesPage>;
19
+ getUsageUsers(query?: ILocalizationUsageListQuery): Promise<ILocalizationUsageUsersPage>;
20
+ getStatistics(): Promise<ILocalizationStatistics>;
21
+ getStatisticsWorkspaces(query?: ILocalizationPageQuery): Promise<ILocalizationStatisticsWorkspacesPage>;
22
+ }
23
+ export declare class TigerWorkspaceLocalizationService extends FixtureLocalizationService implements IWorkspaceLocalizationService {
24
+ private readonly workspaceId;
25
+ constructor(authCall: TigerAuthenticatedCallGuard, workspaceId: string);
26
+ private scope;
27
+ private statisticsRows;
28
+ getUsage(): Promise<ILocalizationUsage>;
29
+ getUsageWorkspaces(query?: ILocalizationUsageListQuery): Promise<ILocalizationUsageWorkspacesPage>;
30
+ getUsageUsers(query?: ILocalizationUsageListQuery): Promise<ILocalizationUsageUsersPage>;
31
+ getStatistics(): Promise<ILocalizationStatistics>;
32
+ getStatisticsWorkspaces(query?: ILocalizationPageQuery): Promise<ILocalizationStatisticsWorkspacesPage>;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/localization/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EACrC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAYxE,OAAO,EAAE,KAAK,iBAAiB,EAAE,UAAU,EAA4C,MAAM,cAAc,CAAC;AAM5G,UAAU,YAAY;IAClB,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,MAAM,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IACtC,UAAU,EAAE,gCAAgC,EAAE,CAAC;CAClD;AA+DD,uBAAe,0BAA0B;IAGzB,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,2BAA2B;IAFpE,OAAO,CAAC,IAAI,CAAoC;IAEhD,YAA+B,QAAQ,EAAE,2BAA2B,EAAI;IAExE,SAAS,CAAC,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC,CAG7C;CACJ;AAED,qBAAa,oCACT,SAAQ,0BACR,YAAW,gCAAgC;YAE7B,KAAK;IAQN,QAAQ,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEnD;IAEY,kBAAkB,CAC3B,KAAK,GAAE,2BAAgC,GACxC,OAAO,CAAC,gCAAgC,CAAC,CAE3C;IAEY,aAAa,CACtB,KAAK,GAAE,2BAAgC,GACxC,OAAO,CAAC,2BAA2B,CAAC,CAEtC;IAEY,aAAa,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAE7D;IAEY,uBAAuB,CAChC,KAAK,GAAE,sBAA2B,GACnC,OAAO,CAAC,qCAAqC,CAAC,CAEhD;CACJ;AAED,qBAAa,iCACT,SAAQ,0BACR,YAAW,6BAA6B;IAIpC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAFhC,YACI,QAAQ,EAAE,2BAA2B,EACpB,WAAW,EAAE,MAAM,EAGvC;YAEa,KAAK;YAaL,cAAc;IAYf,QAAQ,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEnD;IAEY,kBAAkB,CAC3B,KAAK,GAAE,2BAAgC,GACxC,OAAO,CAAC,gCAAgC,CAAC,CAE3C;IAEY,aAAa,CACtB,KAAK,GAAE,2BAAgC,GACxC,OAAO,CAAC,2BAA2B,CAAC,CAEtC;IAEY,aAAa,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAE7D;IAEY,uBAAuB,CAChC,KAAK,GAAE,sBAA2B,GACnC,OAAO,CAAC,qCAAqC,CAAC,CAEhD;CACJ"}
@@ -0,0 +1,134 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { ActionsUtilities } from "@gooddata/api-client-tiger";
3
+ import { EntitiesApi_GetAllEntitiesWorkspaces } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
4
+ import { effectiveSettings, ownSettings, statisticsPage, statisticsSummary, summarize, usageUsers, usageWorkspaces, } from "./aggregate.js";
5
+ import { acmePeople, acmeStatisticsWorkspaces, acmeWorkspaces } from "./fixture.js";
6
+ async function loadRealWorkspaces(authCall) {
7
+ return ActionsUtilities.loadAllPages(({ page, size }) => authCall((client) => EntitiesApi_GetAllEntitiesWorkspaces(client.axios, client.basePath, {
8
+ page,
9
+ size,
10
+ sort: ["name"],
11
+ })).then((result) => result.data.data.map((item) => ({ id: item.id, name: item.attributes?.name ?? item.id }))));
12
+ }
13
+ async function loadFixtureData(authCall) {
14
+ const fixture = acmeWorkspaces();
15
+ const real = await loadRealWorkspaces(authCall);
16
+ const idMap = new Map(fixture.map((workspace, index) => [workspace.id, real[index]]));
17
+ const mapId = (id) => idMap.get(id)?.id ?? id;
18
+ const workspaces = fixture.map((workspace) => ({
19
+ ...workspace,
20
+ id: mapId(workspace.id),
21
+ name: idMap.get(workspace.id)?.name ?? workspace.name,
22
+ parentId: workspace.parentId ? mapId(workspace.parentId) : null,
23
+ settings: {
24
+ ...workspace.settings,
25
+ LOCALE: workspace.settings.LOCALE.originId
26
+ ? { ...workspace.settings.LOCALE, originId: mapId(workspace.settings.LOCALE.originId) }
27
+ : workspace.settings.LOCALE,
28
+ },
29
+ }));
30
+ const statistics = acmeStatisticsWorkspaces().map((row) => ({
31
+ ...row,
32
+ id: mapId(row.id),
33
+ name: idMap.get(row.id)?.name ?? row.name,
34
+ parentId: row.parentId ? mapId(row.parentId) : null,
35
+ }));
36
+ return {
37
+ workspaces,
38
+ people: acmePeople(workspaces.map((workspace) => workspace.id)),
39
+ statistics,
40
+ };
41
+ }
42
+ // A real workspace beyond the fixture size gets the organization defaults and nobody with access.
43
+ function unmappedWorkspace(id) {
44
+ return {
45
+ id,
46
+ name: id,
47
+ parentId: null,
48
+ childrenCount: 0,
49
+ settings: {
50
+ LOCALE: { content: { value: "en-US" }, source: "ORGANIZATION" },
51
+ METADATA_LOCALE: { content: { value: "en-US" }, source: "DEFAULT" },
52
+ DATA_LOCALE: { content: { value: null }, source: "DEFAULT" },
53
+ },
54
+ };
55
+ }
56
+ class FixtureLocalizationService {
57
+ authCall;
58
+ data;
59
+ constructor(authCall) {
60
+ this.authCall = authCall;
61
+ }
62
+ fixtureData() {
63
+ this.data ??= loadFixtureData(this.authCall);
64
+ return this.data;
65
+ }
66
+ }
67
+ export class TigerOrganizationLocalizationService extends FixtureLocalizationService {
68
+ async scope() {
69
+ const { workspaces, people } = await this.fixtureData();
70
+ return {
71
+ workspaces,
72
+ people: people.map((person) => ({ ...person, settings: ownSettings(person) })),
73
+ };
74
+ }
75
+ async getUsage() {
76
+ return summarize(await this.scope(), "own");
77
+ }
78
+ async getUsageWorkspaces(query = {}) {
79
+ return usageWorkspaces(await this.scope(), query);
80
+ }
81
+ async getUsageUsers(query = {}) {
82
+ return usageUsers(await this.scope(), query);
83
+ }
84
+ async getStatistics() {
85
+ return statisticsSummary((await this.fixtureData()).statistics);
86
+ }
87
+ async getStatisticsWorkspaces(query = {}) {
88
+ return statisticsPage((await this.fixtureData()).statistics, query);
89
+ }
90
+ }
91
+ export class TigerWorkspaceLocalizationService extends FixtureLocalizationService {
92
+ workspaceId;
93
+ constructor(authCall, workspaceId) {
94
+ super(authCall);
95
+ this.workspaceId = workspaceId;
96
+ }
97
+ async scope() {
98
+ const { workspaces, people } = await this.fixtureData();
99
+ const workspace = workspaces.find((candidate) => candidate.id === this.workspaceId) ??
100
+ unmappedWorkspace(this.workspaceId);
101
+ return {
102
+ workspaces: [workspace],
103
+ people: people
104
+ .filter((person) => person.workspaceIds.includes(workspace.id))
105
+ .map((person) => ({ ...person, settings: effectiveSettings(person, workspace) })),
106
+ };
107
+ }
108
+ async statisticsRows() {
109
+ const { workspaces, statistics } = await this.fixtureData();
110
+ const lineage = new Set();
111
+ let current = workspaces.find((workspace) => workspace.id === this.workspaceId);
112
+ while (current) {
113
+ lineage.add(current.id);
114
+ const parentId = current.parentId;
115
+ current = parentId ? workspaces.find((workspace) => workspace.id === parentId) : undefined;
116
+ }
117
+ return statistics.filter((row) => lineage.has(row.id));
118
+ }
119
+ async getUsage() {
120
+ return summarize(await this.scope(), "effective");
121
+ }
122
+ async getUsageWorkspaces(query = {}) {
123
+ return usageWorkspaces(await this.scope(), query);
124
+ }
125
+ async getUsageUsers(query = {}) {
126
+ return usageUsers(await this.scope(), query);
127
+ }
128
+ async getStatistics() {
129
+ return statisticsSummary(await this.statisticsRows());
130
+ }
131
+ async getStatisticsWorkspaces(query = {}) {
132
+ return statisticsPage(await this.statisticsRows(), query);
133
+ }
134
+ }
@@ -1,4 +1,4 @@
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";
1
+ import { type IOrganization, type IOrganizationAgentsService, type IOrganizationAutomationService, type IOrganizationExportTemplatesService, type IOrganizationGenAIService, type IOrganizationIpAllowlistService, type IOrganizationLlmProvidersService, type IOrganizationLocalizationService, 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 {
@@ -21,6 +21,7 @@ export declare class TigerOrganization implements IOrganization {
21
21
  genAI(): IOrganizationGenAIService;
22
22
  exportTemplates(): IOrganizationExportTemplatesService;
23
23
  ipAllowlists(): IOrganizationIpAllowlistService;
24
+ localization(): IOrganizationLocalizationService;
24
25
  }
25
26
  export declare class TigerOrganizations implements IOrganizations {
26
27
  private readonly authCall;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/organization/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,aAAa,EAClB,KAA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wBAAwB,CAElD;IAEM,OAAO,IAAI,2BAA2B,CAE5C;IAEM,QAAQ,IAAI,4BAA4B,CAE9C;IAEM,KAAK,IAAI,wBAAwB,CAEvC;IAEM,WAAW,IAAI,8BAA8B,CAEnD;IAEM,oBAAoB,IAAI,uCAAuC,CAErE;IAEM,YAAY,IAAI,gCAAgC,CAEtD;IAEM,aAAa,IAAI,gCAAgC,CAEvD;IAEM,WAAW,IAAI,8BAA8B,CAEnD;IAEM,MAAM,IAAI,0BAA0B,CAE1C;IAEM,KAAK,IAAI,yBAAyB,CAExC;IAEM,eAAe,IAAI,mCAAmC,CAE5D;IAEM,YAAY,IAAI,+BAA+B,CAErD;IAEM,YAAY,IAAI,gCAAgC,CAEtD;CACJ;AAED,qBAAa,kBAAmB,YAAW,cAAc;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAArC,YAA6B,QAAQ,EAAE,2BAA2B,EAAI;IAEzD,sBAAsB,IAAI,OAAO,CAAC,aAAa,CAAC,CAK5D;CACJ"}
@@ -2,6 +2,7 @@
2
2
  import { EntitiesApi_GetEntityOrganizations, EntitiesApi_PatchEntityOrganizations, } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
3
3
  import { ProfileApi_GetCurrent } from "@gooddata/api-client-tiger/endpoints/profile";
4
4
  import { idRef } from "@gooddata/sdk-model";
5
+ import { TigerOrganizationLocalizationService } from "../localization/index.js";
5
6
  import { OrganizationAgentsService } from "./agents.js";
6
7
  import { TigerOrganizationAutomationService } from "./automations/index.js";
7
8
  import { OrganizationExportTemplatesService } from "./exportTemplates.js";
@@ -142,6 +143,9 @@ export class TigerOrganization {
142
143
  ipAllowlists() {
143
144
  return new OrganizationIpAllowlistService(this.authCall);
144
145
  }
146
+ localization() {
147
+ return new TigerOrganizationLocalizationService(this.authCall);
148
+ }
145
149
  }
146
150
  export class TigerOrganizations {
147
151
  authCall;
@@ -36,6 +36,9 @@ export declare class OrganizationSettingsService extends TigerSettingsService<IS
36
36
  setAiRateLimit(value: IAiRateLimit): Promise<void>;
37
37
  deleteAiRateLimit(): Promise<void>;
38
38
  getAiRateLimit(): Promise<IAiRateLimit | undefined>;
39
+ getMetadataLocale(): Promise<string | undefined>;
40
+ getDataLocale(): Promise<string | undefined>;
41
+ private getOwnedLocale;
39
42
  setEnableDrillToUrlByDefault(enabled: boolean): Promise<void>;
40
43
  setEnablePartialDataResults(enabled: boolean): Promise<void>;
41
44
  setEnableNullJoins(enabled: boolean): Promise<void>;
@@ -44,7 +47,7 @@ export declare class OrganizationSettingsService extends TigerSettingsService<IS
44
47
  deleteGeoIconSheet(): Promise<void>;
45
48
  deleteColorPalette(): Promise<void>;
46
49
  getSettings(): Promise<ISettings>;
47
- protected getSettingByType(type: TigerOrganizationSettingsType): Promise<import("axios").AxiosResponse<import("@gooddata/api-client-tiger").JsonApiOrganizationSettingOutList, any, {}>>;
50
+ protected getSettingByType(type: TigerOrganizationSettingsType): Promise<import("axios").AxiosResponse<import("@gooddata/api-client-tiger").JsonApiOrganizationSettingOutList, any, {}, any>>;
48
51
  protected updateSetting(type: TigerOrganizationSettingsType, id: string, content: any): Promise<any>;
49
52
  protected createSetting(type: TigerOrganizationSettingsType, id: string, content: any): Promise<any>;
50
53
  protected deleteSettingByType(type: TigerOrganizationSettingsType): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/backend/organization/settings.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,KAAK,2BAA2B,EAAE,KAAK,6BAA6B,E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AE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/D;IAEY,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/D;IAEY,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEvD;IAEY,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAE/C;IAEY,kBAAkB,kBAE9B;IAEqB,WAAW,IAAI,OAAO,CAAC,SAAS,CAAC,CAmBtD;IAED,UAAyB,gBAAgB,CAAC,IAAI,EAAE,6BAA6B,gIAM5E;IAED,UAAyB,aAAa,CAClC,IAAI,EAAE,6BAA6B,EACnC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,GAAG,GACb,OAAO,CAAC,GAAG,CAAC,CAkBd;IAED,UAAyB,aAAa,CAClC,IAAI,EAAE,6BAA6B,EACnC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,GAAG,GACb,OAAO,CAAC,GAAG,CAAC,CAiBd;IAED,UAAyB,mBAAmB,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAkB/F;CACJ"}
@@ -109,6 +109,18 @@ export class OrganizationSettingsService extends TigerSettingsService {
109
109
  const content = settings.data.data[0].attributes?.content;
110
110
  return unwrapSettingContent(content);
111
111
  }
112
+ async getMetadataLocale() {
113
+ return this.getOwnedLocale("METADATA_LOCALE");
114
+ }
115
+ async getDataLocale() {
116
+ return this.getOwnedLocale("DATA_LOCALE");
117
+ }
118
+ async getOwnedLocale(type) {
119
+ const settings = await this.getSettingByType(type);
120
+ const content = settings.data.data[0]?.attributes?.content;
121
+ const locale = unwrapSettingContent(content);
122
+ return typeof locale === "string" && locale.length > 0 ? locale : undefined;
123
+ }
112
124
  async setEnableDrillToUrlByDefault(enabled) {
113
125
  return this.setSetting("ENABLE_DRILL_TO_URL_BY_DEFAULT", { value: enabled });
114
126
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/backend/settings/mapping.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AA0ErG,wBAAgB,YAAY,CACxB,IAAI,EAAE,6BAA6B,GAAG,oBAAoB,GAAG,SAAS,EACtE,QAAQ,SAAK,GACd,MAAM,SAAS,CAIjB"}
1
+ {"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/backend/settings/mapping.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AA4ErG,wBAAgB,YAAY,CACxB,IAAI,EAAE,6BAA6B,GAAG,oBAAoB,GAAG,SAAS,EACtE,QAAQ,SAAK,GACd,MAAM,SAAS,CAIjB"}