@gooddata/sdk-backend-base 11.63.0-alpha.1 → 11.63.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.
- package/esm/decoratedBackend/workspacePublisher.d.ts +6 -6
- package/esm/decoratedBackend/workspacePublisher.d.ts.map +1 -1
- package/esm/decoratedBackend/workspacePublisher.js +10 -10
- package/esm/dummyBackend/InMemoryWorkspacePublisherService.d.ts +10 -10
- package/esm/dummyBackend/InMemoryWorkspacePublisherService.d.ts.map +1 -1
- package/esm/dummyBackend/InMemoryWorkspacePublisherService.js +30 -30
- package/esm/sdk-backend-base.d.ts +16 -16
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IExportResult, type IPublisherDocumentExportPdfOptions, type IWorkspacePublisherService } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type IPublisherDocument, type IPublisherDocumentDefinition, type IPublisherDocumentTemplate, type IPublisherDocumentTemplateDefinition, type
|
|
2
|
+
import { type IPublisherDocument, type IPublisherDocumentDefinition, type IPublisherDocumentTemplate, type IPublisherDocumentTemplateDefinition, type IPublisherPageTemplate, type IPublisherPageTemplateDefinition, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
/**
|
|
4
4
|
* Base class for publisher-service decorators. Delegates every method of the decorated
|
|
5
5
|
* `IWorkspacePublisherService`; subclasses override the methods they customize.
|
|
@@ -9,11 +9,11 @@ import { type IPublisherDocument, type IPublisherDocumentDefinition, type IPubli
|
|
|
9
9
|
export declare abstract class DecoratedWorkspacePublisherService implements IWorkspacePublisherService {
|
|
10
10
|
protected readonly decorated: IWorkspacePublisherService;
|
|
11
11
|
protected constructor(decorated: IWorkspacePublisherService);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
getPageTemplates(): Promise<IPublisherPageTemplate[]>;
|
|
13
|
+
getPageTemplate(ref: ObjRef): Promise<IPublisherPageTemplate>;
|
|
14
|
+
createPageTemplate(page: IPublisherPageTemplateDefinition): Promise<IPublisherPageTemplate>;
|
|
15
|
+
updatePageTemplate(page: IPublisherPageTemplate): Promise<IPublisherPageTemplate>;
|
|
16
|
+
deletePageTemplate(ref: ObjRef): Promise<void>;
|
|
17
17
|
getDocumentTemplates(): Promise<IPublisherDocumentTemplate[]>;
|
|
18
18
|
getDocumentTemplate(ref: ObjRef): Promise<IPublisherDocumentTemplate>;
|
|
19
19
|
createDocumentTemplate(template: IPublisherDocumentTemplateDefinition): Promise<IPublisherDocumentTemplate>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspacePublisher.d.ts","sourceRoot":"","sources":["../../src/decoratedBackend/workspacePublisher.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,
|
|
1
|
+
{"version":3,"file":"workspacePublisher.d.ts","sourceRoot":"","sources":["../../src/decoratedBackend/workspacePublisher.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAClC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,sBAAsB,EAC3B,KAAK,gCAAgC,EACrC,KAAK,MAAM,EACd,MAAM,qBAAqB,CAAC;AAE7B;;;;;GAKG;AACH,8BAAsB,kCAAmC,YAAW,0BAA0B;IACpE,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,0BAA0B;IAA9E,SAAS,aAAgC,SAAS,EAAE,0BAA0B,EAAI;IAE3E,gBAAgB,IAAI,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@ export class DecoratedWorkspacePublisherService {
|
|
|
10
10
|
constructor(decorated) {
|
|
11
11
|
this.decorated = decorated;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
return this.decorated.
|
|
13
|
+
getPageTemplates() {
|
|
14
|
+
return this.decorated.getPageTemplates();
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
return this.decorated.
|
|
16
|
+
getPageTemplate(ref) {
|
|
17
|
+
return this.decorated.getPageTemplate(ref);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
return this.decorated.
|
|
19
|
+
createPageTemplate(page) {
|
|
20
|
+
return this.decorated.createPageTemplate(page);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
return this.decorated.
|
|
22
|
+
updatePageTemplate(page) {
|
|
23
|
+
return this.decorated.updatePageTemplate(page);
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
return this.decorated.
|
|
25
|
+
deletePageTemplate(ref) {
|
|
26
|
+
return this.decorated.deletePageTemplate(ref);
|
|
27
27
|
}
|
|
28
28
|
getDocumentTemplates() {
|
|
29
29
|
return this.decorated.getDocumentTemplates();
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { type IExportResult, type IPublisherDocumentExportPdfOptions, type IWorkspacePublisherService } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type IPublisherDocument, type IPublisherDocumentDefinition, type IPublisherDocumentTemplate, type IPublisherDocumentTemplateDefinition, type
|
|
2
|
+
import { type IPublisherDocument, type IPublisherDocumentDefinition, type IPublisherDocumentTemplate, type IPublisherDocumentTemplateDefinition, type IPublisherPageTemplate, type IPublisherPageTemplateDefinition, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
/**
|
|
4
4
|
* In-memory implementation of the publisher service.
|
|
5
5
|
*
|
|
6
6
|
* @remarks
|
|
7
|
-
* Serves the
|
|
7
|
+
* Serves the default page templates and stores created page templates, document templates and documents in
|
|
8
8
|
* memory for the lifetime of the instance (dummy backend, tests).
|
|
9
9
|
*
|
|
10
10
|
* @alpha
|
|
11
11
|
*/
|
|
12
12
|
export declare class InMemoryWorkspacePublisherService implements IWorkspacePublisherService {
|
|
13
|
-
private readonly
|
|
13
|
+
private readonly pageTemplates;
|
|
14
14
|
private readonly templates;
|
|
15
15
|
private readonly documents;
|
|
16
16
|
private sequence;
|
|
17
17
|
private newRef;
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
private
|
|
18
|
+
private findDefaultPageTemplate;
|
|
19
|
+
getPageTemplates(): Promise<IPublisherPageTemplate[]>;
|
|
20
|
+
getPageTemplate(ref: ObjRef): Promise<IPublisherPageTemplate>;
|
|
21
|
+
createPageTemplate(layout: IPublisherPageTemplateDefinition): Promise<IPublisherPageTemplate>;
|
|
22
|
+
updatePageTemplate(layout: IPublisherPageTemplate): Promise<IPublisherPageTemplate>;
|
|
23
|
+
deletePageTemplate(ref: ObjRef): Promise<void>;
|
|
24
|
+
private assertPageTemplateEditable;
|
|
25
25
|
getDocumentTemplates(): Promise<IPublisherDocumentTemplate[]>;
|
|
26
26
|
getDocumentTemplate(ref: ObjRef): Promise<IPublisherDocumentTemplate>;
|
|
27
27
|
createDocumentTemplate(template: IPublisherDocumentTemplateDefinition): Promise<IPublisherDocumentTemplate>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryWorkspacePublisherService.d.ts","sourceRoot":"","sources":["../../src/dummyBackend/InMemoryWorkspacePublisherService.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAGlC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEH,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,
|
|
1
|
+
{"version":3,"file":"InMemoryWorkspacePublisherService.d.ts","sourceRoot":"","sources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M,sBAAsB,CAAC,QAAQ,EAAE,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAKvG;IAEM,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxD;IAEM,YAAY,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAEnD;IAEM,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAM3D;IAEM,cAAc,CAAC,iBAAiB,EAAE,4BAA4B,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAOlG;IAEM,cAAc,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAKxF;IAEM,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhD;IAEM,mBAAmB,CACtB,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,kCAAkC,GAC9C,OAAO,CAAC,aAAa,CAAC,CAExB;IAED,OAAO,CAAC,KAAK;IAQb,OAAO,CAAC,uBAAuB;CAalC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
import { NotSupported, UnexpectedError, } from "@gooddata/sdk-backend-spi";
|
|
3
|
-
import {
|
|
3
|
+
import { DefaultPublisherPageTemplates, areObjRefsEqual, idRef, isIdentifierRef, objRefToString, } 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.
|
|
@@ -16,13 +16,13 @@ function deepClone(value) {
|
|
|
16
16
|
* In-memory implementation of the publisher service.
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
|
-
* Serves the
|
|
19
|
+
* Serves the default page templates and stores created page templates, document templates and documents in
|
|
20
20
|
* memory for the lifetime of the instance (dummy backend, tests).
|
|
21
21
|
*
|
|
22
22
|
* @alpha
|
|
23
23
|
*/
|
|
24
24
|
export class InMemoryWorkspacePublisherService {
|
|
25
|
-
|
|
25
|
+
pageTemplates = new Map();
|
|
26
26
|
templates = new Map();
|
|
27
27
|
documents = new Map();
|
|
28
28
|
sequence = 0;
|
|
@@ -34,53 +34,53 @@ export class InMemoryWorkspacePublisherService {
|
|
|
34
34
|
} while (store.has(refKey(ref)));
|
|
35
35
|
return ref;
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
return
|
|
37
|
+
findDefaultPageTemplate(ref) {
|
|
38
|
+
return DefaultPublisherPageTemplates.find((layout) => areObjRefsEqual(layout.ref, ref));
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
getPageTemplates() {
|
|
41
41
|
return Promise.resolve([
|
|
42
|
-
...
|
|
43
|
-
...deepClone([...this.
|
|
42
|
+
...DefaultPublisherPageTemplates,
|
|
43
|
+
...deepClone([...this.pageTemplates.values()]),
|
|
44
44
|
]);
|
|
45
45
|
}
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
return Promise.resolve(
|
|
46
|
+
getPageTemplate(ref) {
|
|
47
|
+
const defaultTemplate = this.findDefaultPageTemplate(ref);
|
|
48
|
+
if (defaultTemplate) {
|
|
49
|
+
return Promise.resolve(defaultTemplate);
|
|
50
50
|
}
|
|
51
|
-
const layout = this.
|
|
51
|
+
const layout = this.pageTemplates.get(refKey(ref));
|
|
52
52
|
if (!layout) {
|
|
53
|
-
throw new UnexpectedError(`Page
|
|
53
|
+
throw new UnexpectedError(`Page template "${objRefToString(ref)}" does not exist.`);
|
|
54
54
|
}
|
|
55
55
|
return Promise.resolve(deepClone(layout));
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
if (layout.ref && this.
|
|
59
|
-
throw new UnexpectedError(`
|
|
57
|
+
createPageTemplate(layout) {
|
|
58
|
+
if (layout.ref && this.findDefaultPageTemplate(layout.ref)) {
|
|
59
|
+
throw new UnexpectedError(`Default page template "${objRefToString(layout.ref)}" cannot be replaced.`);
|
|
60
60
|
}
|
|
61
61
|
const created = {
|
|
62
62
|
...deepClone(layout),
|
|
63
|
-
ref: layout.ref ?? this.newRef("reportPageLayout", this.
|
|
63
|
+
ref: layout.ref ?? this.newRef("reportPageLayout", this.pageTemplates),
|
|
64
64
|
};
|
|
65
|
-
this.store(this.
|
|
65
|
+
this.store(this.pageTemplates, created, "Page template");
|
|
66
66
|
return Promise.resolve(deepClone(created));
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
this.
|
|
70
|
-
const updated = { ...deepClone(layout),
|
|
71
|
-
this.
|
|
68
|
+
updatePageTemplate(layout) {
|
|
69
|
+
this.assertPageTemplateEditable(layout.ref);
|
|
70
|
+
const updated = { ...deepClone(layout), isDefault: undefined };
|
|
71
|
+
this.pageTemplates.set(refKey(layout.ref), updated);
|
|
72
72
|
return Promise.resolve(deepClone(updated));
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
74
|
+
deletePageTemplate(ref) {
|
|
75
|
+
this.assertPageTemplateEditable(ref);
|
|
76
|
+
this.pageTemplates.delete(refKey(ref));
|
|
77
77
|
return Promise.resolve();
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
if (this.
|
|
81
|
-
throw new UnexpectedError(`
|
|
79
|
+
assertPageTemplateEditable(ref) {
|
|
80
|
+
if (this.findDefaultPageTemplate(ref)) {
|
|
81
|
+
throw new UnexpectedError(`Default page template "${objRefToString(ref)}" cannot be changed.`);
|
|
82
82
|
}
|
|
83
|
-
this.assertExistsAndUnlocked(this.
|
|
83
|
+
this.assertExistsAndUnlocked(this.pageTemplates, ref, "Page template");
|
|
84
84
|
}
|
|
85
85
|
getDocumentTemplates() {
|
|
86
86
|
return Promise.resolve(deepClone([...this.templates.values()]));
|
|
@@ -147,8 +147,8 @@ import { IPublisherDocumentDefinition } from '@gooddata/sdk-model';
|
|
|
147
147
|
import { IPublisherDocumentExportPdfOptions } from '@gooddata/sdk-backend-spi';
|
|
148
148
|
import { IPublisherDocumentTemplate } from '@gooddata/sdk-model';
|
|
149
149
|
import { IPublisherDocumentTemplateDefinition } from '@gooddata/sdk-model';
|
|
150
|
-
import {
|
|
151
|
-
import {
|
|
150
|
+
import { IPublisherPageTemplate } from '@gooddata/sdk-model';
|
|
151
|
+
import { IPublisherPageTemplateDefinition } from '@gooddata/sdk-model';
|
|
152
152
|
import { IRawExportCustomOverrides } from '@gooddata/sdk-backend-spi';
|
|
153
153
|
import { IRequestCorrelationMetadata } from '@gooddata/sdk-backend-spi';
|
|
154
154
|
import { IResultHeader } from '@gooddata/sdk-model';
|
|
@@ -1490,11 +1490,11 @@ export declare abstract class DecoratedWorkspaceObjectPermissionsService impleme
|
|
|
1490
1490
|
export declare abstract class DecoratedWorkspacePublisherService implements IWorkspacePublisherService {
|
|
1491
1491
|
protected readonly decorated: IWorkspacePublisherService;
|
|
1492
1492
|
protected constructor(decorated: IWorkspacePublisherService);
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1493
|
+
getPageTemplates(): Promise<IPublisherPageTemplate[]>;
|
|
1494
|
+
getPageTemplate(ref: ObjRef): Promise<IPublisherPageTemplate>;
|
|
1495
|
+
createPageTemplate(page: IPublisherPageTemplateDefinition): Promise<IPublisherPageTemplate>;
|
|
1496
|
+
updatePageTemplate(page: IPublisherPageTemplate): Promise<IPublisherPageTemplate>;
|
|
1497
|
+
deletePageTemplate(ref: ObjRef): Promise<void>;
|
|
1498
1498
|
getDocumentTemplates(): Promise<IPublisherDocumentTemplate[]>;
|
|
1499
1499
|
getDocumentTemplate(ref: ObjRef): Promise<IPublisherDocumentTemplate>;
|
|
1500
1500
|
createDocumentTemplate(template: IPublisherDocumentTemplateDefinition): Promise<IPublisherDocumentTemplate>;
|
|
@@ -1992,24 +1992,24 @@ export declare class InMemoryPaging<T> implements IPagedResource<T> {
|
|
|
1992
1992
|
* In-memory implementation of the publisher service.
|
|
1993
1993
|
*
|
|
1994
1994
|
* @remarks
|
|
1995
|
-
* Serves the
|
|
1995
|
+
* Serves the default page templates and stores created page templates, document templates and documents in
|
|
1996
1996
|
* memory for the lifetime of the instance (dummy backend, tests).
|
|
1997
1997
|
*
|
|
1998
1998
|
* @alpha
|
|
1999
1999
|
*/
|
|
2000
2000
|
export declare class InMemoryWorkspacePublisherService implements IWorkspacePublisherService {
|
|
2001
|
-
private readonly
|
|
2001
|
+
private readonly pageTemplates;
|
|
2002
2002
|
private readonly templates;
|
|
2003
2003
|
private readonly documents;
|
|
2004
2004
|
private sequence;
|
|
2005
2005
|
private newRef;
|
|
2006
|
-
private
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
private
|
|
2006
|
+
private findDefaultPageTemplate;
|
|
2007
|
+
getPageTemplates(): Promise<IPublisherPageTemplate[]>;
|
|
2008
|
+
getPageTemplate(ref: ObjRef): Promise<IPublisherPageTemplate>;
|
|
2009
|
+
createPageTemplate(layout: IPublisherPageTemplateDefinition): Promise<IPublisherPageTemplate>;
|
|
2010
|
+
updatePageTemplate(layout: IPublisherPageTemplate): Promise<IPublisherPageTemplate>;
|
|
2011
|
+
deletePageTemplate(ref: ObjRef): Promise<void>;
|
|
2012
|
+
private assertPageTemplateEditable;
|
|
2013
2013
|
getDocumentTemplates(): Promise<IPublisherDocumentTemplate[]>;
|
|
2014
2014
|
getDocumentTemplate(ref: ObjRef): Promise<IPublisherDocumentTemplate>;
|
|
2015
2015
|
createDocumentTemplate(template: IPublisherDocumentTemplateDefinition): Promise<IPublisherDocumentTemplate>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-base",
|
|
3
|
-
"version": "11.63.0-alpha.
|
|
3
|
+
"version": "11.63.0-alpha.2",
|
|
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/
|
|
33
|
-
"@gooddata/sdk-
|
|
34
|
-
"@gooddata/
|
|
32
|
+
"@gooddata/util": "11.63.0-alpha.2",
|
|
33
|
+
"@gooddata/sdk-backend-spi": "11.63.0-alpha.2",
|
|
34
|
+
"@gooddata/sdk-model": "11.63.0-alpha.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@microsoft/api-documenter": "7.30.16",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"oxlint-tsgolint": "7.0.2001",
|
|
55
55
|
"typescript": "7.0.2",
|
|
56
56
|
"vitest": "5.0.4",
|
|
57
|
-
"@gooddata/eslint-config": "11.63.0-alpha.
|
|
58
|
-
"@gooddata/oxlint-config": "11.63.0-alpha.
|
|
59
|
-
"@gooddata/reference-workspace": "11.63.0-alpha.
|
|
57
|
+
"@gooddata/eslint-config": "11.63.0-alpha.2",
|
|
58
|
+
"@gooddata/oxlint-config": "11.63.0-alpha.2",
|
|
59
|
+
"@gooddata/reference-workspace": "11.63.0-alpha.2"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"_phase:build": "npm run build",
|