@gooddata/sdk-backend-mockingbird 11.61.0 → 11.62.0-alpha.1
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/recordedBackend/index.js +24 -24
- package/package.json +8 -8
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { DummyChatConversations, DummySemanticSearchQueryBuilder, InMemoryPaging, } from "@gooddata/sdk-backend-base";
|
|
3
3
|
import { NotSupported, UnexpectedResponseError, } from "@gooddata/sdk-backend-spi";
|
|
4
|
-
import {
|
|
4
|
+
import { BuiltInPublisherPageLayouts, areObjRefsEqual, 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";
|
|
@@ -154,7 +154,7 @@ function recordedWorkspace(workspace, recordings = {}, implConfig) {
|
|
|
154
154
|
async getSettings() {
|
|
155
155
|
return Promise.resolve({
|
|
156
156
|
workspace,
|
|
157
|
-
...
|
|
157
|
+
...implConfig.globalSettings,
|
|
158
158
|
});
|
|
159
159
|
},
|
|
160
160
|
async getSettingsForCurrentUser() {
|
|
@@ -163,7 +163,7 @@ function recordedWorkspace(workspace, recordings = {}, implConfig) {
|
|
|
163
163
|
workspace,
|
|
164
164
|
locale,
|
|
165
165
|
separators,
|
|
166
|
-
...
|
|
166
|
+
...implConfig.globalSettings,
|
|
167
167
|
});
|
|
168
168
|
},
|
|
169
169
|
async setAlertDefault() {
|
|
@@ -456,44 +456,44 @@ function recordedWorkspace(workspace, recordings = {}, implConfig) {
|
|
|
456
456
|
deleteExportTemplate: () => Promise.resolve(),
|
|
457
457
|
};
|
|
458
458
|
},
|
|
459
|
-
|
|
459
|
+
publisher() {
|
|
460
460
|
return {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
const page =
|
|
461
|
+
getPageLayouts: () => Promise.resolve([...BuiltInPublisherPageLayouts]),
|
|
462
|
+
getPageLayout: (ref) => {
|
|
463
|
+
const page = BuiltInPublisherPageLayouts.find((candidate) => areObjRefsEqual(candidate.ref, ref));
|
|
464
464
|
if (!page) {
|
|
465
465
|
throw new UnexpectedResponseError("Report page not found", 404, {});
|
|
466
466
|
}
|
|
467
467
|
return Promise.resolve(page);
|
|
468
468
|
},
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
if (
|
|
469
|
+
createPageLayout: (page) => Promise.resolve({ ...page, ref: idRef("recordedReportPage") }),
|
|
470
|
+
updatePageLayout: (page) => {
|
|
471
|
+
if (BuiltInPublisherPageLayouts.some((candidate) => areObjRefsEqual(candidate.ref, page.ref))) {
|
|
472
472
|
throw new NotSupported("Built-in report page layouts cannot be updated.");
|
|
473
473
|
}
|
|
474
474
|
return Promise.resolve(page);
|
|
475
475
|
},
|
|
476
|
-
|
|
477
|
-
if (
|
|
476
|
+
deletePageLayout: (ref) => {
|
|
477
|
+
if (BuiltInPublisherPageLayouts.some((candidate) => areObjRefsEqual(candidate.ref, ref))) {
|
|
478
478
|
throw new NotSupported("Built-in report page layouts cannot be deleted.");
|
|
479
479
|
}
|
|
480
480
|
return Promise.resolve();
|
|
481
481
|
},
|
|
482
|
-
|
|
483
|
-
|
|
482
|
+
getDocumentTemplates: () => Promise.resolve([]),
|
|
483
|
+
getDocumentTemplate: () => {
|
|
484
484
|
throw new UnexpectedResponseError("Report template not found", 404, {});
|
|
485
485
|
},
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
486
|
+
createDocumentTemplate: (template) => Promise.resolve({ ...template, ref: idRef("recordedReportTemplate") }),
|
|
487
|
+
updateDocumentTemplate: (template) => Promise.resolve(template),
|
|
488
|
+
deleteDocumentTemplate: () => Promise.resolve(),
|
|
489
|
+
getDocuments: () => Promise.resolve([]),
|
|
490
|
+
getDocument: () => {
|
|
491
491
|
throw new UnexpectedResponseError("Report not found", 404, {});
|
|
492
492
|
},
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
493
|
+
createDocument: (publisherDocument) => Promise.resolve({ ...publisherDocument, ref: idRef("recordedReport") }),
|
|
494
|
+
updateDocument: (publisherDocument) => Promise.resolve(publisherDocument),
|
|
495
|
+
deleteDocument: () => Promise.resolve(),
|
|
496
|
+
exportDocumentToPdf: () => Promise.resolve({
|
|
497
497
|
uri: "/example/export.pdf",
|
|
498
498
|
objectUrl: "blob:/01345454545454",
|
|
499
499
|
fileName: "export.pdf",
|
|
@@ -849,7 +849,7 @@ function recordedUserService(implConfig) {
|
|
|
849
849
|
userId: USER_ID,
|
|
850
850
|
locale,
|
|
851
851
|
separators,
|
|
852
|
-
...
|
|
852
|
+
...implConfig.globalSettings,
|
|
853
853
|
}),
|
|
854
854
|
setLocale: () => Promise.resolve(),
|
|
855
855
|
setMetadataLocale: () => Promise.resolve(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-mockingbird",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.62.0-alpha.1",
|
|
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/
|
|
29
|
-
"@gooddata/sdk-backend-
|
|
30
|
-
"@gooddata/sdk-
|
|
31
|
-
"@gooddata/
|
|
28
|
+
"@gooddata/util": "11.62.0-alpha.1",
|
|
29
|
+
"@gooddata/sdk-backend-base": "11.62.0-alpha.1",
|
|
30
|
+
"@gooddata/sdk-backend-spi": "11.62.0-alpha.1",
|
|
31
|
+
"@gooddata/sdk-model": "11.62.0-alpha.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-documenter": "7.30.16",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"oxlint-tsgolint": "7.0.2001",
|
|
51
51
|
"typescript": "7.0.2",
|
|
52
52
|
"vitest": "4.1.11",
|
|
53
|
-
"@gooddata/
|
|
54
|
-
"@gooddata/
|
|
55
|
-
"@gooddata/reference-workspace": "11.
|
|
53
|
+
"@gooddata/oxlint-config": "11.62.0-alpha.1",
|
|
54
|
+
"@gooddata/eslint-config": "11.62.0-alpha.1",
|
|
55
|
+
"@gooddata/reference-workspace": "11.62.0-alpha.1"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"_phase:build": "npm run build",
|