@gooddata/sdk-backend-tiger 11.64.0-alpha.1 → 11.64.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 (65) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.js +1 -1
  3. package/esm/backend/dataSources/files.d.ts +16 -0
  4. package/esm/backend/dataSources/files.d.ts.map +1 -0
  5. package/esm/backend/dataSources/files.js +133 -0
  6. package/esm/backend/dataSources/index.d.ts +18 -2
  7. package/esm/backend/dataSources/index.d.ts.map +1 -1
  8. package/esm/backend/dataSources/index.js +202 -2
  9. package/esm/backend/features/feature.d.ts.map +1 -1
  10. package/esm/backend/features/feature.js +1 -0
  11. package/esm/backend/localization/aggregate.d.ts +4 -1
  12. package/esm/backend/localization/aggregate.d.ts.map +1 -1
  13. package/esm/backend/localization/aggregate.js +8 -2
  14. package/esm/backend/localization/fromBackend.d.ts +12 -2
  15. package/esm/backend/localization/fromBackend.d.ts.map +1 -1
  16. package/esm/backend/localization/fromBackend.js +45 -6
  17. package/esm/backend/localization/index.d.ts +3 -0
  18. package/esm/backend/localization/index.d.ts.map +1 -1
  19. package/esm/backend/localization/index.js +52 -8
  20. package/esm/backend/settings/mapping.js +1 -0
  21. package/esm/backend/tigerSpecificFunctions.d.ts +0 -1
  22. package/esm/backend/tigerSpecificFunctions.d.ts.map +1 -1
  23. package/esm/backend/tigerSpecificFunctions.js +1 -16
  24. package/esm/backend/uiFeatures.d.ts +3 -0
  25. package/esm/backend/uiFeatures.d.ts.map +1 -1
  26. package/esm/backend/uiFeatures.js +3 -0
  27. package/esm/backend/workspace/customApplicationSettings/index.d.ts +13 -0
  28. package/esm/backend/workspace/customApplicationSettings/index.d.ts.map +1 -0
  29. package/esm/backend/workspace/customApplicationSettings/index.js +53 -0
  30. package/esm/backend/workspace/dataFilters/index.d.ts +2 -1
  31. package/esm/backend/workspace/dataFilters/index.d.ts.map +1 -1
  32. package/esm/backend/workspace/dataFilters/index.js +34 -0
  33. package/esm/backend/workspace/index.d.ts +2 -1
  34. package/esm/backend/workspace/index.d.ts.map +1 -1
  35. package/esm/backend/workspace/index.js +4 -0
  36. package/esm/backend/workspace/ldm/index.d.ts +5 -1
  37. package/esm/backend/workspace/ldm/index.d.ts.map +1 -1
  38. package/esm/backend/workspace/ldm/index.js +32 -1
  39. package/esm/backend/workspace/references/index.d.ts +1 -0
  40. package/esm/backend/workspace/references/index.d.ts.map +1 -1
  41. package/esm/backend/workspace/references/index.js +28 -11
  42. package/esm/backend/workspaces/index.d.ts +1 -1
  43. package/esm/backend/workspaces/index.d.ts.map +1 -1
  44. package/esm/backend/workspaces/index.js +9 -2
  45. package/esm/convertors/fromBackend/DeclarativeModelConverter.d.ts +4 -0
  46. package/esm/convertors/fromBackend/DeclarativeModelConverter.d.ts.map +1 -0
  47. package/esm/convertors/fromBackend/DeclarativeModelConverter.js +280 -0
  48. package/esm/convertors/fromBackend/PhysicalModelConverter.d.ts +5 -0
  49. package/esm/convertors/fromBackend/PhysicalModelConverter.d.ts.map +1 -0
  50. package/esm/convertors/fromBackend/PhysicalModelConverter.js +63 -0
  51. package/esm/convertors/fromBackend/genAIConvertor.d.ts.map +1 -1
  52. package/esm/convertors/fromBackend/genAIConvertor.js +5 -0
  53. package/esm/convertors/shared/declarativeFields.d.ts +20 -0
  54. package/esm/convertors/shared/declarativeFields.d.ts.map +1 -0
  55. package/esm/convertors/shared/declarativeFields.js +23 -0
  56. package/esm/convertors/toBackend/DeclarativeModelConverter.d.ts +4 -0
  57. package/esm/convertors/toBackend/DeclarativeModelConverter.d.ts.map +1 -0
  58. package/esm/convertors/toBackend/DeclarativeModelConverter.js +277 -0
  59. package/esm/convertors/toBackend/PhysicalModelConverter.d.ts +5 -0
  60. package/esm/convertors/toBackend/PhysicalModelConverter.d.ts.map +1 -0
  61. package/esm/convertors/toBackend/PhysicalModelConverter.js +97 -0
  62. package/esm/utils/apiProblemDetail.d.ts +3 -0
  63. package/esm/utils/apiProblemDetail.d.ts.map +1 -0
  64. package/esm/utils/apiProblemDetail.js +19 -0
  65. package/package.json +11 -11
@@ -1,9 +1,17 @@
1
1
  // (C) 2025-2026 GoodData Corporation
2
2
  import { uniqBy } from "lodash-es";
3
- import { ActionsApi_GetDependentEntitiesGraphFromEntryPoints, } from "@gooddata/api-client-tiger";
3
+ import { ActionsApi_GetDependentEntitiesGraph, ActionsApi_GetDependentEntitiesGraphFromEntryPoints, } from "@gooddata/api-client-tiger";
4
4
  import { serializeObjRef } from "@gooddata/sdk-model";
5
- import { isTigerType, objectTypeToTigerIdType, tigerIdTypeToObjectType, } from "../../../types/refTypeMapping.js";
5
+ import { objectTypeToTigerIdType, tigerIdTypeToObjectType } from "../../../types/refTypeMapping.js";
6
6
  const sdkObjectTypeToTigerType = objectTypeToTigerIdType;
7
+ const referenceNodeTypeToObjectType = tigerIdTypeToObjectType;
8
+ const workspaceGraphNodeTypeToObjectType = {
9
+ ...tigerIdTypeToObjectType,
10
+ automation: "automation",
11
+ filterView: "filterView",
12
+ userDataFilter: "userDataFilter",
13
+ memoryItem: "memoryItem",
14
+ };
7
15
  export class TigerReferencesService {
8
16
  authCall;
9
17
  workspace;
@@ -23,6 +31,16 @@ export class TigerReferencesService {
23
31
  }
24
32
  return getGraph(this.authCall, this.workspace, roots, direction === "up" ? "DEPENDENTS" : "DEPENDENCIES");
25
33
  }
34
+ async getAllReferences() {
35
+ const entitiesGraph = await this.authCall(async (client) => {
36
+ const response = await ActionsApi_GetDependentEntitiesGraph(client.axios, client.basePath, {
37
+ workspaceId: this.workspace,
38
+ });
39
+ return response.data.graph;
40
+ });
41
+ // The full graph has the same edge order as the graph of dependencies.
42
+ return createGraph(entitiesGraph, new Set(), "DEPENDENCIES", workspaceGraphNodeTypeToObjectType);
43
+ }
26
44
  }
27
45
  async function getGraph(authCall, workspace, roots, relation) {
28
46
  const identifiers = roots.flatMap(refToEntityIdentifier);
@@ -40,11 +58,11 @@ async function getGraph(authCall, workspace, roots, relation) {
40
58
  });
41
59
  return response.data.graph;
42
60
  });
43
- return createGraph(entitiesGraph, rootKeys, relation);
61
+ return createGraph(entitiesGraph, rootKeys, relation, referenceNodeTypeToObjectType);
44
62
  }
45
- function createGraph(entitiesGraph, rootKeys, relation) {
63
+ function createGraph(entitiesGraph, rootKeys, relation, nodeTypes) {
46
64
  const nodes = entitiesGraph.nodes.flatMap((node) => {
47
- const ref = tigerNodeToRef(node);
65
+ const ref = tigerNodeToRef(node, nodeTypes);
48
66
  if (!ref) {
49
67
  return [];
50
68
  }
@@ -55,8 +73,8 @@ function createGraph(entitiesGraph, rootKeys, relation) {
55
73
  if (!from || !to) {
56
74
  return [];
57
75
  }
58
- const fromRef = tigerNodeToRef(from);
59
- const toRef = tigerNodeToRef(to);
76
+ const fromRef = tigerNodeToRef(from, nodeTypes);
77
+ const toRef = tigerNodeToRef(to, nodeTypes);
60
78
  if (!fromRef || !toRef) {
61
79
  return [];
62
80
  }
@@ -74,10 +92,9 @@ function refToEntityIdentifier(ref) {
74
92
  const tigerType = ref.type ? sdkObjectTypeToTigerType[ref.type] : "visualizationObject";
75
93
  return isGraphSupportedType(tigerType) ? [{ id: ref.identifier, type: tigerType }] : [];
76
94
  }
77
- function tigerNodeToRef(node) {
78
- return isTigerType(node.type)
79
- ? { identifier: node.id, type: tigerIdTypeToObjectType[node.type] }
80
- : undefined;
95
+ function tigerNodeToRef(node, nodeTypes) {
96
+ const type = nodeTypes[node.type];
97
+ return type ? { identifier: node.id, type } : undefined;
81
98
  }
82
99
  // Prompt is not accepted by the dependency graph endpoint.
83
100
  function isGraphSupportedType(type) {
@@ -9,6 +9,6 @@ export declare class TigerWorkspaceQueryFactory implements IWorkspacesQueryFacto
9
9
  constructor(authCall: TigerAuthenticatedCallGuard, dateFormatter: DateFormatter, dateStringifier: DateStringifier, dateNormalizer: DateNormalizer);
10
10
  forUser(userId: string): IWorkspacesQuery;
11
11
  forCurrentUser(): IWorkspacesQuery;
12
- createWorkspace({ id, title, parentWorkspace, }: IWorkspaceDefinition): Promise<IWorkspaceDescriptor>;
12
+ createWorkspace({ id, title, description, parentWorkspace, prefix, earlyAccessValues, cacheExtraLimit, dataSource, }: IWorkspaceDefinition): Promise<IWorkspaceDescriptor>;
13
13
  }
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/workspaces/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAGH,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAI/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACvB,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAIxE,qBAAa,0BAA2B,YAAW,uBAAuB;IAElE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAJnC,YACqB,QAAQ,EAAE,2BAA2B,EACrC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC/C;IAEG,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAQ/C;IAEM,cAAc,IAAI,gBAAgB,CAOxC;IAEY,eAAe,CAAC,EACzB,EAAE,EACF,KAAK,EACL,eAAe,GAClB,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgBtD;CACJ"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backend/workspaces/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAGH,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAI/B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACvB,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAIxE,qBAAa,0BAA2B,YAAW,uBAAuB;IAElE,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAJnC,YACqB,QAAQ,EAAE,2BAA2B,EACrC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC/C;IAEG,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAQ/C;IAEM,cAAc,IAAI,gBAAgB,CAOxC;IAEY,eAAe,CAAC,EACzB,EAAE,EACF,KAAK,EACL,WAAW,EACX,eAAe,EACf,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,UAAU,GACb,EAAE,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAuBtD;CACJ"}
@@ -23,13 +23,20 @@ export class TigerWorkspaceQueryFactory {
23
23
  forCurrentUser() {
24
24
  return new TigerWorkspaceQuery(this.authCall, this.dateFormatter, this.dateStringifier, this.dateNormalizer);
25
25
  }
26
- async createWorkspace({ id, title, parentWorkspace, }) {
26
+ async createWorkspace({ id, title, description, parentWorkspace, prefix, earlyAccessValues, cacheExtraLimit, dataSource, }) {
27
27
  const result = await this.authCall((client) => EntitiesApi_CreateEntityWorkspaces(client.axios, client.basePath, {
28
28
  jsonApiWorkspaceInDocument: {
29
29
  data: {
30
30
  id,
31
31
  type: "workspace",
32
- attributes: { name: title },
32
+ attributes: {
33
+ name: title,
34
+ description,
35
+ prefix,
36
+ earlyAccessValues,
37
+ cacheExtraLimit,
38
+ dataSource,
39
+ },
33
40
  relationships: parentWorkspace
34
41
  ? { parent: { data: { id: parentWorkspace, type: "workspace" } } }
35
42
  : undefined,
@@ -0,0 +1,4 @@
1
+ import { type DeclarativeLdm } from "@gooddata/api-client-tiger";
2
+ import { type IDeclarativeLogicalModel } from "@gooddata/sdk-model";
3
+ export declare function convertDeclarativeLdm(ldm: DeclarativeLdm | undefined): IDeclarativeLogicalModel;
4
+ //# sourceMappingURL=DeclarativeModelConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeclarativeModelConverter.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/DeclarativeModelConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAcH,KAAK,cAAc,EAUtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAmBH,KAAK,wBAAwB,EAKhC,MAAM,qBAAqB,CAAC;AAU7B,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS,GAAG,wBAAwB,CAY/F"}
@@ -0,0 +1,280 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { assertAllFieldsMapped, copyArray, mapArray, mapRecord, withoutUndefined, } from "../shared/declarativeFields.js";
3
+ export function convertDeclarativeLdm(ldm) {
4
+ if (!ldm) {
5
+ return {};
6
+ }
7
+ const { calendars, datasetExtensions, datasets, dateInstances, ...unmapped } = ldm;
8
+ assertAllFieldsMapped(unmapped);
9
+ return withoutUndefined({
10
+ calendars: mapRecord(calendars, convertCalendar),
11
+ datasetExtensions: mapArray(datasetExtensions, convertDatasetExtension),
12
+ datasets: mapArray(datasets, convertDataset),
13
+ dateInstances: mapArray(dateInstances, convertDateDataset),
14
+ });
15
+ }
16
+ function convertCalendar(calendar) {
17
+ const { definition, description, enabledGranularities, name, ...unmapped } = calendar;
18
+ assertAllFieldsMapped(unmapped);
19
+ return withoutUndefined({
20
+ definition: convertCalendarDefinition(definition),
21
+ description,
22
+ enabledGranularities: enabledGranularities.map(({ granularity, prefix, ...rest }) => {
23
+ assertAllFieldsMapped(rest);
24
+ return { granularity, prefix };
25
+ }),
26
+ name,
27
+ });
28
+ }
29
+ function convertCalendarDefinition(definition) {
30
+ if (definition.type === "fiscalYear") {
31
+ const { type, monthOffset, ...unmapped } = definition;
32
+ assertAllFieldsMapped(unmapped);
33
+ return { type, monthOffset };
34
+ }
35
+ const { type, dataSourceTables, ...unmapped } = definition;
36
+ assertAllFieldsMapped(unmapped);
37
+ return {
38
+ type,
39
+ dataSourceTables: mapRecord(dataSourceTables, ({ path, version, ...rest }) => {
40
+ assertAllFieldsMapped(rest);
41
+ return { path: [...path], version };
42
+ }) ?? {},
43
+ };
44
+ }
45
+ function convertDatasetExtension(extension) {
46
+ const { id, workspaceDataFilterReferences, ...unmapped } = extension;
47
+ assertAllFieldsMapped(unmapped);
48
+ return withoutUndefined({
49
+ id,
50
+ workspaceDataFilterReferences: mapArray(workspaceDataFilterReferences, convertWorkspaceDataFilterReference),
51
+ });
52
+ }
53
+ function convertWorkspaceDataFilterReference(reference) {
54
+ const { filterColumn, filterColumnDataType, filterId, ...unmapped } = reference;
55
+ assertAllFieldsMapped(unmapped);
56
+ const { id, type, ...unmappedId } = filterId;
57
+ assertAllFieldsMapped(unmappedId);
58
+ return { filterColumn, filterColumnDataType, filterId: { id, type } };
59
+ }
60
+ function convertDataset(dataset) {
61
+ const { aggregatedFacts, attributes, dataSourceTableId, description, facts, grain, id, precedence, references, sql, tags, title, type, workspaceDataFilterColumns, workspaceDataFilterReferences, ...unmapped } = dataset;
62
+ assertAllFieldsMapped(unmapped);
63
+ return withoutUndefined({
64
+ aggregatedFacts: mapArray(aggregatedFacts, convertAggregatedFact),
65
+ attributes: mapArray(attributes, convertAttribute),
66
+ dataSourceTableId: dataSourceTableId && convertDataSourceTableId(dataSourceTableId),
67
+ description,
68
+ facts: mapArray(facts, convertFact),
69
+ grain: mapArray(grain, convertGrainIdentifier),
70
+ id,
71
+ precedence,
72
+ references: mapArray(references, convertReference),
73
+ sql: sql && convertDatasetSql(sql),
74
+ tags: copyArray(tags),
75
+ title,
76
+ type,
77
+ workspaceDataFilterColumns: mapArray(workspaceDataFilterColumns, convertWorkspaceDataFilterColumn),
78
+ workspaceDataFilterReferences: mapArray(workspaceDataFilterReferences, convertWorkspaceDataFilterReference),
79
+ });
80
+ }
81
+ function convertAggregatedFact(fact) {
82
+ const { description, id, isNullable, nullValue, sourceColumn, sourceColumnDataType, sourceFactReference, tags, ...unmapped } = fact;
83
+ assertAllFieldsMapped(unmapped);
84
+ const { operation, reference, ...unmappedReference } = sourceFactReference;
85
+ assertAllFieldsMapped(unmappedReference);
86
+ const { id: referenceId, type: referenceType, ...unmappedIdentifier } = reference;
87
+ assertAllFieldsMapped(unmappedIdentifier);
88
+ return withoutUndefined({
89
+ description,
90
+ id,
91
+ isNullable,
92
+ nullValue,
93
+ sourceColumn,
94
+ sourceColumnDataType,
95
+ sourceFactReference: { operation, reference: { id: referenceId, type: referenceType } },
96
+ tags: copyArray(tags),
97
+ });
98
+ }
99
+ function convertAttribute(attribute) {
100
+ const { conditionalFormatting, defaultView, description, id, isHidden, isNullable, labels, locale, nullValue, sortColumn, sortDirection, sourceColumn, sourceColumnDataType, tags, title, ...unmapped } = attribute;
101
+ assertAllFieldsMapped(unmapped);
102
+ return withoutUndefined({
103
+ conditionalFormatting: convertConditionalFormatting(conditionalFormatting),
104
+ defaultView: defaultView && convertLabelIdentifier(defaultView),
105
+ description,
106
+ id,
107
+ isHidden,
108
+ isNullable,
109
+ labels: mapArray(labels, convertLabel),
110
+ locale,
111
+ nullValue,
112
+ sortColumn,
113
+ sortDirection,
114
+ sourceColumn,
115
+ sourceColumnDataType,
116
+ tags: copyArray(tags),
117
+ title,
118
+ });
119
+ }
120
+ function convertLabel(label) {
121
+ const { conditionalFormatting, description, geoAreaConfig, id, isHidden, isNullable, locale, nullValue, sourceColumn, sourceColumnDataType, tags, title, translations, valueType, ...unmapped } = label;
122
+ assertAllFieldsMapped(unmapped);
123
+ return withoutUndefined({
124
+ conditionalFormatting: convertConditionalFormatting(conditionalFormatting),
125
+ description,
126
+ geoAreaConfig: geoAreaConfig && convertGeoAreaConfig(geoAreaConfig),
127
+ id,
128
+ isHidden,
129
+ isNullable,
130
+ locale,
131
+ nullValue,
132
+ sourceColumn,
133
+ sourceColumnDataType,
134
+ tags: copyArray(tags),
135
+ title,
136
+ translations: mapArray(translations, ({ locale, sourceColumn, ...rest }) => {
137
+ assertAllFieldsMapped(rest);
138
+ return { locale, sourceColumn };
139
+ }),
140
+ valueType,
141
+ });
142
+ }
143
+ function convertConditionalFormatting(conditionalFormatting) {
144
+ if (!conditionalFormatting) {
145
+ return conditionalFormatting;
146
+ }
147
+ const { conditions, enabled, ...unmapped } = conditionalFormatting;
148
+ assertAllFieldsMapped(unmapped);
149
+ return { conditions: conditions.map(convertConditionalFormattingCondition), enabled };
150
+ }
151
+ function convertConditionalFormattingCondition(condition) {
152
+ const { format, id, operator, value, ...unmapped } = condition;
153
+ assertAllFieldsMapped(unmapped);
154
+ const { backgroundColor, color, scope, ...unmappedFormat } = format;
155
+ assertAllFieldsMapped(unmappedFormat);
156
+ return withoutUndefined({
157
+ format: withoutUndefined({ backgroundColor, color, scope }),
158
+ id,
159
+ operator,
160
+ value: convertConditionalFormattingValue(value),
161
+ });
162
+ }
163
+ function convertConditionalFormattingValue(value) {
164
+ switch (value.kind) {
165
+ case "none": {
166
+ const { kind, ...unmapped } = value;
167
+ assertAllFieldsMapped(unmapped);
168
+ return { kind };
169
+ }
170
+ case "literal": {
171
+ const { kind, value: literal, ...unmapped } = value;
172
+ assertAllFieldsMapped(unmapped);
173
+ return { kind, value: literal };
174
+ }
175
+ case "literalRange": {
176
+ const { kind, from, to, ...unmapped } = value;
177
+ assertAllFieldsMapped(unmapped);
178
+ return { kind, from, to };
179
+ }
180
+ case "absoluteDate": {
181
+ const { from, to, kind, ...unmapped } = value;
182
+ assertAllFieldsMapped(unmapped);
183
+ return { from, to, kind };
184
+ }
185
+ case "relativeDate": {
186
+ const { kind, granularity, from, to, ...unmapped } = value;
187
+ assertAllFieldsMapped(unmapped);
188
+ return { kind, granularity, from, to };
189
+ }
190
+ }
191
+ }
192
+ function convertDataSourceTableId(tableId) {
193
+ const { dataSourceId, id, path, type, ...unmapped } = tableId;
194
+ assertAllFieldsMapped(unmapped);
195
+ return withoutUndefined({ dataSourceId, id, path: copyArray(path), type });
196
+ }
197
+ function convertFact(fact) {
198
+ const { description, id, isHidden, isNullable, nullValue, sourceColumn, sourceColumnDataType, tags, title, ...unmapped } = fact;
199
+ assertAllFieldsMapped(unmapped);
200
+ return withoutUndefined({
201
+ description,
202
+ id,
203
+ isHidden,
204
+ isNullable,
205
+ nullValue,
206
+ sourceColumn,
207
+ sourceColumnDataType,
208
+ tags: copyArray(tags),
209
+ title,
210
+ });
211
+ }
212
+ function convertGrainIdentifier(grain) {
213
+ const { id, type, ...unmapped } = grain;
214
+ assertAllFieldsMapped(unmapped);
215
+ return { id, type };
216
+ }
217
+ function convertReference(reference) {
218
+ const { identifier, multivalue, sourceColumnDataTypes, sourceColumns, sources, ...unmapped } = reference;
219
+ assertAllFieldsMapped(unmapped);
220
+ const { id, type, ...unmappedIdentifier } = identifier;
221
+ assertAllFieldsMapped(unmappedIdentifier);
222
+ return withoutUndefined({
223
+ identifier: { id, type },
224
+ multivalue,
225
+ sourceColumnDataTypes: copyArray(sourceColumnDataTypes),
226
+ sourceColumns: copyArray(sourceColumns),
227
+ sources: mapArray(sources, convertReferenceSource),
228
+ });
229
+ }
230
+ function convertReferenceSource(source) {
231
+ const { column, dataType, isNullable, nullValue, target, ...unmapped } = source;
232
+ assertAllFieldsMapped(unmapped);
233
+ return withoutUndefined({
234
+ column,
235
+ dataType,
236
+ isNullable,
237
+ nullValue,
238
+ target: convertGrainIdentifier(target),
239
+ });
240
+ }
241
+ function convertDatasetSql(sql) {
242
+ const { dataSourceId, statement, ...unmapped } = sql;
243
+ assertAllFieldsMapped(unmapped);
244
+ return { dataSourceId, statement };
245
+ }
246
+ function convertWorkspaceDataFilterColumn(column) {
247
+ const { dataType, name, ...unmapped } = column;
248
+ assertAllFieldsMapped(unmapped);
249
+ return { dataType, name };
250
+ }
251
+ function convertDateDataset(dateDataset) {
252
+ const { conditionalFormatting, description, granularities, granularitiesFormatting, id, tags, title, ...unmapped } = dateDataset;
253
+ assertAllFieldsMapped(unmapped);
254
+ const { titleBase, titlePattern, ...unmappedFormatting } = granularitiesFormatting;
255
+ assertAllFieldsMapped(unmappedFormatting);
256
+ return withoutUndefined({
257
+ conditionalFormatting: convertConditionalFormatting(conditionalFormatting),
258
+ description,
259
+ granularities: [...granularities],
260
+ granularitiesFormatting: { titleBase, titlePattern },
261
+ id,
262
+ tags: copyArray(tags),
263
+ title,
264
+ });
265
+ }
266
+ function convertLabelIdentifier(identifier) {
267
+ const { id, type, ...unmapped } = identifier;
268
+ assertAllFieldsMapped(unmapped);
269
+ return { id, type };
270
+ }
271
+ function convertGeoAreaConfig(config) {
272
+ const { collection, ...unmapped } = config;
273
+ assertAllFieldsMapped(unmapped);
274
+ return { collection: convertGeoCollectionIdentifier(collection) };
275
+ }
276
+ function convertGeoCollectionIdentifier(identifier) {
277
+ const { id, kind, ...unmapped } = identifier;
278
+ assertAllFieldsMapped(unmapped);
279
+ return withoutUndefined({ id, kind });
280
+ }
@@ -0,0 +1,5 @@
1
+ import { type ScanResultPdm, type ScanSqlResponse } from "@gooddata/api-client-tiger";
2
+ import { type IDataSourceScanResult, type ISqlScanResult } from "@gooddata/sdk-model";
3
+ export declare function convertScanResult(result: ScanResultPdm): IDataSourceScanResult;
4
+ export declare function convertSqlScanResult(result: ScanSqlResponse): ISqlScanResult;
5
+ //# sourceMappingURL=PhysicalModelConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhysicalModelConverter.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/PhysicalModelConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,aAAa,EAClB,KAAK,eAAe,EAEvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,KAAK,qBAAqB,EAK1B,KAAK,cAAc,EACtB,MAAM,qBAAqB,CAAC;AAI7B,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,qBAAqB,CAS9E;AAsDD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,cAAc,CAO5E"}
@@ -0,0 +1,63 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { assertAllFieldsMapped, mapArray, withoutUndefined } from "../shared/declarativeFields.js";
3
+ export function convertScanResult(result) {
4
+ const { pdm, warnings, ...unmapped } = result;
5
+ assertAllFieldsMapped(unmapped);
6
+ const { tables, ...unmappedPdm } = pdm;
7
+ assertAllFieldsMapped(unmappedPdm);
8
+ return {
9
+ pdm: { tables: tables.map(convertPhysicalTable) },
10
+ warnings: mapArray(warnings, convertTableWarning) ?? [],
11
+ };
12
+ }
13
+ function convertPhysicalTable(table) {
14
+ const { columns, id, namePrefix, path, type, ...unmapped } = table;
15
+ assertAllFieldsMapped(unmapped);
16
+ return withoutUndefined({
17
+ columns: columns.map(convertPhysicalColumn),
18
+ id,
19
+ namePrefix,
20
+ path: [...path],
21
+ type,
22
+ });
23
+ }
24
+ function convertPhysicalColumn(column) {
25
+ const { dataType, defaultLabelOf, description, isNullable, isPrimaryKey, name, nullValue, referencedTableColumn, referencedTableId, ...unmapped } = column;
26
+ assertAllFieldsMapped(unmapped);
27
+ return withoutUndefined({
28
+ dataType,
29
+ defaultLabelOf,
30
+ description,
31
+ isNullable,
32
+ isPrimaryKey,
33
+ name,
34
+ nullValue,
35
+ referencedTableColumn,
36
+ referencedTableId,
37
+ });
38
+ }
39
+ function convertTableWarning(warning) {
40
+ const { columns, message, name, ...unmapped } = warning;
41
+ assertAllFieldsMapped(unmapped);
42
+ return withoutUndefined({
43
+ columns: columns.map(({ message, name, ...rest }) => {
44
+ assertAllFieldsMapped(rest);
45
+ return { message, name };
46
+ }),
47
+ message,
48
+ name,
49
+ });
50
+ }
51
+ export function convertSqlScanResult(result) {
52
+ const { columns, dataPreview, ...unmapped } = result;
53
+ assertAllFieldsMapped(unmapped);
54
+ return withoutUndefined({
55
+ columns: columns.map(convertSqlColumn),
56
+ dataPreview: mapArray(dataPreview, (row) => [...row]),
57
+ });
58
+ }
59
+ function convertSqlColumn(column) {
60
+ const { dataType, description, name, nullValue, ...unmapped } = column;
61
+ assertAllFieldsMapped(unmapped);
62
+ return withoutUndefined({ dataType, description, name, nullValue });
63
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"genAIConvertor.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/genAIConvertor.ts"],"names":[],"mappings":"AAKA,OAAO,EAGH,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAK/B,KAAK,yBAAyB,EAM9B,KAAK,aAAa,EAUrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEH,KAAK,iBAAiB,EAGtB,KAAK,sBAAsB,EAE3B,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAGhC,KAAK,gBAAgB,EAExB,MAAM,2BAA2B,CAAC;AAyCnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAKhE,wBAAgB,kCAAkC,CAAC,YAAY,EAAE,sBAAsB,GAAG,iBAAiB,CAS1G;AAED,wBAAgB,sCAAsC,CAClD,IAAI,EAAE,0BAA0B,EAChC,SAAS,EAAE,0BAA0B,CAAC,WAAW,CAAC,GAAG,SAAS,EAC9D,OAAO,EAAE,qBAAqB,EAAE,EAChC,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,gBAAgB,EACzB,QAAQ,CAAC,EAAE,MAAM,GAClB,qBAAqB,GAAG,SAAS,CA6BnC;AAED,wBAAgB,u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  callId: content.callId,
106
106
  result: tryParseJson(content.result),
107
107
  };
108
+ case "skillsActivated":
109
+ return {
110
+ type: "skillsActivated",
111
+ skills: content.skills.map(({ name, title }) => ({ name, title })),
112
+ };
108
113
  default:
109
114
  // Unknown content type (e.g. sent by a newer backend): log and drop the item,
110
115
  // do not fail the whole conversation stream.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Fails to compile when a converter does not destructure every field of its input.
3
+ * Pass the rest of the destructured input object.
4
+ */
5
+ export declare function assertAllFieldsMapped(_unmapped: Record<string, never>): void;
6
+ /**
7
+ * Returns the object without the keys whose value is undefined. A key with a null value stays.
8
+ */
9
+ export declare function withoutUndefined<T extends object>(obj: NoInfer<T>): T;
10
+ export declare function copyArray<T>(array: T[]): T[];
11
+ export declare function copyArray<T>(array: T[] | undefined): T[] | undefined;
12
+ export declare function copyArray<T>(array: T[] | null | undefined): T[] | null | undefined;
13
+ export declare function mapArray<T, R>(array: T[], fn: (item: T) => R): R[];
14
+ export declare function mapArray<T, R>(array: T[] | undefined, fn: (item: T) => R): R[] | undefined;
15
+ export declare function mapRecord<T, R>(record: {
16
+ [key: string]: T;
17
+ } | undefined, fn: (item: T) => R): {
18
+ [key: string]: R;
19
+ } | undefined;
20
+ //# sourceMappingURL=declarativeFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declarativeFields.d.ts","sourceRoot":"","sources":["../../../src/convertors/shared/declarativeFields.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,IAAI,CAAG;AAEhF;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAErE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AAC9C,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC;AACtE,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,CAAC;AAKpF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AACpE,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC;AAK5F,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,EAC1B,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CAAE,GAAG,SAAS,EACxC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GACnB;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAA;CAAE,GAAG,SAAS,CAIlC"}
@@ -0,0 +1,23 @@
1
+ // (C) 2026 GoodData Corporation
2
+ /**
3
+ * Fails to compile when a converter does not destructure every field of its input.
4
+ * Pass the rest of the destructured input object.
5
+ */
6
+ export function assertAllFieldsMapped(_unmapped) { }
7
+ /**
8
+ * Returns the object without the keys whose value is undefined. A key with a null value stays.
9
+ */
10
+ export function withoutUndefined(obj) {
11
+ return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== undefined));
12
+ }
13
+ export function copyArray(array) {
14
+ return array ? [...array] : array;
15
+ }
16
+ export function mapArray(array, fn) {
17
+ return array?.map((item) => fn(item));
18
+ }
19
+ export function mapRecord(record, fn) {
20
+ return record
21
+ ? Object.fromEntries(Object.entries(record).map(([key, value]) => [key, fn(value)]))
22
+ : undefined;
23
+ }
@@ -0,0 +1,4 @@
1
+ import { type DeclarativeLdm } from "@gooddata/api-client-tiger";
2
+ import { type IDeclarativeLogicalModel } from "@gooddata/sdk-model";
3
+ export declare function convertDeclarativeLdmToBackend(ldm: IDeclarativeLogicalModel): DeclarativeLdm;
4
+ //# sourceMappingURL=DeclarativeModelConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeclarativeModelConverter.d.ts","sourceRoot":"","sources":["../../../src/convertors/toBackend/DeclarativeModelConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAcH,KAAK,cAAc,EAUtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAmBH,KAAK,wBAAwB,EAKhC,MAAM,qBAAqB,CAAC;AAU7B,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,wBAAwB,GAAG,cAAc,CAS5F"}