@gooddata/sdk-backend-tiger 11.64.0-alpha.2 → 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 (42) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.js +1 -1
  3. package/esm/backend/dataSources/index.d.ts +5 -1
  4. package/esm/backend/dataSources/index.d.ts.map +1 -1
  5. package/esm/backend/dataSources/index.js +42 -3
  6. package/esm/backend/features/feature.d.ts.map +1 -1
  7. package/esm/backend/features/feature.js +1 -0
  8. package/esm/backend/localization/aggregate.d.ts +1 -0
  9. package/esm/backend/localization/aggregate.d.ts.map +1 -1
  10. package/esm/backend/localization/aggregate.js +6 -0
  11. package/esm/backend/localization/fromBackend.js +2 -2
  12. package/esm/backend/uiFeatures.d.ts +3 -0
  13. package/esm/backend/uiFeatures.d.ts.map +1 -1
  14. package/esm/backend/uiFeatures.js +3 -0
  15. package/esm/backend/workspace/customApplicationSettings/index.d.ts +13 -0
  16. package/esm/backend/workspace/customApplicationSettings/index.d.ts.map +1 -0
  17. package/esm/backend/workspace/customApplicationSettings/index.js +53 -0
  18. package/esm/backend/workspace/index.d.ts +2 -1
  19. package/esm/backend/workspace/index.d.ts.map +1 -1
  20. package/esm/backend/workspace/index.js +4 -0
  21. package/esm/backend/workspace/ldm/index.d.ts +5 -1
  22. package/esm/backend/workspace/ldm/index.d.ts.map +1 -1
  23. package/esm/backend/workspace/ldm/index.js +32 -1
  24. package/esm/backend/workspace/references/index.d.ts +1 -0
  25. package/esm/backend/workspace/references/index.d.ts.map +1 -1
  26. package/esm/backend/workspace/references/index.js +28 -11
  27. package/esm/convertors/fromBackend/DeclarativeModelConverter.d.ts +4 -0
  28. package/esm/convertors/fromBackend/DeclarativeModelConverter.d.ts.map +1 -0
  29. package/esm/convertors/fromBackend/DeclarativeModelConverter.js +280 -0
  30. package/esm/convertors/fromBackend/PhysicalModelConverter.d.ts +5 -0
  31. package/esm/convertors/fromBackend/PhysicalModelConverter.d.ts.map +1 -0
  32. package/esm/convertors/fromBackend/PhysicalModelConverter.js +63 -0
  33. package/esm/convertors/shared/declarativeFields.d.ts +20 -0
  34. package/esm/convertors/shared/declarativeFields.d.ts.map +1 -0
  35. package/esm/convertors/shared/declarativeFields.js +23 -0
  36. package/esm/convertors/toBackend/DeclarativeModelConverter.d.ts +4 -0
  37. package/esm/convertors/toBackend/DeclarativeModelConverter.d.ts.map +1 -0
  38. package/esm/convertors/toBackend/DeclarativeModelConverter.js +277 -0
  39. package/esm/convertors/toBackend/PhysicalModelConverter.d.ts +5 -0
  40. package/esm/convertors/toBackend/PhysicalModelConverter.d.ts.map +1 -0
  41. package/esm/convertors/toBackend/PhysicalModelConverter.js +97 -0
  42. package/package.json +11 -11
@@ -0,0 +1,5 @@
1
+ import { type GenerateLdmRequest, type ScanRequest } from "@gooddata/api-client-tiger";
2
+ import { type IDataSourceScanRequest, type IGenerateLogicalModelRequest } from "@gooddata/sdk-model";
3
+ export declare function convertScanRequest(request: IDataSourceScanRequest): ScanRequest;
4
+ export declare function convertGenerateLogicalModelRequest(request: IGenerateLogicalModelRequest): GenerateLdmRequest;
5
+ //# sourceMappingURL=PhysicalModelConverter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhysicalModelConverter.d.ts","sourceRoot":"","sources":["../../../src/convertors/toBackend/PhysicalModelConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,kBAAkB,EAGvB,KAAK,WAAW,EAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,KAAK,sBAAsB,EAG3B,KAAK,4BAA4B,EAKpC,MAAM,qBAAqB,CAAC;AAI7B,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,WAAW,CAW/E;AAED,wBAAgB,kCAAkC,CAC9C,OAAO,EAAE,4BAA4B,GACtC,kBAAkB,CA+CpB"}
@@ -0,0 +1,97 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { assertAllFieldsMapped, copyArray, mapArray, withoutUndefined } from "../shared/declarativeFields.js";
3
+ export function convertScanRequest(request) {
4
+ const { scanTables, scanViews, schemata, separator, tablePrefix, viewPrefix, ...unmapped } = request;
5
+ assertAllFieldsMapped(unmapped);
6
+ return withoutUndefined({
7
+ scanTables,
8
+ scanViews,
9
+ schemata: copyArray(schemata),
10
+ separator,
11
+ tablePrefix,
12
+ viewPrefix,
13
+ });
14
+ }
15
+ export function convertGenerateLogicalModelRequest(request) {
16
+ const { aggregatedFactPrefix, dateGranularities, dateReferencePrefix, denormPrefix, factPrefix, generateLongIds, grainMultivalueReferencePrefix, grainPrefix, grainReferencePrefix, multivalueReferencePrefix, pdm, primaryLabelPrefix, referencePrefix, secondaryLabelPrefix, separator, tablePrefix, translationPrefix, viewPrefix, wdfPrefix, workspaceId, ...unmapped } = request;
17
+ assertAllFieldsMapped(unmapped);
18
+ return withoutUndefined({
19
+ aggregatedFactPrefix,
20
+ dateGranularities,
21
+ dateReferencePrefix,
22
+ denormPrefix,
23
+ factPrefix,
24
+ generateLongIds,
25
+ grainMultivalueReferencePrefix,
26
+ grainPrefix,
27
+ grainReferencePrefix,
28
+ multivalueReferencePrefix,
29
+ pdm: pdm && convertPdm(pdm),
30
+ primaryLabelPrefix,
31
+ referencePrefix,
32
+ secondaryLabelPrefix,
33
+ separator,
34
+ tablePrefix,
35
+ translationPrefix,
36
+ viewPrefix,
37
+ wdfPrefix,
38
+ workspaceId,
39
+ });
40
+ }
41
+ function convertPdm(pdm) {
42
+ const { sqls, tableOverrides, tables, ...unmapped } = pdm;
43
+ assertAllFieldsMapped(unmapped);
44
+ return withoutUndefined({
45
+ sqls: mapArray(sqls, convertSql),
46
+ tableOverrides: mapArray(tableOverrides, convertTableOverride),
47
+ tables: mapArray(tables, convertTable),
48
+ });
49
+ }
50
+ function convertSql(sql) {
51
+ const { columns, statement, title, ...unmapped } = sql;
52
+ assertAllFieldsMapped(unmapped);
53
+ return withoutUndefined({
54
+ columns: mapArray(columns, ({ dataType, name, nullValue, ...rest }) => {
55
+ assertAllFieldsMapped(rest);
56
+ return withoutUndefined({ dataType, name, nullValue });
57
+ }),
58
+ statement,
59
+ title,
60
+ });
61
+ }
62
+ function convertTableOverride(override) {
63
+ const { columns, path, ...unmapped } = override;
64
+ assertAllFieldsMapped(unmapped);
65
+ return { columns: columns.map(convertColumnOverride), path: [...path] };
66
+ }
67
+ function convertColumnOverride(override) {
68
+ const { labelTargetColumn, labelType, ldmTypeOverride, name, ...unmapped } = override;
69
+ assertAllFieldsMapped(unmapped);
70
+ return withoutUndefined({ labelTargetColumn, labelType, ldmTypeOverride, name });
71
+ }
72
+ function convertTable(table) {
73
+ const { columns, id, namePrefix, path, type, ...unmapped } = table;
74
+ assertAllFieldsMapped(unmapped);
75
+ return withoutUndefined({
76
+ columns: columns.map(convertColumn),
77
+ id,
78
+ namePrefix,
79
+ path: [...path],
80
+ type,
81
+ });
82
+ }
83
+ function convertColumn(column) {
84
+ const { dataType, defaultLabelOf, description, isNullable, isPrimaryKey, name, nullValue, referencedTableColumn, referencedTableId, ...unmapped } = column;
85
+ assertAllFieldsMapped(unmapped);
86
+ return withoutUndefined({
87
+ dataType,
88
+ defaultLabelOf,
89
+ description,
90
+ isNullable,
91
+ isPrimaryKey,
92
+ name,
93
+ nullValue,
94
+ referencedTableColumn,
95
+ referencedTableId,
96
+ });
97
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-tiger",
3
- "version": "11.64.0-alpha.2",
3
+ "version": "11.64.0-alpha.3",
4
4
  "description": "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -34,12 +34,12 @@
34
34
  "ts-invariant": "0.10.3",
35
35
  "tslib": "2.8.1",
36
36
  "uuid": "11.1.1",
37
- "@gooddata/api-client-tiger": "11.64.0-alpha.2",
38
- "@gooddata/sdk-backend-spi": "11.64.0-alpha.2",
39
- "@gooddata/sdk-backend-base": "11.64.0-alpha.2",
40
- "@gooddata/sdk-model": "11.64.0-alpha.2",
41
- "@gooddata/sdk-code-convertors": "11.64.0-alpha.2",
42
- "@gooddata/util": "11.64.0-alpha.2"
37
+ "@gooddata/api-client-tiger": "11.64.0-alpha.3",
38
+ "@gooddata/sdk-backend-spi": "11.64.0-alpha.3",
39
+ "@gooddata/sdk-code-convertors": "11.64.0-alpha.3",
40
+ "@gooddata/sdk-backend-base": "11.64.0-alpha.3",
41
+ "@gooddata/sdk-model": "11.64.0-alpha.3",
42
+ "@gooddata/util": "11.64.0-alpha.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@gooddata/fixtures": "3.7.0",
@@ -64,10 +64,10 @@
64
64
  "oxlint-tsgolint": "7.0.2001",
65
65
  "typescript": "7.0.2",
66
66
  "vitest": "5.0.4",
67
- "@gooddata/catalog-export": "11.64.0-alpha.2",
68
- "@gooddata/oxlint-config": "11.64.0-alpha.2",
69
- "@gooddata/eslint-config": "11.64.0-alpha.2",
70
- "@gooddata/reference-workspace": "11.64.0-alpha.2"
67
+ "@gooddata/catalog-export": "11.64.0-alpha.3",
68
+ "@gooddata/oxlint-config": "11.64.0-alpha.3",
69
+ "@gooddata/reference-workspace": "11.64.0-alpha.3",
70
+ "@gooddata/eslint-config": "11.64.0-alpha.3"
71
71
  },
72
72
  "scripts": {
73
73
  "_phase:build": "npm run build",