@gooddata/sdk-backend-mockingbird 11.48.0-alpha.0 → 11.48.0-alpha.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recordedBackend/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,kBAAkB,EAKvB,KAAK,oBAAoB,EAqD5B,MAAM,2BAA2B,CAAC;AA+BnC,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAkB7E;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,oBAehD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,cAAc,EACrB,MAAM,GAAE,qBAAqC,EAC7C,YAAY,uBAAqC,GAClD,kBAAkB,CAsDpB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recordedBackend/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,kBAAkB,EAKvB,KAAK,oBAAoB,EAqD5B,MAAM,2BAA2B,CAAC;AAgCnC,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAkB7E;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,oBAehD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,cAAc,EACrB,MAAM,GAAE,qBAAqC,EAC7C,YAAY,uBAAqC,GAClD,kBAAkB,CAsDpB"}
@@ -1,7 +1,7 @@
1
1
  // (C) 2019-2026 GoodData Corporation
2
2
  import { DummyChatConversations, DummyGenAIChatThread, DummySemanticSearchQueryBuilder, InMemoryPaging, } from "@gooddata/sdk-backend-base";
3
3
  import { NotSupported, } from "@gooddata/sdk-backend-spi";
4
- import { idRef, } from "@gooddata/sdk-model";
4
+ import { idRef, isIdentifierRef, } from "@gooddata/sdk-model";
5
5
  import { createMockGeoService } from "../geoService.js";
6
6
  import { RecordedAttributeHierarchiesService } from "./attributeHierarchies.js";
7
7
  import { RecordedAttributes } from "./attributes.js";
@@ -271,6 +271,41 @@ function recordedWorkspace(workspace, recordings = {}, implConfig) {
271
271
  };
272
272
  },
273
273
  styling() {
274
+ // Preserve the input identity so create→update round-trips keep a stable id/ref.
275
+ const resolveTheme = (theme) => {
276
+ const id = theme.ref && isIdentifierRef(theme.ref)
277
+ ? theme.ref.identifier
278
+ : (theme.id ?? "workspace_theme_id");
279
+ return Promise.resolve({
280
+ type: "theme",
281
+ id,
282
+ title: theme.title ?? "Workspace Theme 1",
283
+ description: "",
284
+ production: true,
285
+ deprecated: false,
286
+ unlisted: false,
287
+ ref: idRef(id, "workspaceTheme"),
288
+ uri: `${id}_uri`,
289
+ theme: theme.theme,
290
+ });
291
+ };
292
+ const resolveColorPalette = (colorPalette) => {
293
+ const id = colorPalette.ref && isIdentifierRef(colorPalette.ref)
294
+ ? colorPalette.ref.identifier
295
+ : (colorPalette.id ?? "workspace_color_palette_id");
296
+ return Promise.resolve({
297
+ type: "colorPalette",
298
+ id,
299
+ title: colorPalette.title ?? "Workspace Color Palette 1",
300
+ description: "",
301
+ production: true,
302
+ deprecated: false,
303
+ unlisted: false,
304
+ ref: idRef(id, "workspaceColorPalette"),
305
+ uri: `${id}_uri`,
306
+ colorPalette: colorPalette.colorPalette,
307
+ });
308
+ };
274
309
  return {
275
310
  async getColorPalette() {
276
311
  return Promise.resolve(implConfig.globalPalette ?? []);
@@ -296,6 +331,22 @@ function recordedWorkspace(workspace, recordings = {}, implConfig) {
296
331
  clearActiveTheme() {
297
332
  return Promise.resolve(undefined);
298
333
  },
334
+ getThemes() {
335
+ return Promise.resolve([]);
336
+ },
337
+ createTheme: resolveTheme,
338
+ updateTheme: resolveTheme,
339
+ deleteTheme() {
340
+ return Promise.resolve(undefined);
341
+ },
342
+ getColorPalettes() {
343
+ return Promise.resolve([]);
344
+ },
345
+ createColorPalette: resolveColorPalette,
346
+ updateColorPalette: resolveColorPalette,
347
+ deleteColorPalette() {
348
+ return Promise.resolve(undefined);
349
+ },
299
350
  };
300
351
  },
301
352
  dateFilterConfigs() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-mockingbird",
3
- "version": "11.48.0-alpha.0",
3
+ "version": "11.48.0-alpha.2",
4
4
  "description": "Mock GoodData Backend SPI implementation",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -25,10 +25,10 @@
25
25
  "ts-invariant": "0.10.3",
26
26
  "tslib": "2.8.1",
27
27
  "uuid": "11.1.1",
28
- "@gooddata/sdk-backend-spi": "11.48.0-alpha.0",
29
- "@gooddata/util": "11.48.0-alpha.0",
30
- "@gooddata/sdk-backend-base": "11.48.0-alpha.0",
31
- "@gooddata/sdk-model": "11.48.0-alpha.0"
28
+ "@gooddata/sdk-backend-base": "11.48.0-alpha.2",
29
+ "@gooddata/sdk-backend-spi": "11.48.0-alpha.2",
30
+ "@gooddata/sdk-model": "11.48.0-alpha.2",
31
+ "@gooddata/util": "11.48.0-alpha.2"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@microsoft/api-documenter": "^7.17.0",
@@ -52,9 +52,9 @@
52
52
  "oxlint-tsgolint": "0.15.0",
53
53
  "typescript": "5.9.3",
54
54
  "vitest": "4.1.8",
55
- "@gooddata/eslint-config": "11.48.0-alpha.0",
56
- "@gooddata/oxlint-config": "11.48.0-alpha.0",
57
- "@gooddata/reference-workspace": "11.48.0-alpha.0"
55
+ "@gooddata/eslint-config": "11.48.0-alpha.2",
56
+ "@gooddata/oxlint-config": "11.48.0-alpha.2",
57
+ "@gooddata/reference-workspace": "11.48.0-alpha.2"
58
58
  },
59
59
  "scripts": {
60
60
  "_phase:build": "npm run build",