@finos/legend-extension-dsl-data-space 9.1.4 → 9.1.6

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 (168) 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/DSL_DataSpace_LegendApplicationPlugin.d.ts +0 -4
  6. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.d.ts.map +1 -1
  7. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js +0 -3
  8. package/lib/components/DSL_DataSpace_LegendApplicationPlugin.js.map +1 -1
  9. package/lib/components/DataSpaceDataAccess.d.ts +23 -0
  10. package/lib/components/DataSpaceDataAccess.d.ts.map +1 -0
  11. package/lib/components/DataSpaceDataAccess.js +34 -0
  12. package/lib/components/DataSpaceDataAccess.js.map +1 -0
  13. package/lib/components/DataSpaceDescription.d.ts +23 -0
  14. package/lib/components/DataSpaceDescription.d.ts.map +1 -0
  15. package/lib/components/DataSpaceDescription.js +26 -0
  16. package/lib/components/DataSpaceDescription.js.map +1 -0
  17. package/lib/components/DataSpaceDiagramViewer.d.ts +23 -0
  18. package/lib/components/DataSpaceDiagramViewer.d.ts.map +1 -0
  19. package/lib/components/DataSpaceDiagramViewer.js +75 -0
  20. package/lib/components/DataSpaceDiagramViewer.js.map +1 -0
  21. package/lib/components/DataSpaceExecutionContextViewer.d.ts +23 -0
  22. package/lib/components/DataSpaceExecutionContextViewer.d.ts.map +1 -0
  23. package/lib/components/DataSpaceExecutionContextViewer.js +58 -0
  24. package/lib/components/DataSpaceExecutionContextViewer.js.map +1 -0
  25. package/lib/components/DataSpaceInfoPanel.d.ts +23 -0
  26. package/lib/components/DataSpaceInfoPanel.d.ts.map +1 -0
  27. package/lib/components/DataSpaceInfoPanel.js +38 -0
  28. package/lib/components/DataSpaceInfoPanel.js.map +1 -0
  29. package/lib/components/DataSpaceMarkdownTextViewer.d.ts +20 -0
  30. package/lib/components/DataSpaceMarkdownTextViewer.d.ts.map +1 -0
  31. package/lib/components/DataSpaceMarkdownTextViewer.js +25 -0
  32. package/lib/components/DataSpaceMarkdownTextViewer.js.map +1 -0
  33. package/lib/components/DataSpaceModelsDocumentation.d.ts +23 -0
  34. package/lib/components/DataSpaceModelsDocumentation.d.ts.map +1 -0
  35. package/lib/components/DataSpaceModelsDocumentation.js +58 -0
  36. package/lib/components/DataSpaceModelsDocumentation.js.map +1 -0
  37. package/lib/components/{studio/DataSpacePreview.d.ts → DataSpacePlaceholder.d.ts} +4 -4
  38. package/lib/components/DataSpacePlaceholder.d.ts.map +1 -0
  39. package/lib/components/DataSpacePlaceholder.js +18 -0
  40. package/lib/components/DataSpacePlaceholder.js.map +1 -0
  41. package/lib/components/DataSpaceQuickStart.d.ts +23 -0
  42. package/lib/components/DataSpaceQuickStart.d.ts.map +1 -0
  43. package/lib/components/DataSpaceQuickStart.js +108 -0
  44. package/lib/components/DataSpaceQuickStart.js.map +1 -0
  45. package/lib/components/DataSpaceSupportPanel.d.ts +23 -0
  46. package/lib/components/DataSpaceSupportPanel.d.ts.map +1 -0
  47. package/lib/components/DataSpaceSupportPanel.js +40 -0
  48. package/lib/components/DataSpaceSupportPanel.js.map +1 -0
  49. package/lib/components/DataSpaceViewer.d.ts.map +1 -1
  50. package/lib/components/DataSpaceViewer.js +40 -276
  51. package/lib/components/DataSpaceViewer.js.map +1 -1
  52. package/lib/components/DataSpaceViewerActivityBar.d.ts +23 -0
  53. package/lib/components/DataSpaceViewerActivityBar.d.ts.map +1 -0
  54. package/lib/components/DataSpaceViewerActivityBar.js +105 -0
  55. package/lib/components/DataSpaceViewerActivityBar.js.map +1 -0
  56. package/lib/components/DataSpaceWiki.d.ts +23 -0
  57. package/lib/components/DataSpaceWiki.d.ts.map +1 -0
  58. package/lib/components/DataSpaceWiki.js +12 -0
  59. package/lib/components/DataSpaceWiki.js.map +1 -0
  60. package/lib/components/query/DataSpaceAdvancedSearchModal.js +1 -1
  61. package/lib/components/query/DataSpaceAdvancedSearchModal.js.map +1 -1
  62. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts +1 -2
  63. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.d.ts.map +1 -1
  64. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js +0 -13
  65. package/lib/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.js.map +1 -1
  66. package/lib/components/studio/DataSpacePreviewAction.js +1 -1
  67. package/lib/components/studio/DataSpacePreviewAction.js.map +1 -1
  68. package/lib/graph/DSL_DataSpace_HashUtils.d.ts +3 -2
  69. package/lib/graph/DSL_DataSpace_HashUtils.d.ts.map +1 -1
  70. package/lib/graph/DSL_DataSpace_HashUtils.js +3 -2
  71. package/lib/graph/DSL_DataSpace_HashUtils.js.map +1 -1
  72. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts +23 -0
  73. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.d.ts.map +1 -1
  74. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js +50 -0
  75. package/lib/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js.map +1 -1
  76. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.d.ts +5 -0
  77. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.d.ts.map +1 -1
  78. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.js +7 -0
  79. package/lib/graphManager/DSL_DataSpace_PureGraphManagerPlugin.js.map +1 -1
  80. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts +39 -5
  81. package/lib/graphManager/action/analytics/DataSpaceAnalysis.d.ts.map +1 -1
  82. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js +40 -8
  83. package/lib/graphManager/action/analytics/DataSpaceAnalysis.js.map +1 -1
  84. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.d.ts.map +1 -1
  85. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js +70 -11
  86. package/lib/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.js.map +1 -1
  87. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.d.ts.map +1 -1
  88. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js +62 -10
  89. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.js.map +1 -1
  90. package/lib/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  91. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts +39 -0
  92. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.d.ts.map +1 -1
  93. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js +92 -3
  94. package/lib/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.js.map +1 -1
  95. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts +23 -0
  96. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.d.ts.map +1 -1
  97. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js +50 -0
  98. package/lib/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js.map +1 -1
  99. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts +0 -1
  100. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.d.ts.map +1 -1
  101. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js +33 -5
  102. package/lib/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.js.map +1 -1
  103. package/lib/index.css +2 -2
  104. package/lib/index.css.map +1 -1
  105. package/lib/index.d.ts +2 -1
  106. package/lib/index.d.ts.map +1 -1
  107. package/lib/index.js +2 -1
  108. package/lib/index.js.map +1 -1
  109. package/lib/package.json +10 -6
  110. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.d.ts +32 -0
  111. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.d.ts.map +1 -0
  112. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js +17 -0
  113. package/lib/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.js.map +1 -0
  114. package/lib/stores/DataSpaceViewerState.d.ts +17 -14
  115. package/lib/stores/DataSpaceViewerState.d.ts.map +1 -1
  116. package/lib/stores/DataSpaceViewerState.js +25 -12
  117. package/lib/stores/DataSpaceViewerState.js.map +1 -1
  118. package/lib/stores/studio/DataSpacePreviewState.d.ts.map +1 -1
  119. package/lib/stores/studio/DataSpacePreviewState.js +0 -3
  120. package/lib/stores/studio/DataSpacePreviewState.js.map +1 -1
  121. package/package.json +21 -17
  122. package/src/application/studio/DSL_DataSpace_LegendStudioCodeSnippet.ts +15 -2
  123. package/src/components/DSL_DataSpace_LegendApplicationPlugin.ts +0 -9
  124. package/src/components/DataSpaceDataAccess.tsx +66 -0
  125. package/src/components/DataSpaceDescription.tsx +55 -0
  126. package/src/components/DataSpaceDiagramViewer.tsx +199 -0
  127. package/src/components/DataSpaceExecutionContextViewer.tsx +167 -0
  128. package/src/components/DataSpaceInfoPanel.tsx +170 -0
  129. package/src/components/DataSpaceMarkdownTextViewer.tsx +33 -0
  130. package/src/components/DataSpaceModelsDocumentation.tsx +99 -0
  131. package/src/components/DataSpacePlaceholder.tsx +21 -0
  132. package/src/components/DataSpaceQuickStart.tsx +381 -0
  133. package/src/components/DataSpaceSupportPanel.tsx +80 -0
  134. package/src/components/DataSpaceViewer.tsx +88 -1052
  135. package/src/components/DataSpaceViewerActivityBar.tsx +215 -0
  136. package/src/components/DataSpaceWiki.tsx +41 -0
  137. package/src/components/query/DataSpaceAdvancedSearchModal.tsx +1 -1
  138. package/src/components/studio/DSL_DataSpace_LegendStudioApplicationPlugin.tsx +0 -15
  139. package/src/components/studio/DataSpacePreviewAction.tsx +1 -1
  140. package/src/graph/DSL_DataSpace_HashUtils.ts +3 -2
  141. package/src/graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.ts +60 -0
  142. package/src/graphManager/DSL_DataSpace_PureGraphManagerPlugin.ts +9 -0
  143. package/src/graphManager/action/analytics/DataSpaceAnalysis.ts +54 -15
  144. package/src/graphManager/protocol/pure/DSL_DataSpace_PureProtocolProcessorPlugin.ts +99 -14
  145. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_PureGraphManagerExtension.ts +86 -17
  146. package/src/graphManager/protocol/pure/v1/V1_DSL_DataSpace_SystemModels.json +7 -0
  147. package/src/graphManager/protocol/pure/v1/engine/analytics/V1_DataSpaceAnalysis.ts +140 -2
  148. package/src/graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.ts +60 -0
  149. package/src/graphManager/protocol/pure/v1/transformation/pureProtocol/V1_DSL_DataSpace_ProtocolHelper.ts +51 -7
  150. package/src/index.ts +2 -4
  151. package/src/stores/DSL_DataSpace_LegendApplicationPlugin_Extension.ts +41 -0
  152. package/src/stores/DataSpaceViewerState.ts +39 -20
  153. package/src/stores/studio/DataSpacePreviewState.ts +0 -5
  154. package/tsconfig.json +13 -3
  155. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts +0 -28
  156. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.d.ts.map +0 -1
  157. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js +0 -30
  158. package/lib/application/studio/DSL_DataSpace_LegendStudioNavigation.js.map +0 -1
  159. package/lib/components/studio/DataSpacePreview.d.ts.map +0 -1
  160. package/lib/components/studio/DataSpacePreview.js +0 -52
  161. package/lib/components/studio/DataSpacePreview.js.map +0 -1
  162. package/lib/stores/studio/DataSpacePreviewStore.d.ts +0 -34
  163. package/lib/stores/studio/DataSpacePreviewStore.d.ts.map +0 -1
  164. package/lib/stores/studio/DataSpacePreviewStore.js +0 -98
  165. package/lib/stores/studio/DataSpacePreviewStore.js.map +0 -1
  166. package/src/application/studio/DSL_DataSpace_LegendStudioNavigation.ts +0 -53
  167. package/src/components/studio/DataSpacePreview.tsx +0 -129
  168. 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,
@@ -42,12 +41,23 @@ import {
42
41
  uniq,
43
42
  type PlainObject,
44
43
  } from '@finos/legend-shared';
45
- import { DataSpaceSupportEmail } from '../../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
46
- import { V1_DataSpaceSupportEmail } from '../../../../graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
44
+ import {
45
+ DataSpaceSupportCombinedInfo,
46
+ DataSpaceSupportEmail,
47
+ } from '../../../../graph/metamodel/pure/model/packageableElements/dataSpace/DSL_DataSpace_DataSpace.js';
48
+ import {
49
+ V1_DataSpaceSupportCombinedInfo,
50
+ V1_DataSpaceSupportEmail,
51
+ } from '../../../../graphManager/protocol/pure/v1/model/packageableElements/dataSpace/V1_DSL_DataSpace_DataSpace.js';
47
52
  import {
48
53
  DataSpaceAnalysisResult,
54
+ DataSpaceDiagramAnalysisResult,
49
55
  DataSpaceDocumentationEntry,
56
+ DataSpaceExecutableAnalysisResult,
57
+ DataSpaceExecutableTDSResultColumn,
58
+ DataSpaceExecutableTDSResult,
50
59
  DataSpaceExecutionContextAnalysisResult,
60
+ DataSpaceServiceExecutableInfo,
51
61
  DataSpaceStereotypeInfo,
52
62
  DataSpaceTaggedValueInfo,
53
63
  } from '../../../action/analytics/DataSpaceAnalysis.js';
@@ -57,7 +67,10 @@ import {
57
67
  V1_DataSpaceAssociationDocumentationEntry,
58
68
  V1_DataSpaceClassDocumentationEntry,
59
69
  V1_DataSpaceEnumerationDocumentationEntry,
70
+ V1_DataSpaceExecutableTDSResult,
71
+ V1_DataSpaceServiceExecutableInfo,
60
72
  } from './engine/analytics/V1_DataSpaceAnalysis.js';
73
+ import { getDiagram } from '@finos/legend-extension-dsl-diagram';
61
74
 
62
75
  const ANALYZE_DATA_SPACE_TRACE = 'analyze data space';
63
76
 
@@ -153,11 +166,24 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
153
166
  if (analysisResult.supportInfo) {
154
167
  if (analysisResult.supportInfo instanceof V1_DataSpaceSupportEmail) {
155
168
  const supportEmail = new DataSpaceSupportEmail();
169
+ supportEmail.documentationUrl =
170
+ analysisResult.supportInfo.documentationUrl;
156
171
  supportEmail.address = guaranteeNonEmptyString(
157
172
  analysisResult.supportInfo.address,
158
173
  `Data space support email 'address' field is missing or empty`,
159
174
  );
160
175
  result.supportInfo = supportEmail;
176
+ } else if (
177
+ analysisResult.supportInfo instanceof V1_DataSpaceSupportCombinedInfo
178
+ ) {
179
+ const combinedInfo = new DataSpaceSupportCombinedInfo();
180
+ combinedInfo.documentationUrl =
181
+ analysisResult.supportInfo.documentationUrl;
182
+ combinedInfo.website = analysisResult.supportInfo.website;
183
+ combinedInfo.faqUrl = analysisResult.supportInfo.faqUrl;
184
+ combinedInfo.supportUrl = analysisResult.supportInfo.supportUrl;
185
+ combinedInfo.emails = analysisResult.supportInfo.emails;
186
+ result.supportInfo = combinedInfo;
161
187
  }
162
188
  // NOTE: we will relax the check and not throw here for unknown support info type
163
189
  }
@@ -269,6 +295,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
269
295
  const contextAnalysisResult =
270
296
  new DataSpaceExecutionContextAnalysisResult();
271
297
  contextAnalysisResult.name = context.name;
298
+ contextAnalysisResult.title = context.title;
272
299
  contextAnalysisResult.description = context.description;
273
300
  contextAnalysisResult.mapping = graph.getMapping(context.mapping);
274
301
  contextAnalysisResult.defaultRuntime = graph.getRuntime(
@@ -286,11 +313,6 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
286
313
  result.executionContextsIndex.get(analysisResult.defaultExecutionContext),
287
314
  );
288
315
 
289
- // featured diagrams
290
- result.featuredDiagrams = analysisResult.featuredDiagrams.map((path) =>
291
- getDiagram(path, graph),
292
- );
293
-
294
316
  // elements documentation
295
317
  result.elementDocs = analysisResult.elementDocs.flatMap((docEntry) => {
296
318
  const entries: DataSpaceDocumentationEntry[] = [];
@@ -311,15 +333,7 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
311
333
  ),
312
334
  );
313
335
  });
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
- });
336
+ // NOTE: we don't want to list inherited properties
323
337
  } else if (
324
338
  docEntry instanceof V1_DataSpaceEnumerationDocumentationEntry
325
339
  ) {
@@ -348,6 +362,61 @@ export class V1_DSL_DataSpace_PureGraphManagerExtension extends DSL_DataSpace_Pu
348
362
  return entries;
349
363
  });
350
364
 
365
+ // featured diagrams
366
+ result.diagrams = analysisResult.featuredDiagrams
367
+ .map((path) => {
368
+ const diagram = new DataSpaceDiagramAnalysisResult();
369
+ diagram.title = path;
370
+ diagram.diagram = getDiagram(path, graph);
371
+ return diagram;
372
+ })
373
+ .concat(
374
+ analysisResult.diagrams.map((diagramProtocol) => {
375
+ const diagram = new DataSpaceDiagramAnalysisResult();
376
+ diagram.title = diagramProtocol.title;
377
+ diagram.description = diagramProtocol.description;
378
+ diagram.diagram = getDiagram(diagramProtocol.diagram, graph);
379
+ return diagram;
380
+ }),
381
+ );
382
+
383
+ // executables
384
+ result.executables = analysisResult.executables.map(
385
+ (executableProtocol) => {
386
+ const executable = new DataSpaceExecutableAnalysisResult();
387
+ executable.title = executableProtocol.title;
388
+ executable.description = executableProtocol.description;
389
+ executable.executable = executableProtocol.executable;
390
+ if (
391
+ executableProtocol.info instanceof V1_DataSpaceServiceExecutableInfo
392
+ ) {
393
+ const serviceExecutableInfo = new DataSpaceServiceExecutableInfo();
394
+ serviceExecutableInfo.query = executableProtocol.info.query;
395
+ serviceExecutableInfo.pattern = executableProtocol.info.pattern;
396
+ serviceExecutableInfo.mapping = executableProtocol.info.mapping;
397
+ serviceExecutableInfo.runtime = executableProtocol.info.runtime;
398
+ executable.info = serviceExecutableInfo;
399
+ }
400
+ if (
401
+ executableProtocol.result instanceof V1_DataSpaceExecutableTDSResult
402
+ ) {
403
+ const tdsResult = new DataSpaceExecutableTDSResult();
404
+ tdsResult.columns = executableProtocol.result.columns.map(
405
+ (tdsColumn) => {
406
+ const column = new DataSpaceExecutableTDSResultColumn();
407
+ column.name = tdsColumn.name;
408
+ column.type = tdsColumn.type;
409
+ column.relationalType = tdsColumn.relationalType;
410
+ column.documentation = tdsColumn.documentation;
411
+ return column;
412
+ },
413
+ );
414
+ executable.result = tdsResult;
415
+ }
416
+ return executable;
417
+ },
418
+ );
419
+
351
420
  return result;
352
421
  }
353
422
  }
@@ -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
+ result: 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
  }