@gooddata/sdk-backend-base 11.55.0-alpha.3 → 11.55.0-alpha.4

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,5 +1,5 @@
1
1
  import { type IWorkspaceReportsService } from "@gooddata/sdk-backend-spi";
2
- import { type IReport, type IReportDefinition, type IReportPageLayout, type IReportPageLayoutDefinition, type IReportTemplate, type IReportTemplateDefinition, type ObjRef } from "@gooddata/sdk-model";
2
+ import { type IReport, type IReportDefinition, type IReportPageLayout, type IReportPageLayoutDefinition, type IReportTemplate, type IReportTemplateDefinition, type IReportsBrandKit, type ObjRef } from "@gooddata/sdk-model";
3
3
  /**
4
4
  * Base class for report-service decorators. Delegates every method of the decorated
5
5
  * `IWorkspaceReportsService`; subclasses override the methods they customize.
@@ -24,5 +24,8 @@ export declare abstract class DecoratedWorkspaceReportsService implements IWorks
24
24
  createReport(report: IReportDefinition): Promise<IReport>;
25
25
  updateReport(report: IReport): Promise<IReport>;
26
26
  deleteReport(ref: ObjRef): Promise<void>;
27
+ getBrandKit(): Promise<IReportsBrandKit | undefined>;
28
+ setBrandKit(brandKit: IReportsBrandKit): Promise<void>;
29
+ deleteBrandKit(): Promise<void>;
27
30
  }
28
31
  //# sourceMappingURL=workspaceReports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceReports.d.ts","sourceRoot":"","sources":["../../src/decoratedBackend/workspaceReports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;GAKG;AACH,8BAAsB,gCAAiC,YAAW,wBAAwB;IAChE,SAAS,CAAC,QAAQ,CAAC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AAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAE9C;IAEM,YAAY,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAE/D;IAEM,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAErD;IAEM,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9C;IAEM,WAAW,IAAI,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAE1D;IAEM,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5D;IAEM,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAErC;CACJ"}
@@ -55,4 +55,13 @@ export class DecoratedWorkspaceReportsService {
55
55
  deleteReport(ref) {
56
56
  return this.decorated.deleteReport(ref);
57
57
  }
58
+ getBrandKit() {
59
+ return this.decorated.getBrandKit();
60
+ }
61
+ setBrandKit(brandKit) {
62
+ return this.decorated.setBrandKit(brandKit);
63
+ }
64
+ deleteBrandKit() {
65
+ return this.decorated.deleteBrandKit();
66
+ }
58
67
  }
@@ -1,35 +1,20 @@
1
1
  import { type IWorkspaceReportsService } from "@gooddata/sdk-backend-spi";
2
- import { type IReport, type IReportDefinition, type IReportPageLayout, type IReportPageLayoutDefinition, type IReportTemplate, type IReportTemplateDefinition, type ObjRef } from "@gooddata/sdk-model";
3
- /**
4
- * Storage hook for {@link InMemoryWorkspaceReportsService}: where the serialized service
5
- * state is loaded from on construction and saved to after every mutation.
6
- *
7
- * @alpha
8
- */
9
- export interface IWorkspaceReportsPersistence {
10
- load(): string | null;
11
- save(value: string): void;
12
- }
2
+ import { type IReport, type IReportDefinition, type IReportPageLayout, type IReportPageLayoutDefinition, type IReportTemplate, type IReportTemplateDefinition, type IReportsBrandKit, type ObjRef } from "@gooddata/sdk-model";
13
3
  /**
14
4
  * In-memory implementation of the reports service.
15
5
  *
16
6
  * @remarks
17
- * Serves the built-in report page layouts and stores created layouts, templates and reports in memory.
18
- * Without a persistence hook the state lives only as long as the instance (dummy backend, tests);
19
- * with one (e.g. localStorage) the state is rehydrated on construction and saved after every mutation.
7
+ * Serves the built-in report page layouts and stores created layouts, templates and reports in
8
+ * memory for the lifetime of the instance (dummy backend, tests).
20
9
  *
21
10
  * @alpha
22
11
  */
23
12
  export declare class InMemoryWorkspaceReportsService implements IWorkspaceReportsService {
24
- private readonly persistence?;
25
13
  private readonly pageLayouts;
26
14
  private readonly templates;
27
15
  private readonly reports;
16
+ private brandKit;
28
17
  private sequence;
29
- private persistenceDisabled;
30
- constructor(persistence?: IWorkspaceReportsPersistence | undefined);
31
- private hydrate;
32
- private persist;
33
18
  private newRef;
34
19
  private findBuiltInPageLayout;
35
20
  getReportPageLayouts(): Promise<IReportPageLayout[]>;
@@ -48,6 +33,9 @@ export declare class InMemoryWorkspaceReportsService implements IWorkspaceReport
48
33
  createReport(report: IReportDefinition): Promise<IReport>;
49
34
  updateReport(report: IReport): Promise<IReport>;
50
35
  deleteReport(ref: ObjRef): Promise<void>;
36
+ getBrandKit(): Promise<IReportsBrandKit | undefined>;
37
+ setBrandKit(brandKit: IReportsBrandKit): Promise<void>;
38
+ deleteBrandKit(): Promise<void>;
51
39
  private store;
52
40
  private assertExistsAndUnlocked;
53
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InMemoryWorkspaceReportsService.d.ts","sourceRoot":"","sources":["../../src/dummyBackend/InMemoryWorkspaceReportsService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,2BAA2B,CAAC;AAC3F,OAAO,EAEH,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,2BAA2B,EAChC,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,MAAM,EAMd,MAAM,qBAAqB,CAAC;AAkC7B;;;;;GAKG;AACH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AC,IAAI,CAAC,CAGrC;IAED,OAAO,CAAC,KAAK;IAQb,OAAO,CAAC,uBAAuB;CAalC"}
@@ -1,6 +1,6 @@
1
1
  // (C) 2026 GoodData Corporation
2
2
  import { UnexpectedError } from "@gooddata/sdk-backend-spi";
3
- import { BuiltInReportPageLayouts, areObjRefsEqual, idRef, isIdentifierRef, isObjRef, objRefToString, } from "@gooddata/sdk-model";
3
+ import { BuiltInReportPageLayouts, areObjRefsEqual, idRef, isIdentifierRef, objRefToString, sanitizeReportsBrandKit, } from "@gooddata/sdk-model";
4
4
  // Key ignores the identifier ref's optional object type (typed and untyped identifier
5
5
  // refs are equivalent under areObjRefsEqual) but keeps the ref kind, so an identifier
6
6
  // and a URI with the same string stay distinct.
@@ -12,92 +12,21 @@ function refKey(ref) {
12
12
  function deepClone(value) {
13
13
  return JSON.parse(JSON.stringify(value));
14
14
  }
15
- function decode(value) {
16
- const decoded = new Map();
17
- if (!Array.isArray(value)) {
18
- return decoded;
19
- }
20
- value.forEach((entry) => {
21
- if (!isObjRef(entry?.ref)) {
22
- throw new Error("Persisted report entry has no object reference.");
23
- }
24
- decoded.set(refKey(entry.ref), entry);
25
- });
26
- return decoded;
27
- }
28
- function replace(target, source) {
29
- target.clear();
30
- source.forEach((value, key) => target.set(key, value));
31
- }
32
15
  /**
33
16
  * In-memory implementation of the reports service.
34
17
  *
35
18
  * @remarks
36
- * Serves the built-in report page layouts and stores created layouts, templates and reports in memory.
37
- * Without a persistence hook the state lives only as long as the instance (dummy backend, tests);
38
- * with one (e.g. localStorage) the state is rehydrated on construction and saved after every mutation.
19
+ * Serves the built-in report page layouts and stores created layouts, templates and reports in
20
+ * memory for the lifetime of the instance (dummy backend, tests).
39
21
  *
40
22
  * @alpha
41
23
  */
42
24
  export class InMemoryWorkspaceReportsService {
43
- persistence;
44
25
  pageLayouts = new Map();
45
26
  templates = new Map();
46
27
  reports = new Map();
28
+ brandKit;
47
29
  sequence = 0;
48
- // Set when the storage rejected a write. Read-through would then restore the older
49
- // persisted snapshot and silently discard the mutation, so the in-memory state
50
- // becomes authoritative from that point on.
51
- persistenceDisabled = false;
52
- constructor(persistence) {
53
- this.persistence = persistence;
54
- this.hydrate();
55
- }
56
- // Persisted storage is read through on every operation, so no instance can act on a
57
- // stale snapshot and overwrite state written by another instance, tab or process.
58
- // Storage failures (sandboxed embeds, exhausted quota, corrupted value) degrade to
59
- // the in-memory state rather than propagating to the caller.
60
- hydrate() {
61
- if (!this.persistence || this.persistenceDisabled) {
62
- return;
63
- }
64
- try {
65
- const serialized = this.persistence.load();
66
- if (!serialized) {
67
- return;
68
- }
69
- const state = JSON.parse(serialized);
70
- // Decode into fresh maps first: a malformed entry must not leave the service
71
- // with half-cleared state, so the swap happens only once everything decoded.
72
- const pageLayouts = decode(state?.pageLayouts);
73
- const templates = decode(state?.templates);
74
- const reports = decode(state?.reports);
75
- replace(this.pageLayouts, pageLayouts);
76
- replace(this.templates, templates);
77
- replace(this.reports, reports);
78
- this.sequence = Math.max(this.sequence, typeof state?.sequence === "number" ? state.sequence : 0);
79
- }
80
- catch {
81
- // unreadable, malformed or schema-incompatible state — keep the in-memory state
82
- }
83
- }
84
- persist() {
85
- if (!this.persistence || this.persistenceDisabled) {
86
- return;
87
- }
88
- const state = {
89
- pageLayouts: [...this.pageLayouts.values()],
90
- templates: [...this.templates.values()],
91
- reports: [...this.reports.values()],
92
- sequence: this.sequence,
93
- };
94
- try {
95
- this.persistence.save(JSON.stringify(state));
96
- }
97
- catch {
98
- this.persistenceDisabled = true;
99
- }
100
- }
101
30
  newRef(type, store) {
102
31
  let ref;
103
32
  do {
@@ -110,11 +39,9 @@ export class InMemoryWorkspaceReportsService {
110
39
  return BuiltInReportPageLayouts.find((layout) => areObjRefsEqual(layout.ref, ref));
111
40
  }
112
41
  getReportPageLayouts() {
113
- this.hydrate();
114
42
  return Promise.resolve([...BuiltInReportPageLayouts, ...deepClone([...this.pageLayouts.values()])]);
115
43
  }
116
44
  getReportPageLayout(ref) {
117
- this.hydrate();
118
45
  const builtIn = this.findBuiltInPageLayout(ref);
119
46
  if (builtIn) {
120
47
  return Promise.resolve(builtIn);
@@ -126,7 +53,6 @@ export class InMemoryWorkspaceReportsService {
126
53
  return Promise.resolve(deepClone(layout));
127
54
  }
128
55
  createReportPageLayout(layout) {
129
- this.hydrate();
130
56
  if (layout.ref && this.findBuiltInPageLayout(layout.ref)) {
131
57
  throw new UnexpectedError(`Report page layout "${objRefToString(layout.ref)}" is built-in and cannot be replaced.`);
132
58
  }
@@ -135,22 +61,17 @@ export class InMemoryWorkspaceReportsService {
135
61
  ref: layout.ref ?? this.newRef("reportPageLayout", this.pageLayouts),
136
62
  };
137
63
  this.store(this.pageLayouts, created, "Report page layout");
138
- this.persist();
139
64
  return Promise.resolve(deepClone(created));
140
65
  }
141
66
  updateReportPageLayout(layout) {
142
- this.hydrate();
143
67
  this.assertPageLayoutEditable(layout.ref);
144
68
  const updated = { ...deepClone(layout), isBuiltIn: undefined };
145
69
  this.pageLayouts.set(refKey(layout.ref), updated);
146
- this.persist();
147
70
  return Promise.resolve(deepClone(updated));
148
71
  }
149
72
  deleteReportPageLayout(ref) {
150
- this.hydrate();
151
73
  this.assertPageLayoutEditable(ref);
152
74
  this.pageLayouts.delete(refKey(ref));
153
- this.persist();
154
75
  return Promise.resolve();
155
76
  }
156
77
  assertPageLayoutEditable(ref) {
@@ -160,11 +81,9 @@ export class InMemoryWorkspaceReportsService {
160
81
  this.assertExistsAndUnlocked(this.pageLayouts, ref, "Report page layout");
161
82
  }
162
83
  getReportTemplates() {
163
- this.hydrate();
164
84
  return Promise.resolve(deepClone([...this.templates.values()]));
165
85
  }
166
86
  getReportTemplate(ref) {
167
- this.hydrate();
168
87
  const template = this.templates.get(refKey(ref));
169
88
  if (!template) {
170
89
  throw new UnexpectedError(`Report template "${objRefToString(ref)}" does not exist.`);
@@ -172,36 +91,28 @@ export class InMemoryWorkspaceReportsService {
172
91
  return Promise.resolve(deepClone(template));
173
92
  }
174
93
  createReportTemplate(template) {
175
- this.hydrate();
176
94
  const created = {
177
95
  ...deepClone(template),
178
96
  ref: template.ref ?? this.newRef("reportTemplate", this.templates),
179
97
  };
180
98
  this.store(this.templates, created, "Report template");
181
- this.persist();
182
99
  return Promise.resolve(deepClone(created));
183
100
  }
184
101
  updateReportTemplate(template) {
185
- this.hydrate();
186
102
  this.assertExistsAndUnlocked(this.templates, template.ref, "Report template");
187
103
  const updated = deepClone(template);
188
104
  this.templates.set(refKey(template.ref), updated);
189
- this.persist();
190
105
  return Promise.resolve(deepClone(updated));
191
106
  }
192
107
  deleteReportTemplate(ref) {
193
- this.hydrate();
194
108
  this.assertExistsAndUnlocked(this.templates, ref, "Report template");
195
109
  this.templates.delete(refKey(ref));
196
- this.persist();
197
110
  return Promise.resolve();
198
111
  }
199
112
  getReports() {
200
- this.hydrate();
201
113
  return Promise.resolve(deepClone([...this.reports.values()]));
202
114
  }
203
115
  getReport(ref) {
204
- this.hydrate();
205
116
  const report = this.reports.get(refKey(ref));
206
117
  if (!report) {
207
118
  throw new UnexpectedError(`Report "${objRefToString(ref)}" does not exist.`);
@@ -209,28 +120,37 @@ export class InMemoryWorkspaceReportsService {
209
120
  return Promise.resolve(deepClone(report));
210
121
  }
211
122
  createReport(report) {
212
- this.hydrate();
213
123
  const created = {
214
124
  ...deepClone(report),
215
125
  ref: report.ref ?? this.newRef("report", this.reports),
216
126
  };
217
127
  this.store(this.reports, created, "Report");
218
- this.persist();
219
128
  return Promise.resolve(deepClone(created));
220
129
  }
221
130
  updateReport(report) {
222
- this.hydrate();
223
131
  this.assertExistsAndUnlocked(this.reports, report.ref, "Report");
224
132
  const updated = deepClone(report);
225
133
  this.reports.set(refKey(report.ref), updated);
226
- this.persist();
227
134
  return Promise.resolve(deepClone(updated));
228
135
  }
229
136
  deleteReport(ref) {
230
- this.hydrate();
231
137
  this.assertExistsAndUnlocked(this.reports, ref, "Report");
232
138
  this.reports.delete(refKey(ref));
233
- this.persist();
139
+ return Promise.resolve();
140
+ }
141
+ getBrandKit() {
142
+ return Promise.resolve(this.brandKit === undefined ? undefined : deepClone(this.brandKit));
143
+ }
144
+ setBrandKit(brandKit) {
145
+ const sanitized = sanitizeReportsBrandKit(brandKit);
146
+ if (sanitized === undefined) {
147
+ throw new UnexpectedError("The provided value is not a valid brand kit.");
148
+ }
149
+ this.brandKit = sanitized;
150
+ return Promise.resolve();
151
+ }
152
+ deleteBrandKit() {
153
+ this.brandKit = undefined;
234
154
  return Promise.resolve();
235
155
  }
236
156
  store(store, object, what) {
@@ -1748,6 +1748,9 @@ class DummyMeasuresQuery {
1748
1748
  withInclude() {
1749
1749
  return this;
1750
1750
  }
1751
+ withMetaInclude() {
1752
+ return this;
1753
+ }
1751
1754
  withMethod() {
1752
1755
  return this;
1753
1756
  }
package/esm/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export { DecoratedSecuritySettingsService } from "./decoratedBackend/securitySet
21
21
  export { DecoratedOrganizationExportTemplatesService } from "./decoratedBackend/organizationExportTemplates.js";
22
22
  export { DecoratedWorkspaceExportTemplatesService } from "./decoratedBackend/workspaceExportTemplates.js";
23
23
  export { DecoratedWorkspaceReportsService } from "./decoratedBackend/workspaceReports.js";
24
- export { type IWorkspaceReportsPersistence, InMemoryWorkspaceReportsService, } from "./dummyBackend/InMemoryWorkspaceReportsService.js";
24
+ export { InMemoryWorkspaceReportsService } from "./dummyBackend/InMemoryWorkspaceReportsService.js";
25
25
  export { DecoratedWorkspaceSettingsService } from "./decoratedBackend/workspaceSettings.js";
26
26
  export { type AnalyticalBackendCallbacks, withEventing } from "./eventingBackend/index.js";
27
27
  export { type CachingConfiguration, type CacheControl, withCaching, RecommendedCachingConfiguration, } from "./cachingBackend/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,OAAO,EACH,KAAK,kBAAkB,EACvB,YAAY,EACZ,qBAAqB,EACrB,aAAa,GACh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eAAe,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAEpG,OAAO,EACH,8BAA8B,EAC9B,0BAA0B,GAC7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACH,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACH,yCAAyC,EACzC,qCAAqC,GACxC,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,KAAK,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AACxG,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAC1G,OAAO,EACH,4BAA4B,EAC5B,wBAAwB,GAC3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACH,yBAAyB,EACzB,6BAA6B,GAChC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACH,0BAA0B,EAC1B,8BAA8B,GACjC,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC"}
package/esm/index.js CHANGED
@@ -22,7 +22,7 @@ export { DecoratedSecuritySettingsService } from "./decoratedBackend/securitySet
22
22
  export { DecoratedOrganizationExportTemplatesService } from "./decoratedBackend/organizationExportTemplates.js";
23
23
  export { DecoratedWorkspaceExportTemplatesService } from "./decoratedBackend/workspaceExportTemplates.js";
24
24
  export { DecoratedWorkspaceReportsService } from "./decoratedBackend/workspaceReports.js";
25
- export { InMemoryWorkspaceReportsService, } from "./dummyBackend/InMemoryWorkspaceReportsService.js";
25
+ export { InMemoryWorkspaceReportsService } from "./dummyBackend/InMemoryWorkspaceReportsService.js";
26
26
  export { DecoratedWorkspaceSettingsService } from "./decoratedBackend/workspaceSettings.js";
27
27
  export { withEventing } from "./eventingBackend/index.js";
28
28
  export { withCaching, RecommendedCachingConfiguration, } from "./cachingBackend/index.js";
@@ -148,6 +148,7 @@ import { IReport } from '@gooddata/sdk-model';
148
148
  import { IReportDefinition } from '@gooddata/sdk-model';
149
149
  import { IReportPageLayout } from '@gooddata/sdk-model';
150
150
  import { IReportPageLayoutDefinition } from '@gooddata/sdk-model';
151
+ import { IReportsBrandKit } from '@gooddata/sdk-model';
151
152
  import { IReportTemplate } from '@gooddata/sdk-model';
152
153
  import { IReportTemplateDefinition } from '@gooddata/sdk-model';
153
154
  import { IRequestCorrelationMetadata } from '@gooddata/sdk-backend-spi';
@@ -1464,6 +1465,9 @@ export declare abstract class DecoratedWorkspaceReportsService implements IWorks
1464
1465
  createReport(report: IReportDefinition): Promise<IReport>;
1465
1466
  updateReport(report: IReport): Promise<IReport>;
1466
1467
  deleteReport(ref: ObjRef): Promise<void>;
1468
+ getBrandKit(): Promise<IReportsBrandKit | undefined>;
1469
+ setBrandKit(brandKit: IReportsBrandKit): Promise<void>;
1470
+ deleteBrandKit(): Promise<void>;
1467
1471
  }
1468
1472
 
1469
1473
  /**
@@ -1963,22 +1967,17 @@ export declare class InMemoryPaging<T> implements IPagedResource<T> {
1963
1967
  * In-memory implementation of the reports service.
1964
1968
  *
1965
1969
  * @remarks
1966
- * Serves the built-in report page layouts and stores created layouts, templates and reports in memory.
1967
- * Without a persistence hook the state lives only as long as the instance (dummy backend, tests);
1968
- * with one (e.g. localStorage) the state is rehydrated on construction and saved after every mutation.
1970
+ * Serves the built-in report page layouts and stores created layouts, templates and reports in
1971
+ * memory for the lifetime of the instance (dummy backend, tests).
1969
1972
  *
1970
1973
  * @alpha
1971
1974
  */
1972
1975
  export declare class InMemoryWorkspaceReportsService implements IWorkspaceReportsService {
1973
- private readonly persistence?;
1974
1976
  private readonly pageLayouts;
1975
1977
  private readonly templates;
1976
1978
  private readonly reports;
1979
+ private brandKit;
1977
1980
  private sequence;
1978
- private persistenceDisabled;
1979
- constructor(persistence?: IWorkspaceReportsPersistence | undefined);
1980
- private hydrate;
1981
- private persist;
1982
1981
  private newRef;
1983
1982
  private findBuiltInPageLayout;
1984
1983
  getReportPageLayouts(): Promise<IReportPageLayout[]>;
@@ -1997,6 +1996,9 @@ export declare class InMemoryWorkspaceReportsService implements IWorkspaceReport
1997
1996
  createReport(report: IReportDefinition): Promise<IReport>;
1998
1997
  updateReport(report: IReport): Promise<IReport>;
1999
1998
  deleteReport(ref: ObjRef): Promise<void>;
1999
+ getBrandKit(): Promise<IReportsBrandKit | undefined>;
2000
+ setBrandKit(brandKit: IReportsBrandKit): Promise<void>;
2001
+ deleteBrandKit(): Promise<void>;
2000
2002
  private store;
2001
2003
  private assertExistsAndUnlocked;
2002
2004
  }
@@ -2064,17 +2066,6 @@ export declare interface IWidgetBaseBuilder<T extends IWidget> extends IBuilder<
2064
2066
  uri(valueOrUpdateCallback: ValueOrUpdateCallback<string>): this;
2065
2067
  }
2066
2068
 
2067
- /**
2068
- * Storage hook for {@link InMemoryWorkspaceReportsService}: where the serialized service
2069
- * state is loaded from on construction and saved to after every mutation.
2070
- *
2071
- * @alpha
2072
- */
2073
- export declare interface IWorkspaceReportsPersistence {
2074
- load(): string | null;
2075
- save(value: string): void;
2076
- }
2077
-
2078
2069
  /**
2079
2070
  * Specifies workspace settings and current user settings to be adjusted by the decorator.
2080
2071
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-base",
3
- "version": "11.55.0-alpha.3",
3
+ "version": "11.55.0-alpha.4",
4
4
  "description": "GoodData.UI SDK - Base for backend implementations",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -29,9 +29,9 @@
29
29
  "ts-invariant": "0.10.3",
30
30
  "tslib": "2.8.1",
31
31
  "uuid": "11.1.1",
32
- "@gooddata/util": "11.55.0-alpha.3",
33
- "@gooddata/sdk-backend-spi": "11.55.0-alpha.3",
34
- "@gooddata/sdk-model": "11.55.0-alpha.3"
32
+ "@gooddata/sdk-backend-spi": "11.55.0-alpha.4",
33
+ "@gooddata/util": "11.55.0-alpha.4",
34
+ "@gooddata/sdk-model": "11.55.0-alpha.4"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@microsoft/api-documenter": "7.30.10",
@@ -49,14 +49,14 @@
49
49
  "eslint-plugin-no-barrel-files": "1.2.2",
50
50
  "eslint-plugin-sonarjs": "3.0.6",
51
51
  "npm-run-all": "4.1.5",
52
- "oxfmt": "0.52.0",
52
+ "oxfmt": "0.58.0",
53
53
  "oxlint": "1.57.0",
54
54
  "oxlint-tsgolint": "0.15.0",
55
55
  "typescript": "5.9.3",
56
56
  "vitest": "4.1.8",
57
- "@gooddata/oxlint-config": "11.55.0-alpha.3",
58
- "@gooddata/eslint-config": "11.55.0-alpha.3",
59
- "@gooddata/reference-workspace": "11.55.0-alpha.3"
57
+ "@gooddata/oxlint-config": "11.55.0-alpha.4",
58
+ "@gooddata/eslint-config": "11.55.0-alpha.4",
59
+ "@gooddata/reference-workspace": "11.55.0-alpha.4"
60
60
  },
61
61
  "scripts": {
62
62
  "_phase:build": "npm run build",