@gooddata/sdk-backend-mockingbird 11.62.0-alpha.0 → 11.62.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":"AAOA,OAAO,EACH,KAAK,kBAAkB,EAKvB,KAAK,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/recordedBackend/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,kBAAkB,EAKvB,KAAK,oBAAoB,EAwD5B,MAAM,2BAA2B,CAAC;AAkCnC,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, 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,50 +456,53 @@ 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",
|
|
500
500
|
}),
|
|
501
501
|
};
|
|
502
502
|
},
|
|
503
|
+
localization() {
|
|
504
|
+
return recordedLocalizationService();
|
|
505
|
+
},
|
|
503
506
|
};
|
|
504
507
|
}
|
|
505
508
|
function recordedEntitlements() {
|
|
@@ -633,6 +636,8 @@ function recordedOrganization(organizationId, implConfig) {
|
|
|
633
636
|
setAiRateLimit: () => Promise.resolve(),
|
|
634
637
|
deleteAiRateLimit: () => Promise.resolve(),
|
|
635
638
|
getAiRateLimit: () => Promise.resolve(undefined),
|
|
639
|
+
getMetadataLocale: () => Promise.resolve(undefined),
|
|
640
|
+
getDataLocale: () => Promise.resolve(undefined),
|
|
636
641
|
setEnableDrillToUrlByDefault: () => Promise.resolve(),
|
|
637
642
|
setEnablePartialDataResults: () => Promise.resolve(),
|
|
638
643
|
setEnableNullJoins: () => Promise.resolve(),
|
|
@@ -811,6 +816,21 @@ function recordedOrganization(organizationId, implConfig) {
|
|
|
811
816
|
delete: () => Promise.resolve(),
|
|
812
817
|
};
|
|
813
818
|
},
|
|
819
|
+
localization() {
|
|
820
|
+
return recordedLocalizationService();
|
|
821
|
+
},
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
function recordedLocalizationService() {
|
|
825
|
+
return {
|
|
826
|
+
getUsage: () => Promise.resolve({
|
|
827
|
+
defaults: { LOCALE: null, METADATA_LOCALE: null, DATA_LOCALE: null },
|
|
828
|
+
values: [],
|
|
829
|
+
}),
|
|
830
|
+
getUsageWorkspaces: () => Promise.resolve({ workspaces: [], totalCount: 0 }),
|
|
831
|
+
getUsageUsers: () => Promise.resolve({ users: [], totalCount: 0 }),
|
|
832
|
+
getStatistics: () => Promise.resolve({ metadata: { locales: [] }, data: { locales: [] } }),
|
|
833
|
+
getStatisticsWorkspaces: () => Promise.resolve({ workspaces: [], totalCount: 0 }),
|
|
814
834
|
};
|
|
815
835
|
}
|
|
816
836
|
function recordedOrganizations(implConfig) {
|
|
@@ -849,7 +869,7 @@ function recordedUserService(implConfig) {
|
|
|
849
869
|
userId: USER_ID,
|
|
850
870
|
locale,
|
|
851
871
|
separators,
|
|
852
|
-
...
|
|
872
|
+
...implConfig.globalSettings,
|
|
853
873
|
}),
|
|
854
874
|
setLocale: () => Promise.resolve(),
|
|
855
875
|
setMetadataLocale: () => Promise.resolve(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-backend-mockingbird",
|
|
3
|
-
"version": "11.62.0-alpha.
|
|
3
|
+
"version": "11.62.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-base": "11.62.0-alpha.
|
|
29
|
-
"@gooddata/sdk-
|
|
30
|
-
"@gooddata/
|
|
31
|
-
"@gooddata/
|
|
28
|
+
"@gooddata/sdk-backend-base": "11.62.0-alpha.2",
|
|
29
|
+
"@gooddata/sdk-model": "11.62.0-alpha.2",
|
|
30
|
+
"@gooddata/util": "11.62.0-alpha.2",
|
|
31
|
+
"@gooddata/sdk-backend-spi": "11.62.0-alpha.2"
|
|
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/eslint-config": "11.62.0-alpha.
|
|
54
|
-
"@gooddata/oxlint-config": "11.62.0-alpha.
|
|
55
|
-
"@gooddata/reference-workspace": "11.62.0-alpha.
|
|
53
|
+
"@gooddata/eslint-config": "11.62.0-alpha.2",
|
|
54
|
+
"@gooddata/oxlint-config": "11.62.0-alpha.2",
|
|
55
|
+
"@gooddata/reference-workspace": "11.62.0-alpha.2"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"_phase:build": "npm run build",
|