@gooddata/sdk-backend-tiger 11.57.0-alpha.6 → 11.57.0
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.d.ts.map +1 -1
- package/esm/__version.js +1 -1
- package/esm/backend/workspace/computedAttributes/index.d.ts.map +1 -1
- package/esm/backend/workspace/computedAttributes/index.js +2 -13
- package/esm/backend/workspace/styling/index.d.ts +10 -1
- package/esm/backend/workspace/styling/index.d.ts.map +1 -1
- package/esm/backend/workspace/styling/index.js +26 -1
- package/package.json +11 -11
package/esm/__version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "11.57.0
|
|
1
|
+
export declare const LIB_VERSION = "11.57.0";
|
|
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.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"__version.d.ts","sourceRoot":"","sources":["../src/__version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC,eAAO,MAAM,eAAe,2EAA2E,CAAC;AAExG,eAAO,MAAM,QAAQ,gCAAgC,CAAC"}
|
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.57.0
|
|
3
|
+
export const LIB_VERSION = "11.57.0";
|
|
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":"index.d.ts","sourceRoot":"","sources":["../../../../src/backend/workspace/computedAttributes/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/backend/workspace/computedAttributes/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACR,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACtC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,gCAAgC,EACrC,KAAK,0CAA0C,EAE/C,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAKd,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAI3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,qBAAa,gCAAiC,YAAW,mCAAmC;IAEpF,OAAO,CAAC,QAAQ,CAAC,QAAQ;aACT,SAAS,EAAE,MAAM;IAFrC,YACqB,QAAQ,EAAE,2BAA2B,EACtC,SAAS,EAAE,MAAM,EACjC;IAEE,uBAAuB,CACzB,iBAAiB,EAAE,0CAA0C,GAC9D,OAAO,CAAC,gCAAgC,CAAC,CAgB3C;IAEK,uBAAuB,CACzB,iBAAiB,EAAE,gCAAgC,GACpD,OAAO,CAAC,gCAAgC,CAAC,CAkB3C;IAEK,2BAA2B,CAC7B,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,GAC1E,OAAO,CAAC,gCAAgC,CAAC,CA4B3C;IAEK,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CASxD;IAEK,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAY5F;IAEY,oBAAoB,CAC7B,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,4BAAiC,GAC3C,OAAO,CAAC,gCAAgC,CAAC,CAW3C;IAEY,oCAAoC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CA2BjG;IAEY,sCAAsC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC,CA6FvG;IAEM,0BAA0B,IAAI,uBAAuB,CAE3D;CACJ"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { uniqBy } from "lodash-es";
|
|
3
3
|
import { MetadataUtilities, } from "@gooddata/api-client-tiger";
|
|
4
4
|
import { ActionsApi_SetCertification } from "@gooddata/api-client-tiger/endpoints/actions";
|
|
5
|
-
import { DashboardsApi_GetAllEntitiesAnalyticalDashboards, EntitiesApi_CreateEntityComputedAttributes, EntitiesApi_DeleteEntityComputedAttributes, EntitiesApi_GetAllEntitiesComputedAttributes, EntitiesApi_GetAllEntitiesMetrics, EntitiesApi_GetAllEntitiesUserDataFilters, EntitiesApi_GetAllEntitiesVisualizationObjects,
|
|
5
|
+
import { DashboardsApi_GetAllEntitiesAnalyticalDashboards, EntitiesApi_CreateEntityComputedAttributes, EntitiesApi_DeleteEntityComputedAttributes, EntitiesApi_GetAllEntitiesComputedAttributes, EntitiesApi_GetAllEntitiesMetrics, EntitiesApi_GetAllEntitiesUserDataFilters, EntitiesApi_GetAllEntitiesVisualizationObjects, EntitiesApi_GetEntityComputedAttributes, EntitiesApi_PatchEntityComputedAttributes, EntitiesApi_UpdateEntityComputedAttributes, } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
|
|
6
6
|
import { idRef, insightId, isIdentifierRef, } from "@gooddata/sdk-model";
|
|
7
7
|
import { convertComputedAttributeFromBackend } from "../../../convertors/fromBackend/ComputedAttributeConverter.js";
|
|
8
8
|
import { visualizationObjectsItemToInsight } from "../../../convertors/fromBackend/InsightConverter.js";
|
|
@@ -165,21 +165,11 @@ export class TigerWorkspaceComputedAttributes {
|
|
|
165
165
|
})
|
|
166
166
|
.then(MetadataUtilities.mergeEntitiesResults)
|
|
167
167
|
.then((filters) => filters.data.map((filter) => convertDataFilterFromBackend(filter, "userDataFilter"))));
|
|
168
|
-
|
|
169
|
-
// metadata API; the same RSQL still succeeds when the backend wires one. A 400 must
|
|
170
|
-
// not fail the whole lookup or the catalog would allow deletes of used attributes.
|
|
171
|
-
const workspaceDataFilters = this.authCall((client) => MetadataUtilities.getAllPagesOf(client, EntitiesApi_GetAllEntitiesWorkspaceDataFilters, {
|
|
172
|
-
workspaceId: this.workspace,
|
|
173
|
-
filter: `computedAttributes.id==${id}`,
|
|
174
|
-
})
|
|
175
|
-
.then(MetadataUtilities.mergeEntitiesResults)
|
|
176
|
-
.then((filters) => filters.data.map((filter) => convertDataFilterFromBackend(filter, "workspaceDataFilter"))));
|
|
177
|
-
const [insightList, measureList, computedAttributeList, userDataFilterList, workspaceDataFilterList] = await Promise.all([
|
|
168
|
+
const [insightList, measureList, computedAttributeList, userDataFilterList] = await Promise.all([
|
|
178
169
|
insights,
|
|
179
170
|
measures,
|
|
180
171
|
computedAttributes,
|
|
181
172
|
userDataFilters,
|
|
182
|
-
workspaceDataFilters,
|
|
183
173
|
]);
|
|
184
174
|
const dashboardFilterParts = [`labels.id==${id}`];
|
|
185
175
|
if (insightList.length > 0) {
|
|
@@ -198,7 +188,6 @@ export class TigerWorkspaceComputedAttributes {
|
|
|
198
188
|
analyticalDashboards,
|
|
199
189
|
computedAttributes: computedAttributeList,
|
|
200
190
|
userDataFilters: userDataFilterList,
|
|
201
|
-
workspaceDataFilters: workspaceDataFilterList,
|
|
202
191
|
};
|
|
203
192
|
}
|
|
204
193
|
getComputedAttributesQuery() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IWorkspaceStylingService } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type IColorPaletteDefinition, type IColorPaletteItem, type IColorPaletteMetadataObject, type ITheme, type IThemeDefinition, type IThemeMetadataObject, type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IColorPalette, type IColorPaletteDefinition, type IColorPaletteItem, type IColorPaletteMetadataObject, type ITheme, type IThemeDefinition, type IThemeMetadataObject, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
import { type TigerAuthenticatedCallGuard } from "../../../types/index.js";
|
|
4
4
|
export declare class TigerWorkspaceStyling implements IWorkspaceStylingService {
|
|
5
5
|
private readonly authCall;
|
|
@@ -64,6 +64,15 @@ export declare class TigerWorkspaceStyling implements IWorkspaceStylingService {
|
|
|
64
64
|
* @returns promise of array of color palette metadata objects
|
|
65
65
|
*/
|
|
66
66
|
getColorPalettes(): Promise<IColorPaletteMetadataObject[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Read one color palette by reference, wherever the workspace can see it.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* Fetched by id rather than found in the listing above: that one asks for `origin: "NATIVE"`,
|
|
72
|
+
* so it never holds a palette the workspace inherits from its parent. The scope comes from the
|
|
73
|
+
* reference type, the same discriminator the active color palette setting carries.
|
|
74
|
+
*/
|
|
75
|
+
getColorPaletteByRef(colorPaletteRef: ObjRef): Promise<IColorPalette | undefined>;
|
|
67
76
|
/**
|
|
68
77
|
* Create a new color palette on the workspace level.
|
|
69
78
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/backend/workspace/styling/index.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EACH,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAA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KG;IACU,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAS/E;IAED;;;;;;OAMG;IACU,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAc/E;IAED,OAAO,CAAC,gBAAgB;IAIxB;;;;;OAKG;IACU,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQxD;IAED;;;;OAIG;IACU,gBAAgB,IAAI,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAiBtE;IAED;;;;;;;OAOG;IACU,oBAAoB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAwB7F;IAED;;;;;;OAMG;IACU,kBAAkB,CAC3B,YAAY,EAAE,uBAAuB,GACtC,OAAO,CAAC,2BAA2B,CAAC,CAetC;IAED;;;;;;;OAOG;IACU,kBAAkB,CAC3B,YAAY,EAAE,uBAAuB,GACtC,OAAO,CAAC,2BAA2B,CAAC,CAiBtC;IAED;;;;;OAKG;IACU,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQtE;IAED,OAAO,CAAC,uBAAuB;CAKlC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { v4 as uuidv4 } from "uuid";
|
|
3
3
|
import { MetadataUtilities, } from "@gooddata/api-client-tiger";
|
|
4
4
|
import { EntitiesApi_CreateEntityWorkspaceColorPalettes, EntitiesApi_CreateEntityWorkspaceThemes, EntitiesApi_DeleteEntityWorkspaceColorPalettes, EntitiesApi_DeleteEntityWorkspaceThemes, EntitiesApi_GetAllEntitiesColorPalettes, EntitiesApi_GetAllEntitiesThemes, EntitiesApi_GetAllEntitiesWorkspaceColorPalettes, EntitiesApi_GetAllEntitiesWorkspaceThemes, EntitiesApi_UpdateEntityWorkspaceColorPalettes, EntitiesApi_UpdateEntityWorkspaceThemes, } from "@gooddata/api-client-tiger/endpoints/entitiesObjects";
|
|
5
|
-
import { idRef, } from "@gooddata/sdk-model";
|
|
5
|
+
import { idRef, isIdentifierRef, } from "@gooddata/sdk-model";
|
|
6
6
|
import { convertColorPalette as convertColorPaletteFromBackend, convertColorPaletteWithLinks, getColorPaletteFromMDObject, isValidColorPalette, unwrapColorPaletteContent, } from "../../../convertors/fromBackend/ColorPaletteConverter.js";
|
|
7
7
|
import { convertTheme as convertThemeFromBackend, convertThemeWithLinks, } from "../../../convertors/fromBackend/ThemeConverter.js";
|
|
8
8
|
import { convertWorkspaceColorPalette as convertWorkspaceColorPaletteToBackend } from "../../../convertors/toBackend/ColorPaletteConverter.js";
|
|
@@ -187,6 +187,31 @@ export class TigerWorkspaceStyling {
|
|
|
187
187
|
.map(convertColorPaletteWithLinks);
|
|
188
188
|
}));
|
|
189
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Read one color palette by reference, wherever the workspace can see it.
|
|
192
|
+
*
|
|
193
|
+
* @remarks
|
|
194
|
+
* Fetched by id rather than found in the listing above: that one asks for `origin: "NATIVE"`,
|
|
195
|
+
* so it never holds a palette the workspace inherits from its parent. The scope comes from the
|
|
196
|
+
* reference type, the same discriminator the active color palette setting carries.
|
|
197
|
+
*/
|
|
198
|
+
async getColorPaletteByRef(colorPaletteRef) {
|
|
199
|
+
const id = objRefToIdentifier(colorPaletteRef, this.authCall);
|
|
200
|
+
const filter = `id=="${id}"`;
|
|
201
|
+
const isWorkspaceScoped = isIdentifierRef(colorPaletteRef) && colorPaletteRef.type === "workspaceColorPalette";
|
|
202
|
+
const fetchList = isWorkspaceScoped
|
|
203
|
+
? (client) => EntitiesApi_GetAllEntitiesWorkspaceColorPalettes(client.axios, client.basePath, {
|
|
204
|
+
workspaceId: this.workspace,
|
|
205
|
+
filter,
|
|
206
|
+
})
|
|
207
|
+
: (client) => EntitiesApi_GetAllEntitiesColorPalettes(client.axios, client.basePath, { filter });
|
|
208
|
+
// Malformed content is no palette at all, so the caller falls back to whatever it would use
|
|
209
|
+
// without a reference rather than drawing colors that are not colors.
|
|
210
|
+
return this.resolveActiveStyleContent(fetchList, (content) => {
|
|
211
|
+
const colorPalette = unwrapColorPaletteContent(content);
|
|
212
|
+
return isValidColorPalette(colorPalette) ? colorPalette : undefined;
|
|
213
|
+
}, undefined);
|
|
214
|
+
}
|
|
190
215
|
/**
|
|
191
216
|
* Create a new color palette on the workspace level.
|
|
192
217
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-tiger",
|
|
3
|
-
"version": "11.57.0
|
|
3
|
+
"version": "11.57.0",
|
|
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.57.0
|
|
38
|
-
"@gooddata/sdk-backend-
|
|
39
|
-
"@gooddata/sdk-
|
|
40
|
-
"@gooddata/sdk-
|
|
41
|
-
"@gooddata/sdk-model": "11.57.0
|
|
42
|
-
"@gooddata/util": "11.57.0
|
|
37
|
+
"@gooddata/api-client-tiger": "11.57.0",
|
|
38
|
+
"@gooddata/sdk-backend-base": "11.57.0",
|
|
39
|
+
"@gooddata/sdk-backend-spi": "11.57.0",
|
|
40
|
+
"@gooddata/sdk-code-convertors": "11.57.0",
|
|
41
|
+
"@gooddata/sdk-model": "11.57.0",
|
|
42
|
+
"@gooddata/util": "11.57.0"
|
|
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": "4.1.8",
|
|
67
|
-
"@gooddata/catalog-export": "11.57.0
|
|
68
|
-
"@gooddata/eslint-config": "11.57.0
|
|
69
|
-
"@gooddata/
|
|
70
|
-
"@gooddata/
|
|
67
|
+
"@gooddata/catalog-export": "11.57.0",
|
|
68
|
+
"@gooddata/eslint-config": "11.57.0",
|
|
69
|
+
"@gooddata/oxlint-config": "11.57.0",
|
|
70
|
+
"@gooddata/reference-workspace": "11.57.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"_phase:build": "npm run build",
|