@gooddata/sdk-backend-tiger 11.61.0-alpha.3 → 11.61.0-alpha.5

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.
Files changed (46) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.js +1 -1
  3. package/esm/backend/features/feature.js +1 -1
  4. package/esm/backend/organization/settings.d.ts +5 -5
  5. package/esm/backend/organization/settings.d.ts.map +1 -1
  6. package/esm/backend/settings/activeStyling.d.ts +16 -0
  7. package/esm/backend/settings/activeStyling.d.ts.map +1 -0
  8. package/esm/backend/settings/activeStyling.js +30 -0
  9. package/esm/backend/settings/mapping.d.ts +2 -2
  10. package/esm/backend/settings/mapping.d.ts.map +1 -1
  11. package/esm/backend/settings/settings.d.ts +0 -2
  12. package/esm/backend/settings/settings.d.ts.map +1 -1
  13. package/esm/backend/settings/settings.js +0 -6
  14. package/esm/backend/tigerSpecificFunctions.d.ts +1 -0
  15. package/esm/backend/tigerSpecificFunctions.d.ts.map +1 -1
  16. package/esm/backend/uiFeatures.d.ts +3 -3
  17. package/esm/backend/uiFeatures.d.ts.map +1 -1
  18. package/esm/backend/uiFeatures.js +3 -3
  19. package/esm/backend/user/settings.d.ts +5 -0
  20. package/esm/backend/user/settings.d.ts.map +1 -1
  21. package/esm/backend/user/settings.js +13 -0
  22. package/esm/backend/workspace/dashboards/referenceAvailability.d.ts +18 -10
  23. package/esm/backend/workspace/dashboards/referenceAvailability.d.ts.map +1 -1
  24. package/esm/backend/workspace/dashboards/referenceAvailability.js +52 -22
  25. package/esm/backend/workspace/genAI/index.d.ts +4 -1
  26. package/esm/backend/workspace/genAI/index.d.ts.map +1 -1
  27. package/esm/backend/workspace/genAI/index.js +36 -15
  28. package/esm/backend/workspace/measures/index.d.ts +2 -1
  29. package/esm/backend/workspace/measures/index.d.ts.map +1 -1
  30. package/esm/backend/workspace/measures/index.js +13 -1
  31. package/esm/backend/workspace/permissions/index.d.ts.map +1 -1
  32. package/esm/backend/workspace/permissions/index.js +5 -2
  33. package/esm/backend/workspace/settings/index.d.ts +0 -7
  34. package/esm/backend/workspace/settings/index.d.ts.map +1 -1
  35. package/esm/backend/workspace/settings/index.js +3 -25
  36. package/esm/backend/workspace/styling/index.d.ts +13 -10
  37. package/esm/backend/workspace/styling/index.d.ts.map +1 -1
  38. package/esm/backend/workspace/styling/index.js +49 -45
  39. package/esm/convertors/fromBackend/genAIConvertor.d.ts.map +1 -1
  40. package/esm/convertors/fromBackend/genAIConvertor.js +65 -20
  41. package/esm/convertors/fromBackend/reportPartConvertor.d.ts.map +1 -1
  42. package/esm/convertors/fromBackend/reportPartConvertor.js +1 -0
  43. package/esm/sdk-backend-tiger.d.ts +1 -0
  44. package/esm/types/index.d.ts +10 -2
  45. package/esm/types/index.d.ts.map +1 -1
  46. package/package.json +11 -11
@@ -1,7 +1,7 @@
1
1
  // (C) 2024-2026 GoodData Corporation
2
2
  import fastJsonPatch from "fast-json-patch";
3
3
  import { v4 as uuidv4 } from "uuid";
4
- import { yamlDashboardToDeclarative, yamlDatasetToDeclarative, yamlDateDatesetToDeclarative, yamlFiltersToDeclarative, yamlVisualisationToMetadataObject, } from "@gooddata/sdk-code-convertors";
4
+ import { yamlDashboardToDeclarative, yamlDatasetToDeclarative, yamlDateDatesetToDeclarative, yamlFiltersToDeclarative, yamlVisualisationToDeclarative, yamlVisualisationToMetadataObject, } from "@gooddata/sdk-code-convertors";
5
5
  import { areObjRefsEqual, assertNever, } from "@gooddata/sdk-model";
6
6
  import { getFormatByGranularity } from "../../utils/dateUtils.js";
7
7
  import { convertMeasure } from "./afm/MeasureConverter.js";
@@ -532,19 +532,25 @@ function applyDashboardPatch(items, siblings, patch) {
532
532
  // The most recent card for this dashboard need not carry a base - a patch that failed to
533
533
  // apply resolves to one without. Rebase on the last card that actually has one.
534
534
  const base = all[all.length - 1]?.base;
535
- // Collate insights from all cards that are related to this dashboard in history
536
- const previousInsights = Object.values(all.reduce((b, p) => {
537
- p.insights?.forEach((i) => {
538
- b[i.insight.identifier] = i;
539
- });
540
- return b;
541
- }, {}));
535
+ // Not base
542
536
  if (!base) {
543
537
  return {
544
538
  dashboard: null,
545
539
  insights: null,
546
540
  };
547
541
  }
542
+ // Collate insights from all cards that are related to this dashboard in history
543
+ const references = [
544
+ ...all.map((part) => part.references),
545
+ patch.references,
546
+ ].reduce((acc, curr) => {
547
+ return {
548
+ datasets: unique(acc?.datasets, curr?.datasets),
549
+ datedatasets: unique(acc?.datedatasets, curr?.datedatasets),
550
+ new_visualizations: unique(acc?.new_visualizations, curr?.new_visualizations),
551
+ visualizations: unique(acc?.visualizations, curr?.visualizations),
552
+ };
553
+ }, {});
548
554
  let newDocument = null;
549
555
  try {
550
556
  const patchResult = fastJsonPatch.applyPatch(base, patch.operations, undefined, false);
@@ -558,7 +564,7 @@ function applyDashboardPatch(items, siblings, patch) {
558
564
  patchError: e,
559
565
  };
560
566
  }
561
- const { dashboard, insights } = buildDashboardReferences(newDocument, patch.references, patch.dashboard_id);
567
+ const { dashboard, insights } = buildDashboardReferences(newDocument, references, patch.dashboard_id);
562
568
  // `base` is carried over unchanged: the operations are defined against the relayed document,
563
569
  // not against the result of a previous proposal, so a follow-up patch - which arrives without
564
570
  // a base of its own as long as the relayed document has not changed - rebases on the same one.
@@ -567,8 +573,9 @@ function applyDashboardPatch(items, siblings, patch) {
567
573
  // change the user has not accepted yet, so it has to offer the draft and not the saved copy.
568
574
  return {
569
575
  base,
576
+ references,
577
+ insights,
570
578
  dashboard: convertToTemporaryFilterContexts(dashboard),
571
- insights: [...previousInsights, ...insights],
572
579
  };
573
580
  }
574
581
  function collectRelatedItems(items, siblings, ref) {
@@ -594,11 +601,13 @@ function applyDashboardDefinition(part) {
594
601
  return {
595
602
  insights,
596
603
  base: part.dashboard,
604
+ references: part.references,
597
605
  saved: part.saved_dashboard_id,
598
606
  dashboard: convertToTemporaryFilterContexts(dashboard),
599
607
  };
600
608
  }
601
609
  function buildDashboardReferences(aacDashboard, references, savedDashboardId) {
610
+ const entities = [];
602
611
  const dateDatasets = references?.datedatasets?.map((ds) => {
603
612
  const data = ds;
604
613
  return {
@@ -609,6 +618,7 @@ function buildDashboardReferences(aacDashboard, references, savedDashboardId) {
609
618
  declarative: yamlDateDatesetToDeclarative(data),
610
619
  };
611
620
  }) ?? [];
621
+ entities.push(...dateDatasets);
612
622
  const datasets = references?.datasets?.map((ds) => {
613
623
  const data = ds;
614
624
  return {
@@ -619,24 +629,59 @@ function buildDashboardReferences(aacDashboard, references, savedDashboardId) {
619
629
  declarative: yamlDatasetToDeclarative(dateDatasets, data),
620
630
  };
621
631
  }) ?? [];
622
- const entities = [...dateDatasets, ...datasets];
623
- const data = aacDashboard ? yamlDashboardToDeclarative(entities, aacDashboard) : null;
624
- const filters = data?.filterContext
625
- ? convertFilterContextFromBackend(buildFilterContextWrapper(data.filterContext))
626
- : undefined;
627
- const existingInsights = (references?.visualizations ?? []).map((vis) => {
628
- return visualizationObjectsItemToInsight(yamlVisualisationToMetadataObject(entities, vis));
632
+ entities.push(...datasets);
633
+ const existingVisualizations = (references?.visualizations ?? []).map((vis) => {
634
+ const data = vis;
635
+ return {
636
+ data,
637
+ path: "",
638
+ type: data.type,
639
+ id: data.id,
640
+ declarative: yamlVisualisationToDeclarative(entities, data),
641
+ };
629
642
  }) ?? [];
630
- const newInsights = (references?.new_visualizations ?? []).map((vis) => {
631
- const insight = visualizationObjectsItemToInsight(yamlVisualisationToMetadataObject(entities, vis));
643
+ entities.push(...existingVisualizations);
644
+ const newVisualizations = (references?.new_visualizations ?? []).map((vis) => {
645
+ const data = vis;
646
+ return {
647
+ data,
648
+ path: "",
649
+ type: data.type,
650
+ id: data.id,
651
+ declarative: yamlVisualisationToDeclarative(entities, data),
652
+ };
653
+ }) ?? [];
654
+ entities.push(...newVisualizations);
655
+ // Convert to declarative to insights
656
+ const existingInsights = existingVisualizations.map((data) => {
657
+ return visualizationObjectsItemToInsight({
658
+ type: "visualizationObject",
659
+ id: data.id,
660
+ attributes: data.declarative,
661
+ });
662
+ }) ?? [];
663
+ const newInsights = newVisualizations.map((data) => {
664
+ const insight = visualizationObjectsItemToInsight({
665
+ type: "visualizationObject",
666
+ id: data.id,
667
+ attributes: data.declarative,
668
+ });
632
669
  insight.insight.isDraft = true;
633
670
  return insight;
634
671
  }) ?? [];
672
+ // Convert AacDashboard to declarative dashboard
673
+ const data = aacDashboard ? yamlDashboardToDeclarative(entities, aacDashboard) : null;
674
+ const filters = data?.filterContext
675
+ ? convertFilterContextFromBackend(buildFilterContextWrapper(data.filterContext))
676
+ : undefined;
635
677
  const dashboard = data
636
- ? convertDashboard(buildDashboardWrapper(data.dashboard, data.tabFilterContexts, savedDashboardId), filters)
678
+ ? convertDashboard(buildDashboardWrapper(data.dashboard, data.tabFilterContexts, savedDashboardId), data.tabFilterContexts?.length ? undefined : filters)
637
679
  : null;
638
680
  return {
639
681
  dashboard,
640
682
  insights: [...existingInsights, ...newInsights],
641
683
  };
642
684
  }
685
+ function unique(acc, curr) {
686
+ return [...new Map([...(acc ?? []), ...(curr ?? [])].map((item) => [item.id, item])).values()];
687
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"reportPartConvertor.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/reportPartConvertor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAsEhF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,8BAA8B,CASpF"}
1
+ {"version":3,"file":"reportPartConvertor.d.ts","sourceRoot":"","sources":["../../../src/convertors/fromBackend/reportPartConvertor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAsEhF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,8BAA8B,CAUpF"}
@@ -67,5 +67,6 @@ export function convertReportPart(part) {
67
67
  ref: part.report_ref,
68
68
  baseReportId: part.base_report_id,
69
69
  refines: part.refines_ref,
70
+ ...(part.reworks_open_report ? { reworksOpenReport: true } : {}),
70
71
  };
71
72
  }
@@ -835,6 +835,7 @@ export declare const convertVisualizationContentToInsight: (content: object, met
835
835
  * Check if entities are not overrides by entities from parents workspaces
836
836
  * @param entities - All i and types for check
837
837
  * @returns IdentifierDuplications[]
838
+ * @deprecated Use {@link @gooddata/sdk-backend-spi#IWorkspaceMeasuresService.checkEntityOverrides} instead.
838
839
  */
839
840
  checkEntityOverrides?: (workspaceId: string, entities: Array<HierarchyObjectIdentification>) => Promise<Array<IdentifierDuplications>>;
840
841
  /**
@@ -1,4 +1,4 @@
1
- import { type DeclarativeSettingTypeEnum, type ITigerClientBase, type JsonApiOrganizationSettingOutWithLinksTypeEnum } from "@gooddata/api-client-tiger";
1
+ import { type ITigerClientBase, type JsonApiOrganizationSettingInAttributesTypeEnum, type JsonApiOrganizationSettingOutWithLinksTypeEnum, type JsonApiWorkspaceSettingInAttributesTypeEnum } from "@gooddata/api-client-tiger";
2
2
  import { type AuthenticatedCallGuard } from "@gooddata/sdk-backend-base";
3
3
  import { type FilterContextItem, type IDashboardExportParameter } from "@gooddata/sdk-model";
4
4
  /**
@@ -48,6 +48,14 @@ export interface IExportMetadata {
48
48
  */
49
49
  timezoneId?: string;
50
50
  }
51
- export type TigerSettingsType = DeclarativeSettingTypeEnum;
51
+ /**
52
+ * Setting types the workspace and user settings endpoints accept.
53
+ */
54
+ export type TigerSettingsType = JsonApiWorkspaceSettingInAttributesTypeEnum;
55
+ /**
56
+ * Setting types the organization settings endpoint accepts: the workspace and user types plus
57
+ * organization-only ones.
58
+ */
59
+ export type TigerOrganizationSettingsType = JsonApiOrganizationSettingInAttributesTypeEnum;
52
60
  export type TigerOrgSettingsType = JsonApiOrganizationSettingOutWithLinksTypeEnum;
53
61
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,0BAA0B,EAC/B,KAAK,gBAAgB,EACrB,KAAK,8CAA8C,EACtD,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAE7F;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;AAEnF;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAClB,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,GACN,WAAW,GACX,mBAAmB,GACnB,QAAQ,CAAC;AAEf;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GACvB,qBAAqB,GACrB,qBAAqB,GACrB,eAAe,GACf,iBAAiB,GACjB,WAAW,GACX,oBAAoB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG;IACvB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAAC;CACxC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,EAAE,CAAC,CAAC;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA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;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,2CAA2C,CAAC;AAC5E;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG,8CAA8C,CAAC;AAC3F,MAAM,MAAM,oBAAoB,GAAG,8CAA8C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-backend-tiger",
3
- "version": "11.61.0-alpha.3",
3
+ "version": "11.61.0-alpha.5",
4
4
  "description": "GoodData Backend SPI implementation for GoodData Cloud and GoodData.CN",
5
5
  "license": "MIT",
6
6
  "author": "GoodData",
@@ -34,12 +34,12 @@
34
34
  "ts-invariant": "0.10.3",
35
35
  "tslib": "2.8.1",
36
36
  "uuid": "11.1.1",
37
- "@gooddata/api-client-tiger": "11.61.0-alpha.3",
38
- "@gooddata/sdk-backend-base": "11.61.0-alpha.3",
39
- "@gooddata/sdk-backend-spi": "11.61.0-alpha.3",
40
- "@gooddata/sdk-code-convertors": "11.61.0-alpha.3",
41
- "@gooddata/sdk-model": "11.61.0-alpha.3",
42
- "@gooddata/util": "11.61.0-alpha.3"
37
+ "@gooddata/api-client-tiger": "11.61.0-alpha.5",
38
+ "@gooddata/sdk-backend-base": "11.61.0-alpha.5",
39
+ "@gooddata/sdk-backend-spi": "11.61.0-alpha.5",
40
+ "@gooddata/sdk-code-convertors": "11.61.0-alpha.5",
41
+ "@gooddata/sdk-model": "11.61.0-alpha.5",
42
+ "@gooddata/util": "11.61.0-alpha.5"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@gooddata/fixtures": "3.7.0",
@@ -64,10 +64,10 @@
64
64
  "oxlint-tsgolint": "7.0.2001",
65
65
  "typescript": "7.0.2",
66
66
  "vitest": "4.1.11",
67
- "@gooddata/catalog-export": "11.61.0-alpha.3",
68
- "@gooddata/eslint-config": "11.61.0-alpha.3",
69
- "@gooddata/oxlint-config": "11.61.0-alpha.3",
70
- "@gooddata/reference-workspace": "11.61.0-alpha.3"
67
+ "@gooddata/catalog-export": "11.61.0-alpha.5",
68
+ "@gooddata/eslint-config": "11.61.0-alpha.5",
69
+ "@gooddata/oxlint-config": "11.61.0-alpha.5",
70
+ "@gooddata/reference-workspace": "11.61.0-alpha.5"
71
71
  },
72
72
  "scripts": {
73
73
  "_phase:build": "npm run build",