@finos/legend-extension-dsl-data-space 9.1.3 → 9.1.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 (128) hide show
  1. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts +1 -1
  2. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.d.ts.map +1 -1
  3. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js +15 -2
  4. package/lib/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.js.map +1 -1
  5. package/lib/components/DataSpaceDiagramViewer.d.ts +23 -0
  6. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -0
  7. package/lib/components/DataSpaceDiagramViewer.js +77 -0
  8. package/lib/components/DataSpaceDiagramViewer.js.map +1 -0
  9. package/lib/components/DataSpaceExecutionContextViewer.d.ts +23 -0
  10. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -0
  11. package/lib/components/DataSpaceExecutionContextViewer.js +58 -0
  12. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -0
  13. package/lib/components/DataSpaceInfoPanel.d.ts +23 -0
  14. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -0
  15. package/lib/components/DataSpaceInfoPanel.js +38 -0
  16. package/lib/components/DataSpaceInfoPanel.js.map +1 -0
  17. package/lib/components/DataSpaceModelsDocumentation.d.ts +23 -0
  18. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -0
  19. package/lib/components/DataSpaceModelsDocumentation.js +60 -0
  20. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -0
  21. package/lib/components/{studio/DataSpacePreview.d.ts → DataSpaceQuickStart.d.ts} +2 -5
  22. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -0
  23. package/lib/components/DataSpaceQuickStart.js +17 -0
  24. package/lib/components/DataSpaceQuickStart.js.map +1 -0
  25. package/lib/components/DataSpaceSupportPanel.d.ts +23 -0
  26. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -0
  27. package/lib/components/DataSpaceSupportPanel.js +40 -0
  28. package/lib/components/DataSpaceSupportPanel.js.map +1 -0
  29. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  30. package/lib/components/DataSpaceViewer.js +29 -278
  31. package/lib/components/DataSpaceViewer.js.map +1 -1
  32. package/lib/components/DataSpaceViewerActivityBar.d.ts +23 -0
  33. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -0
  34. package/lib/components/DataSpaceViewerActivityBar.js +105 -0
  35. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -0
  36. package/lib/components/DataSpaceWiki.d.ts +23 -0
  37. package/lib/components/DataSpaceWiki.d.ts.map +1 -0
  38. package/lib/components/DataSpaceWiki.js +36 -0
  39. package/lib/components/DataSpaceWiki.js.map +1 -0
  40. package/lib/components/query/DataSpaceAdvancedSearchModal.js +1 -1
  41. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
  42. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +1 -2
  43. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
  44. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -13
  45. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
  46. package/lib/components/studio/DataSpacePreviewAction.js +1 -1
  47. package/lib/components/studio/DataSpacePreviewAction.js.map +1 -1
  48. package/lib/graph/DSL_DataSpace_HashUtils.d.ts +3 -2
  49. package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
  50. package/lib/graph/DSL_DataSpace_HashUtils.js +3 -2
  51. package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
  52. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -0
  53. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
  54. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +50 -0
  55. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
  56. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +36 -5
  57. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  58. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +35 -8
  59. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  60. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
  61. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +70 -11
  62. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  63. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  64. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +48 -8
  65. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  66. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  67. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +39 -0
  68. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  69. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +92 -3
  70. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  71. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +23 -0
  72. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
  73. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +50 -0
  74. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
  75. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts +0 -1
  76. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
  77. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +33 -5
  78. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  79. package/lib/index.css +2 -2
  80. package/lib/index.css.map +1 -1
  81. package/lib/package.json +9 -5
  82. package/lib/stores/DataSpaceViewerState.d.ts +16 -14
  83. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  84. package/lib/stores/DataSpaceViewerState.js +19 -12
  85. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  86. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  87. package/lib/stores/studio/DataSpacePreviewState.js +0 -3
  88. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  89. package/package.json +20 -16
  90. package/src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +15 -2
  91. package/src/components/DataSpaceDiagramViewer.tsx +191 -0
  92. package/src/components/DataSpaceExecutionContextViewer.tsx +173 -0
  93. package/src/components/DataSpaceInfoPanel.tsx +170 -0
  94. package/src/components/DataSpaceModelsDocumentation.tsx +92 -0
  95. package/src/components/DataSpaceQuickStart.tsx +15 -0
  96. package/src/components/DataSpaceSupportPanel.tsx +80 -0
  97. package/src/components/DataSpaceViewer.tsx +73 -1063
  98. package/src/components/DataSpaceViewerActivityBar.tsx +215 -0
  99. package/src/components/DataSpaceWiki.tsx +76 -0
  100. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
  101. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -15
  102. package/src/components/studio/DataSpacePreviewAction.tsx +1 -1
  103. package/src/graph/DSL_DataSpace_HashUtils.ts +3 -2
  104. package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +60 -0
  105. package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +46 -15
  106. package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +99 -14
  107. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +65 -15
  108. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  109. package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +140 -2
  110. package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +60 -0
  111. package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +51 -7
  112. package/src/stores/DataSpaceViewerState.ts +24 -20
  113. package/src/stores/studio/DataSpacePreviewState.ts +0 -5
  114. package/tsconfig.json +8 -3
  115. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts +0 -28
  116. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts.map +0 -1
  117. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js +0 -30
  118. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js.map +0 -1
  119. package/lib/components/studio/DataSpacePreview.d.ts.map +0 -1
  120. package/lib/components/studio/DataSpacePreview.js +0 -52
  121. package/lib/components/studio/DataSpacePreview.js.map +0 -1
  122. package/lib/stores/studio/DataSpacePreviewStore.d.ts +0 -34
  123. package/lib/stores/studio/DataSpacePreviewStore.d.ts.map +0 -1
  124. package/lib/stores/studio/DataSpacePreviewStore.js +0 -98
  125. package/lib/stores/studio/DataSpacePreviewStore.js.map +0 -1
  126. package/src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts +0 -53
  127. package/src/components/studio/DataSpacePreview.tsx +0 -129
  128. package/src/stores/studio/DataSpacePreviewStore.ts +0 -172
@@ -18,7 +18,10 @@ import packageJson from '../../../../package.json';
18
18
  import V1_SYSTEM_MODELS from './v1/V1_DSL_DataSpace_SystemModels.json';
19
19
  import {
20
20
  V1_DataSpace,
21
+ V1_DataSpaceDiagram,
22
+ V1_DataSpaceExecutable,
21
23
  V1_DataSpaceExecutionContext,
24
+ V1_DataSpaceSupportCombinedInfo,
22
25
  V1_DataSpaceSupportEmail,
23
26
  } from './v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
24
27
  import {
@@ -37,8 +40,12 @@ import {
37
40
  import { getOwnDataSpace } from '../../DSL_DataSpace_GraphManagerHelper.js';
38
41
  import {
39
42
  DataSpace,
43
+ DataSpaceExecutable,
40
44
  DataSpaceExecutionContext,
45
+ DataSpaceSupportCombinedInfo,
41
46
  DataSpaceSupportEmail,
47
+ type DataSpaceElement,
48
+ DataSpaceDiagram,
42
49
  } from '../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
43
50
  import {
44
51
  type PackageableElement,
@@ -65,10 +72,11 @@ import {
65
72
  Class,
66
73
  Enumeration,
67
74
  Association,
75
+ type PackageableElementReference,
68
76
  } from '@finos/legend-graph';
69
77
  import {
70
78
  V1_DSL_Diagram_PackageableElementPointerType,
71
- getDiagram,
79
+ V1_resolveDiagram,
72
80
  } from '@finos/legend-extension-dsl-diagram';
73
81
 
74
82
  export const DATA_SPACE_ELEMENT_CLASSIFIER_PATH =
@@ -129,6 +137,7 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
129
137
  contextProtocol.name,
130
138
  `Data space execution context 'name' field is missing or empty`,
131
139
  );
140
+ execContext.title = contextProtocol.title;
132
141
  execContext.description = contextProtocol.description;
133
142
  execContext.mapping = PackageableElementExplicitReference.create(
134
143
  context.graph.getMapping(contextProtocol.mapping.path),
@@ -154,37 +163,79 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
154
163
  element.description = elementProtocol.description;
155
164
  if (elementProtocol.featuredDiagrams) {
156
165
  element.featuredDiagrams = elementProtocol.featuredDiagrams.map(
157
- (pointer) =>
158
- PackageableElementExplicitReference.create(
159
- getDiagram(pointer.path, context.graph),
160
- ),
166
+ (pointer) => V1_resolveDiagram(pointer.path, context),
161
167
  );
162
168
  }
163
169
  if (elementProtocol.elements) {
164
170
  element.elements = elementProtocol.elements.map((pointer) => {
165
- const el = context.graph.getElement(pointer.path);
171
+ const elementReference = context.resolveElement(
172
+ pointer.path,
173
+ false,
174
+ );
166
175
  if (
167
- el instanceof Class ||
168
- el instanceof Enumeration ||
169
- el instanceof Association
176
+ elementReference.value instanceof Class ||
177
+ elementReference.value instanceof Enumeration ||
178
+ elementReference.value instanceof Association
170
179
  ) {
171
- return PackageableElementExplicitReference.create(el);
180
+ return elementReference as unknown as PackageableElementReference<DataSpaceElement>;
172
181
  }
173
182
  throw new UnsupportedOperationError(
174
183
  `Can't find data space element (only allow class, enumartion, association) '${pointer.path}'`,
175
184
  );
176
185
  });
177
186
  }
187
+ if (elementProtocol.executables) {
188
+ element.executables = elementProtocol.executables.map(
189
+ (executableProtocol) => {
190
+ const executable = new DataSpaceExecutable();
191
+ executable.title = executableProtocol.title;
192
+ executable.description = executableProtocol.description;
193
+ executable.executable = context.resolveElement(
194
+ executableProtocol.executable.path,
195
+ false,
196
+ );
197
+ return executable;
198
+ },
199
+ );
200
+ }
201
+ if (elementProtocol.diagrams) {
202
+ element.diagrams = elementProtocol.diagrams.map(
203
+ (diagramProtocol) => {
204
+ const diagram = new DataSpaceDiagram();
205
+ diagram.title = diagramProtocol.title;
206
+ diagram.description = diagramProtocol.description;
207
+ diagram.diagram = V1_resolveDiagram(
208
+ diagramProtocol.diagram.path,
209
+ context,
210
+ );
211
+ return diagram;
212
+ },
213
+ );
214
+ }
178
215
  if (elementProtocol.supportInfo) {
179
216
  if (
180
217
  elementProtocol.supportInfo instanceof V1_DataSpaceSupportEmail
181
218
  ) {
182
219
  const supportEmail = new DataSpaceSupportEmail();
220
+ supportEmail.documentationUrl =
221
+ elementProtocol.supportInfo.documentationUrl;
183
222
  supportEmail.address = guaranteeNonEmptyString(
184
223
  elementProtocol.supportInfo.address,
185
224
  `Data space support email 'address' field is missing or empty`,
186
225
  );
187
226
  element.supportInfo = supportEmail;
227
+ } else if (
228
+ elementProtocol.supportInfo instanceof
229
+ V1_DataSpaceSupportCombinedInfo
230
+ ) {
231
+ const combinedInfo = new DataSpaceSupportCombinedInfo();
232
+ combinedInfo.documentationUrl =
233
+ elementProtocol.supportInfo.documentationUrl;
234
+ combinedInfo.emails = elementProtocol.supportInfo.emails;
235
+ combinedInfo.website = elementProtocol.supportInfo.website;
236
+ combinedInfo.faqUrl = elementProtocol.supportInfo.faqUrl;
237
+ combinedInfo.supportUrl = elementProtocol.supportInfo.supportUrl;
238
+ element.supportInfo = combinedInfo;
188
239
  } else {
189
240
  throw new UnsupportedOperationError(
190
241
  `Can't build data space support info`,
@@ -259,6 +310,7 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
259
310
  (execContext) => {
260
311
  const contextProtocol = new V1_DataSpaceExecutionContext();
261
312
  contextProtocol.name = execContext.name;
313
+ contextProtocol.title = execContext.title;
262
314
  contextProtocol.description = execContext.description;
263
315
  contextProtocol.mapping = new V1_PackageableElementPointer(
264
316
  PackageableElementPointerType.MAPPING,
@@ -276,24 +328,57 @@ export class DSL_DataSpace_PureProtocolProcessorPlugin extends PureProtocolProce
276
328
  protocol.title = metamodel.title;
277
329
  protocol.description = metamodel.description;
278
330
  protocol.featuredDiagrams = metamodel.featuredDiagrams?.map(
279
- (diagramPath) =>
331
+ (diagramReference) =>
280
332
  new V1_PackageableElementPointer(
281
333
  V1_DSL_Diagram_PackageableElementPointerType,
282
- diagramPath.valueForSerialization ?? '',
334
+ diagramReference.valueForSerialization ?? '',
283
335
  ),
284
336
  );
285
337
  protocol.elements = metamodel.elements?.map(
286
- (elPath) =>
338
+ (elementReference) =>
287
339
  new V1_PackageableElementPointer(
288
340
  PackageableElementPointerType.CLASS,
289
- elPath.valueForSerialization ?? '',
341
+ elementReference.valueForSerialization ?? '',
290
342
  ),
291
343
  );
344
+ protocol.executables = metamodel.executables?.map((executable) => {
345
+ const executableProtocol = new V1_DataSpaceExecutable();
346
+ executableProtocol.title = executable.title;
347
+ executableProtocol.description = executable.description;
348
+ executableProtocol.executable = new V1_PackageableElementPointer(
349
+ undefined,
350
+ executable.executable.valueForSerialization ?? '',
351
+ );
352
+ return executableProtocol;
353
+ });
354
+ protocol.diagrams = metamodel.diagrams?.map((diagram) => {
355
+ const diagramProtocol = new V1_DataSpaceDiagram();
356
+ diagramProtocol.title = diagram.title;
357
+ diagramProtocol.description = diagram.description;
358
+ diagramProtocol.diagram = new V1_PackageableElementPointer(
359
+ undefined,
360
+ diagram.diagram.valueForSerialization ?? '',
361
+ );
362
+ return diagramProtocol;
363
+ });
292
364
  if (metamodel.supportInfo) {
293
365
  if (metamodel.supportInfo instanceof DataSpaceSupportEmail) {
294
366
  const supportEmail = new V1_DataSpaceSupportEmail();
367
+ supportEmail.documentationUrl =
368
+ metamodel.supportInfo.documentationUrl;
295
369
  supportEmail.address = metamodel.supportInfo.address;
296
370
  protocol.supportInfo = supportEmail;
371
+ } else if (
372
+ metamodel.supportInfo instanceof DataSpaceSupportCombinedInfo
373
+ ) {
374
+ const combinedInfo = new V1_DataSpaceSupportCombinedInfo();
375
+ combinedInfo.documentationUrl =
376
+ metamodel.supportInfo.documentationUrl;
377
+ combinedInfo.emails = metamodel.supportInfo.emails;
378
+ combinedInfo.website = metamodel.supportInfo.website;
379
+ combinedInfo.faqUrl = metamodel.supportInfo.faqUrl;
380
+ combinedInfo.supportUrl = metamodel.supportInfo.supportUrl;
381
+ protocol.supportInfo = combinedInfo;
297
382
  } else {
298
383
  throw new UnsupportedOperationError(
299
384
  `Can't transform data space support info`,
@@ -14,7 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { getDiagram } from '@finos/legend-extension-dsl-diagram';
18
17
  import {
19
18
  PureModel,
20
19
  V1_PureGraphManager,
@@ -46,8 +45,13 @@ import { DataSpaceSupportEmail } from '../../../../graph/metamodel/pure/model/pa
46
45
  import { V1_DataSpaceSupportEmail } from '../../../../graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
47
46
  import {
48
47
  DataSpaceAnalysisResult,
48
+ DataSpaceDiagramAnalysisResult,
49
49
  DataSpaceDocumentationEntry,
50
+ DataSpaceExecutableAnalysisResult,
51
+ DataSpaceExecutableTDSResultColumn,
52
+ DataSpaceExecutableTDSResult,
50
53
  DataSpaceExecutionContextAnalysisResult,
54
+ DataSpaceServiceExecutableInfo,
51
55
  DataSpaceStereotypeInfo,
52
56
  DataSpaceTaggedValueInfo,
53
57
  } from '../../../action/analytics/DataSpaceAnalysis.js';
@@ -57,7 +61,10 @@ import {
57
61
  V1_DataSpaceAssociationDocumentationEntry,
58
62
  V1_DataSpaceClassDocumentationEntry,
59
63
  V1_DataSpaceEnumerationDocumentationEntry,
64
+ V1_DataSpaceExecutableTDSResult,
65
+ V1_DataSpaceServiceExecutableInfo,
60
66
  } from './engine/analytics/V1_DataSpaceAnalysis.js';
67
+ import { getDiagram } from '@finos/legend-extension-dsl-diagram';
61
68
 
62
69
  const ANALYZE_DATA_SPACE_TRACE = 'analyze data space';
63
70
 
@@ -269,6 +276,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
269
276
  const contextAnalysisResult =
270
277
  new DataSpaceExecutionContextAnalysisResult();
271
278
  contextAnalysisResult.name = context.name;
279
+ contextAnalysisResult.title = context.title;
272
280
  contextAnalysisResult.description = context.description;
273
281
  contextAnalysisResult.mapping = graph.getMapping(context.mapping);
274
282
  contextAnalysisResult.defaultRuntime = graph.getRuntime(
@@ -286,11 +294,6 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
286
294
  result.executionContextsIndex.get(analysisResult.defaultExecutionContext),
287
295
  );
288
296
 
289
- // featured diagrams
290
- result.featuredDiagrams = analysisResult.featuredDiagrams.map((path) =>
291
- getDiagram(path, graph),
292
- );
293
-
294
297
  // elements documentation
295
298
  result.elementDocs = analysisResult.elementDocs.flatMap((docEntry) => {
296
299
  const entries: DataSpaceDocumentationEntry[] = [];
@@ -311,15 +314,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
311
314
  ),
312
315
  );
313
316
  });
314
- docEntry.inheritedProperties.forEach((property) => {
315
- entries.push(
316
- new DataSpaceDocumentationEntry(
317
- docEntry.path,
318
- property.name,
319
- property.docs.join('\n'),
320
- ),
321
- );
322
- });
317
+ // NOTE: we don't want to list inherited properties
323
318
  } else if (
324
319
  docEntry instanceof V1_DataSpaceEnumerationDocumentationEntry
325
320
  ) {
@@ -348,6 +343,61 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
348
343
  return entries;
349
344
  });
350
345
 
346
+ // featured diagrams
347
+ result.diagrams = analysisResult.featuredDiagrams
348
+ .map((path) => {
349
+ const diagram = new DataSpaceDiagramAnalysisResult();
350
+ diagram.title = path;
351
+ diagram.diagram = getDiagram(path, graph);
352
+ return diagram;
353
+ })
354
+ .concat(
355
+ analysisResult.diagrams.map((diagramProtocol) => {
356
+ const diagram = new DataSpaceDiagramAnalysisResult();
357
+ diagram.title = diagramProtocol.title;
358
+ diagram.description = diagramProtocol.description;
359
+ diagram.diagram = getDiagram(diagramProtocol.diagram, graph);
360
+ return diagram;
361
+ }),
362
+ );
363
+
364
+ // executables
365
+ result.executables = analysisResult.executables.map(
366
+ (executableProtocol) => {
367
+ const executable = new DataSpaceExecutableAnalysisResult();
368
+ executable.title = executableProtocol.title;
369
+ executable.description = executableProtocol.description;
370
+ executable.executable = executableProtocol.executable;
371
+ if (
372
+ executableProtocol.info instanceof V1_DataSpaceServiceExecutableInfo
373
+ ) {
374
+ const serviceExecutableInfo = new DataSpaceServiceExecutableInfo();
375
+ serviceExecutableInfo.query = executableProtocol.info.query;
376
+ serviceExecutableInfo.pattern = executableProtocol.info.pattern;
377
+ serviceExecutableInfo.mapping = executableProtocol.info.mapping;
378
+ serviceExecutableInfo.runtime = executableProtocol.info.runtime;
379
+ executable.info = serviceExecutableInfo;
380
+ }
381
+ if (
382
+ executableProtocol.result instanceof V1_DataSpaceExecutableTDSResult
383
+ ) {
384
+ const tdsResult = new DataSpaceExecutableTDSResult();
385
+ tdsResult.columns = executableProtocol.result.columns.map(
386
+ (tdsColumn) => {
387
+ const column = new DataSpaceExecutableTDSResultColumn();
388
+ column.name = tdsColumn.name;
389
+ column.type = tdsColumn.type;
390
+ column.relationalType = tdsColumn.relationalType;
391
+ column.documentation = tdsColumn.documentation;
392
+ return column;
393
+ },
394
+ );
395
+ executable.result = tdsResult;
396
+ }
397
+ return executable;
398
+ },
399
+ );
400
+
351
401
  return result;
352
402
  }
353
403
  }
@@ -5,6 +5,13 @@
5
5
  "_type": "profile",
6
6
  "name": "enterprise",
7
7
  "tags": ["taxonomyNodes"]
8
+ },
9
+ {
10
+ "_type": "profile",
11
+ "name": "DataSpaceInfo",
12
+ "package": "meta::pure::metamodel::dataSpace::profiles",
13
+ "stereotypes": ["Verified"],
14
+ "tags": ["deprecationNotice"]
8
15
  }
9
16
  ]
10
17
  }
@@ -20,10 +20,13 @@ import {
20
20
  optionalCustom,
21
21
  type PlainObject,
22
22
  UnsupportedOperationError,
23
+ customListWithSchema,
24
+ usingConstantValueSchema,
23
25
  } from '@finos/legend-shared';
24
26
  import {
25
27
  createModelSchema,
26
28
  custom,
29
+ deserialize,
27
30
  list,
28
31
  object,
29
32
  optional,
@@ -61,6 +64,7 @@ class V1_DataSpaceStereotypeInfo {
61
64
 
62
65
  class V1_DataSpaceExecutionContextAnalysisResult {
63
66
  name!: string;
67
+ title?: string | undefined;
64
68
  description?: string | undefined;
65
69
  mapping!: string;
66
70
  defaultRuntime!: string;
@@ -73,6 +77,7 @@ class V1_DataSpaceExecutionContextAnalysisResult {
73
77
  mapping: primitive(),
74
78
  defaultRuntime: primitive(),
75
79
  compatibleRuntimes: list(primitive()),
80
+ title: optional(primitive()),
76
81
  }),
77
82
  );
78
83
  }
@@ -172,6 +177,129 @@ function V1_deserializeModelDocumentationEntry(
172
177
  }
173
178
  }
174
179
 
180
+ export class V1_DataSpaceDiagramAnalysisResult {
181
+ title!: string;
182
+ description?: string | undefined;
183
+ diagram!: string;
184
+
185
+ static readonly serialization = new SerializationFactory(
186
+ createModelSchema(V1_DataSpaceDiagramAnalysisResult, {
187
+ description: optional(primitive()),
188
+ diagram: primitive(),
189
+ title: primitive(),
190
+ }),
191
+ );
192
+ }
193
+
194
+ export abstract class V1_DataSpaceExecutableInfo {
195
+ query!: string;
196
+ }
197
+
198
+ const V1_DATA_SPACE_SERVICE_EXECUTABLE_INFO_TYPE = 'service';
199
+
200
+ export class V1_DataSpaceServiceExecutableInfo extends V1_DataSpaceExecutableInfo {
201
+ pattern!: string;
202
+ mapping?: string | undefined;
203
+ runtime?: string | undefined;
204
+
205
+ static readonly serialization = new SerializationFactory(
206
+ createModelSchema(V1_DataSpaceServiceExecutableInfo, {
207
+ _type: usingConstantValueSchema(
208
+ V1_DATA_SPACE_SERVICE_EXECUTABLE_INFO_TYPE,
209
+ ),
210
+ mapping: optional(primitive()),
211
+ pattern: primitive(),
212
+ query: primitive(),
213
+ runtime: optional(primitive()),
214
+ }),
215
+ );
216
+ }
217
+
218
+ const V1_deserializeDataSpaceExecutableInfo = (
219
+ json: PlainObject<V1_DataSpaceExecutableInfo>,
220
+ ): V1_DataSpaceExecutableInfo => {
221
+ switch (json._type) {
222
+ case V1_DATA_SPACE_SERVICE_EXECUTABLE_INFO_TYPE:
223
+ return deserialize(
224
+ V1_DataSpaceServiceExecutableInfo.serialization.schema,
225
+ json,
226
+ );
227
+ default:
228
+ throw new UnsupportedOperationError(
229
+ `Can't deserialize data space executable info of type '${json._type}'`,
230
+ );
231
+ }
232
+ };
233
+
234
+ export abstract class V1_DataSpaceExecutableResult {}
235
+
236
+ const V1_DATA_SPACE_EXECUTABLE_TDS_RESULT_TYPE = 'tds';
237
+
238
+ export class V1_DataSpaceExecutableTDSResultColumn {
239
+ name!: string;
240
+ documentation?: string | undefined;
241
+ type?: string | undefined;
242
+ relationalType?: string | undefined;
243
+
244
+ static readonly serialization = new SerializationFactory(
245
+ createModelSchema(V1_DataSpaceExecutableTDSResultColumn, {
246
+ documentation: optional(primitive()),
247
+ name: primitive(),
248
+ relationalType: optional(primitive()),
249
+ type: optional(primitive()),
250
+ }),
251
+ );
252
+ }
253
+
254
+ export class V1_DataSpaceExecutableTDSResult extends V1_DataSpaceExecutableResult {
255
+ columns: V1_DataSpaceExecutableTDSResultColumn[] = [];
256
+
257
+ static readonly serialization = new SerializationFactory(
258
+ createModelSchema(V1_DataSpaceExecutableTDSResult, {
259
+ _type: usingConstantValueSchema(
260
+ V1_DATA_SPACE_SERVICE_EXECUTABLE_INFO_TYPE,
261
+ ),
262
+ columns: list(
263
+ object(V1_DataSpaceExecutableTDSResultColumn.serialization.schema),
264
+ ),
265
+ }),
266
+ );
267
+ }
268
+
269
+ const V1_deserializeDataSpaceExecutableResult = (
270
+ json: PlainObject<V1_DataSpaceExecutableResult>,
271
+ ): V1_DataSpaceExecutableResult => {
272
+ switch (json._type) {
273
+ case V1_DATA_SPACE_EXECUTABLE_TDS_RESULT_TYPE:
274
+ return deserialize(
275
+ V1_DataSpaceExecutableTDSResult.serialization.schema,
276
+ json,
277
+ );
278
+ default:
279
+ throw new UnsupportedOperationError(
280
+ `Can't deserialize data space executable result of type '${json._type}'`,
281
+ );
282
+ }
283
+ };
284
+
285
+ export class V1_DataSpaceExecutableAnalysisResult {
286
+ title!: string;
287
+ description?: string | undefined;
288
+ executable!: string;
289
+ info?: V1_DataSpaceExecutableInfo | undefined;
290
+ result!: V1_DataSpaceExecutableResult;
291
+
292
+ static readonly serialization = new SerializationFactory(
293
+ createModelSchema(V1_DataSpaceExecutableAnalysisResult, {
294
+ executable: primitive(),
295
+ description: optional(primitive()),
296
+ info: optionalCustom(() => SKIP, V1_deserializeDataSpaceExecutableInfo),
297
+ resultType: custom(() => SKIP, V1_deserializeDataSpaceExecutableResult),
298
+ title: primitive(),
299
+ }),
300
+ );
301
+ }
302
+
175
303
  export class V1_DataSpaceAnalysisResult {
176
304
  name!: string;
177
305
  package!: string;
@@ -194,6 +322,9 @@ export class V1_DataSpaceAnalysisResult {
194
322
  elements: string[] = [];
195
323
  elementDocs: V1_DataSpaceModelDocumentationEntry[] = [];
196
324
 
325
+ executables: V1_DataSpaceExecutableAnalysisResult[] = [];
326
+ diagrams: V1_DataSpaceDiagramAnalysisResult[] = [];
327
+
197
328
  static readonly serialization = new SerializationFactory(
198
329
  createModelSchema(V1_DataSpaceAnalysisResult, {
199
330
  name: primitive(),
@@ -205,6 +336,7 @@ export class V1_DataSpaceAnalysisResult {
205
336
 
206
337
  title: optional(primitive()),
207
338
  description: optional(primitive()),
339
+
208
340
  supportInfo: optionalCustom(
209
341
  () => SKIP,
210
342
  (val) => V1_deserializeSupportInfo(val),
@@ -217,12 +349,18 @@ export class V1_DataSpaceAnalysisResult {
217
349
  ),
218
350
  defaultExecutionContext: primitive(),
219
351
 
220
- featuredDiagrams: list(primitive()),
221
-
222
352
  elements: list(primitive()),
223
353
  elementDocs: list(
224
354
  custom(() => SKIP, V1_deserializeModelDocumentationEntry),
225
355
  ),
356
+
357
+ featuredDiagrams: list(primitive()),
358
+ diagrams: customListWithSchema(
359
+ V1_DataSpaceDiagramAnalysisResult.serialization.schema,
360
+ ),
361
+ executables: customListWithSchema(
362
+ V1_DataSpaceExecutableAnalysisResult.serialization.schema,
363
+ ),
226
364
  }),
227
365
  );
228
366
  }
@@ -25,6 +25,8 @@ import {
25
25
  } from '@finos/legend-graph';
26
26
 
27
27
  export abstract class V1_DataSpaceSupportInfo implements Hashable {
28
+ documentationUrl?: string | undefined;
29
+
28
30
  abstract get hashCode(): string;
29
31
  }
30
32
 
@@ -37,13 +39,36 @@ export class V1_DataSpaceSupportEmail
37
39
  get hashCode(): string {
38
40
  return hashArray([
39
41
  DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_EMAIL,
42
+ this.documentationUrl ?? '',
40
43
  this.address,
41
44
  ]);
42
45
  }
43
46
  }
44
47
 
48
+ export class V1_DataSpaceSupportCombinedInfo
49
+ extends V1_DataSpaceSupportInfo
50
+ implements Hashable
51
+ {
52
+ emails?: string[] | undefined;
53
+ website?: string | undefined;
54
+ faqUrl?: string | undefined;
55
+ supportUrl?: string | undefined;
56
+
57
+ get hashCode(): string {
58
+ return hashArray([
59
+ DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_SUPPORT_COMBINED_INFO,
60
+ this.documentationUrl ?? '',
61
+ hashArray(this.emails ?? []),
62
+ this.website ?? '',
63
+ this.faqUrl ?? '',
64
+ this.supportUrl ?? '',
65
+ ]);
66
+ }
67
+ }
68
+
45
69
  export class V1_DataSpaceExecutionContext implements Hashable {
46
70
  name!: string;
71
+ title?: string | undefined;
47
72
  description?: string | undefined;
48
73
  mapping!: V1_PackageableElementPointer;
49
74
  defaultRuntime!: V1_PackageableElementPointer;
@@ -52,6 +77,7 @@ export class V1_DataSpaceExecutionContext implements Hashable {
52
77
  return hashArray([
53
78
  DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXECUTION_CONTEXT,
54
79
  this.name,
80
+ this.title ?? '',
55
81
  this.description ?? '',
56
82
  this.mapping.path,
57
83
  this.defaultRuntime.path,
@@ -59,6 +85,36 @@ export class V1_DataSpaceExecutionContext implements Hashable {
59
85
  }
60
86
  }
61
87
 
88
+ export class V1_DataSpaceExecutable implements Hashable {
89
+ title!: string;
90
+ description?: string | undefined;
91
+ executable!: V1_PackageableElementPointer;
92
+
93
+ get hashCode(): string {
94
+ return hashArray([
95
+ DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_EXECUTABLE,
96
+ this.title,
97
+ this.description ?? '',
98
+ this.executable.path,
99
+ ]);
100
+ }
101
+ }
102
+
103
+ export class V1_DataSpaceDiagram implements Hashable {
104
+ title!: string;
105
+ description?: string | undefined;
106
+ diagram!: V1_PackageableElementPointer;
107
+
108
+ get hashCode(): string {
109
+ return hashArray([
110
+ DATA_SPACE_HASH_STRUCTURE.DATA_SPACE_DIAGRAM,
111
+ this.title,
112
+ this.description ?? '',
113
+ this.diagram.path,
114
+ ]);
115
+ }
116
+ }
117
+
62
118
  export class V1_DataSpace extends V1_PackageableElement implements Hashable {
63
119
  stereotypes: V1_StereotypePtr[] = [];
64
120
  taggedValues: V1_TaggedValue[] = [];
@@ -68,6 +124,8 @@ export class V1_DataSpace extends V1_PackageableElement implements Hashable {
68
124
  defaultExecutionContext!: string;
69
125
  featuredDiagrams?: V1_PackageableElementPointer[] | undefined;
70
126
  elements?: V1_PackageableElementPointer[] | undefined;
127
+ executables?: V1_DataSpaceExecutable[] | undefined;
128
+ diagrams?: V1_DataSpaceDiagram[] | undefined;
71
129
  supportInfo?: V1_DataSpaceSupportInfo | undefined;
72
130
 
73
131
  override get hashCode(): string {
@@ -81,6 +139,8 @@ export class V1_DataSpace extends V1_PackageableElement implements Hashable {
81
139
  this.defaultExecutionContext,
82
140
  hashArray((this.featuredDiagrams ?? []).map((pointer) => pointer.path)),
83
141
  hashArray((this.elements ?? []).map((pointer) => pointer.path)),
142
+ hashArray(this.executables ?? []),
143
+ hashArray(this.diagrams ?? []),
84
144
  this.supportInfo ?? '',
85
145
  ]);
86
146
  }