@finos/legend-graph 29.0.2 → 29.0.4

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 (274) hide show
  1. package/lib/__lib__/GraphManagerEvent.d.ts +2 -1
  2. package/lib/__lib__/GraphManagerEvent.d.ts.map +1 -1
  3. package/lib/__lib__/GraphManagerEvent.js +2 -1
  4. package/lib/__lib__/GraphManagerEvent.js.map +1 -1
  5. package/lib/graph/BasicModel.d.ts +7 -1
  6. package/lib/graph/BasicModel.d.ts.map +1 -1
  7. package/lib/graph/BasicModel.js +23 -1
  8. package/lib/graph/BasicModel.js.map +1 -1
  9. package/lib/graph/Core_HashUtils.d.ts +3 -1
  10. package/lib/graph/Core_HashUtils.d.ts.map +1 -1
  11. package/lib/graph/Core_HashUtils.js +3 -1
  12. package/lib/graph/Core_HashUtils.js.map +1 -1
  13. package/lib/graph/DependencyManager.d.ts +4 -1
  14. package/lib/graph/DependencyManager.d.ts.map +1 -1
  15. package/lib/graph/DependencyManager.js +4 -0
  16. package/lib/graph/DependencyManager.js.map +1 -1
  17. package/lib/graph/MetaModelConst.d.ts +2 -1
  18. package/lib/graph/MetaModelConst.d.ts.map +1 -1
  19. package/lib/graph/MetaModelConst.js +1 -0
  20. package/lib/graph/MetaModelConst.js.map +1 -1
  21. package/lib/graph/PureModel.d.ts +4 -1
  22. package/lib/graph/PureModel.d.ts.map +1 -1
  23. package/lib/graph/PureModel.js +16 -1
  24. package/lib/graph/PureModel.js.map +1 -1
  25. package/lib/graph/helpers/DomainHelper.d.ts +5 -1
  26. package/lib/graph/helpers/DomainHelper.d.ts.map +1 -1
  27. package/lib/graph/helpers/DomainHelper.js +20 -0
  28. package/lib/graph/helpers/DomainHelper.js.map +1 -1
  29. package/lib/graph/helpers/PureLanguageHelper.d.ts +5 -2
  30. package/lib/graph/helpers/PureLanguageHelper.d.ts.map +1 -1
  31. package/lib/graph/helpers/PureLanguageHelper.js +7 -4
  32. package/lib/graph/helpers/PureLanguageHelper.js.map +1 -1
  33. package/lib/graph/metamodel/pure/packageableElements/PackageableElement.d.ts +3 -1
  34. package/lib/graph/metamodel/pure/packageableElements/PackageableElement.d.ts.map +1 -1
  35. package/lib/graph/metamodel/pure/packageableElements/PackageableElement.js.map +1 -1
  36. package/lib/graph/metamodel/pure/packageableElements/domain/PrimitiveType.d.ts +1 -0
  37. package/lib/graph/metamodel/pure/packageableElements/domain/PrimitiveType.d.ts.map +1 -1
  38. package/lib/graph/metamodel/pure/packageableElements/domain/PrimitiveType.js +1 -0
  39. package/lib/graph/metamodel/pure/packageableElements/domain/PrimitiveType.js.map +1 -1
  40. package/lib/graph/metamodel/pure/packageableElements/{domain → function}/ConcreteFunctionDefinition.d.ts +3 -3
  41. package/lib/graph/metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.d.ts.map +1 -0
  42. package/lib/graph/metamodel/pure/packageableElements/{domain → function}/ConcreteFunctionDefinition.js +2 -2
  43. package/lib/graph/metamodel/pure/packageableElements/function/ConcreteFunctionDefinition.js.map +1 -0
  44. package/lib/graph/metamodel/pure/packageableElements/function/FunctionActivator.d.ts +29 -0
  45. package/lib/graph/metamodel/pure/packageableElements/function/FunctionActivator.d.ts.map +1 -0
  46. package/lib/graph/metamodel/pure/packageableElements/function/FunctionActivator.js +26 -0
  47. package/lib/graph/metamodel/pure/packageableElements/function/FunctionActivator.js.map +1 -0
  48. package/lib/graph/metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.d.ts +24 -0
  49. package/lib/graph/metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.d.ts.map +1 -0
  50. package/lib/graph/metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.js +33 -0
  51. package/lib/graph/metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.js.map +1 -0
  52. package/lib/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnknownMappingInclude.d.ts +24 -0
  53. package/lib/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnknownMappingInclude.d.ts.map +1 -0
  54. package/lib/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnknownMappingInclude.js +34 -0
  55. package/lib/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnknownMappingInclude.js.map +1 -0
  56. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingInclude.d.ts +4 -5
  57. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingInclude.d.ts.map +1 -1
  58. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingInclude.js +3 -15
  59. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingInclude.js.map +1 -1
  60. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingIncludeMapping.d.ts +7 -0
  61. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingIncludeMapping.d.ts.map +1 -0
  62. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingIncludeMapping.js +32 -0
  63. package/lib/graph/metamodel/pure/packageableElements/mapping/MappingIncludeMapping.js.map +1 -0
  64. package/lib/graph/metamodel/pure/packageableElements/mapping/SubstituteStore.d.ts +3 -3
  65. package/lib/graph/metamodel/pure/packageableElements/mapping/SubstituteStore.d.ts.map +1 -1
  66. package/lib/graph/metamodel/pure/packageableElements/mapping/SubstituteStore.js.map +1 -1
  67. package/lib/graph/metamodel/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.d.ts +5 -0
  68. package/lib/graph/metamodel/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.d.ts.map +1 -1
  69. package/lib/graph/metamodel/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.js +6 -0
  70. package/lib/graph/metamodel/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.js.map +1 -1
  71. package/lib/graph-manager/AbstractPureGraphManager.d.ts +19 -13
  72. package/lib/graph-manager/AbstractPureGraphManager.d.ts.map +1 -1
  73. package/lib/graph-manager/AbstractPureGraphManager.js.map +1 -1
  74. package/lib/graph-manager/GraphManagerState.d.ts +1 -1
  75. package/lib/graph-manager/GraphManagerState.d.ts.map +1 -1
  76. package/lib/graph-manager/action/changeDetection/CoreObserverHelper.js +1 -1
  77. package/lib/graph-manager/action/changeDetection/CoreObserverHelper.js.map +1 -1
  78. package/lib/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.js +1 -1
  79. package/lib/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.js.map +1 -1
  80. package/lib/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.d.ts.map +1 -1
  81. package/lib/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.js +14 -9
  82. package/lib/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.js.map +1 -1
  83. package/lib/graph-manager/action/changeDetection/DomainObserverHelper.d.ts +3 -1
  84. package/lib/graph-manager/action/changeDetection/DomainObserverHelper.d.ts.map +1 -1
  85. package/lib/graph-manager/action/changeDetection/DomainObserverHelper.js +7 -0
  86. package/lib/graph-manager/action/changeDetection/DomainObserverHelper.js.map +1 -1
  87. package/lib/graph-manager/action/changeDetection/GraphObserverHelper.d.ts.map +1 -1
  88. package/lib/graph-manager/action/changeDetection/GraphObserverHelper.js +4 -0
  89. package/lib/graph-manager/action/changeDetection/GraphObserverHelper.js.map +1 -1
  90. package/lib/graph-manager/action/changeDetection/PackageableElementObserver.d.ts.map +1 -1
  91. package/lib/graph-manager/action/changeDetection/PackageableElementObserver.js +4 -1
  92. package/lib/graph-manager/action/changeDetection/PackageableElementObserver.js.map +1 -1
  93. package/lib/graph-manager/action/changeDetection/STO_Relational_ObserverHelper.d.ts.map +1 -1
  94. package/lib/graph-manager/action/changeDetection/STO_Relational_ObserverHelper.js +4 -3
  95. package/lib/graph-manager/action/changeDetection/STO_Relational_ObserverHelper.js.map +1 -1
  96. package/lib/graph-manager/action/functionActivator/FunctionActivatorConfiguration.d.ts +26 -0
  97. package/lib/graph-manager/action/functionActivator/FunctionActivatorConfiguration.d.ts.map +1 -0
  98. package/lib/graph-manager/action/functionActivator/FunctionActivatorConfiguration.js +25 -0
  99. package/lib/graph-manager/action/functionActivator/FunctionActivatorConfiguration.js.map +1 -0
  100. package/lib/graph-manager/protocol/pure/extensions/DSL_Mapping_PureProtocolProcessorPlugin_Extension.d.ts +12 -0
  101. package/lib/graph-manager/protocol/pure/extensions/DSL_Mapping_PureProtocolProcessorPlugin_Extension.d.ts.map +1 -1
  102. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts +17 -9
  103. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.d.ts.map +1 -1
  104. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js +176 -121
  105. package/lib/graph-manager/protocol/pure/v1/V1_PureGraphManager.js.map +1 -1
  106. package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.d.ts +5 -0
  107. package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.d.ts.map +1 -1
  108. package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.js +31 -2
  109. package/lib/graph-manager/protocol/pure/v1/engine/V1_Engine.js.map +1 -1
  110. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts +19 -14
  111. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.d.ts.map +1 -1
  112. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js +25 -19
  113. package/lib/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.js.map +1 -1
  114. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorError.d.ts +21 -0
  115. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorError.d.ts.map +1 -0
  116. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorError.js +25 -0
  117. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorError.js.map +1 -0
  118. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInfo.d.ts +30 -0
  119. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInfo.d.ts.map +1 -0
  120. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInfo.js +41 -0
  121. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInfo.js.map +1 -0
  122. package/lib/graph-manager/protocol/pure/v1/engine/{service/V1_TEMPORARY__SnowflakeServiceDeploymentInput.d.ts → functionActivator/V1_FunctionActivatorInput.d.ts} +4 -10
  123. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInput.d.ts.map +1 -0
  124. package/lib/graph-manager/protocol/pure/v1/engine/{service/V1_TEMPORARY__SnowflakeServiceDeploymentInput.js → functionActivator/V1_FunctionActivatorInput.js} +7 -13
  125. package/lib/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInput.js.map +1 -0
  126. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.d.ts +2 -0
  127. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.d.ts.map +1 -1
  128. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.js.map +1 -1
  129. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_FunctionActivator.d.ts +21 -0
  130. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_FunctionActivator.d.ts.map +1 -0
  131. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_FunctionActivator.js +20 -0
  132. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_FunctionActivator.js.map +1 -0
  133. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.d.ts +24 -0
  134. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.d.ts.map +1 -0
  135. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.js +33 -0
  136. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.js.map +1 -0
  137. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_INTERNAL__UnknownMappingInclude.d.ts +22 -0
  138. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_INTERNAL__UnknownMappingInclude.d.ts.map +1 -0
  139. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_INTERNAL__UnknownMappingInclude.js +28 -0
  140. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_INTERNAL__UnknownMappingInclude.js.map +1 -0
  141. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_MappingInclude.d.ts +4 -1
  142. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_MappingInclude.d.ts.map +1 -1
  143. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_MappingInclude.js +3 -1
  144. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_MappingInclude.js.map +1 -1
  145. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.d.ts +5 -0
  146. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.d.ts.map +1 -1
  147. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.js +6 -0
  148. package/lib/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.js.map +1 -1
  149. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.d.ts.map +1 -1
  150. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js +1 -0
  151. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.js.map +1 -1
  152. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.d.ts +1 -1
  153. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.d.ts.map +1 -1
  154. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.d.ts.map +1 -1
  155. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js +33 -14
  156. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.js.map +1 -1
  157. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.d.ts.map +1 -1
  158. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.js +8 -0
  159. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.js.map +1 -1
  160. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFifthPassBuilder.d.ts +2 -0
  161. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFifthPassBuilder.d.ts.map +1 -1
  162. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFifthPassBuilder.js +3 -0
  163. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFifthPassBuilder.js.map +1 -1
  164. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFirstPassBuilder.d.ts +2 -0
  165. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFirstPassBuilder.d.ts.map +1 -1
  166. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFirstPassBuilder.js +13 -1
  167. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFirstPassBuilder.js.map +1 -1
  168. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFourthPassBuilder.d.ts +2 -0
  169. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFourthPassBuilder.d.ts.map +1 -1
  170. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFourthPassBuilder.js +3 -0
  171. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFourthPassBuilder.js.map +1 -1
  172. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts +4 -0
  173. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.d.ts.map +1 -1
  174. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js +48 -5
  175. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.js.map +1 -1
  176. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementThirdPassBuilder.d.ts +2 -0
  177. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementThirdPassBuilder.d.ts.map +1 -1
  178. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementThirdPassBuilder.js +3 -0
  179. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementThirdPassBuilder.js.map +1 -1
  180. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.d.ts +1 -1
  181. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.d.ts.map +1 -1
  182. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderExtensions.d.ts.map +1 -1
  183. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderExtensions.js +2 -0
  184. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderExtensions.js.map +1 -1
  185. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ConnectionBuilderHelper.d.ts.map +1 -1
  186. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ConnectionBuilderHelper.js +1 -0
  187. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ConnectionBuilderHelper.js.map +1 -1
  188. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.d.ts +2 -2
  189. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.d.ts.map +1 -1
  190. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.js +22 -5
  191. package/lib/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.js.map +1 -1
  192. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.d.ts.map +1 -1
  193. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js +3 -0
  194. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.js.map +1 -1
  195. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.d.ts.map +1 -1
  196. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js +1 -0
  197. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.js.map +1 -1
  198. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.d.ts +2 -0
  199. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.d.ts.map +1 -1
  200. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.js +6 -0
  201. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.js.map +1 -1
  202. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.d.ts.map +1 -1
  203. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js +45 -11
  204. package/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.js.map +1 -1
  205. package/lib/index.d.ts +8 -2
  206. package/lib/index.d.ts.map +1 -1
  207. package/lib/index.js +8 -2
  208. package/lib/index.js.map +1 -1
  209. package/lib/package.json +2 -2
  210. package/package.json +5 -5
  211. package/src/__lib__/GraphManagerEvent.ts +2 -1
  212. package/src/graph/BasicModel.ts +29 -1
  213. package/src/graph/Core_HashUtils.ts +3 -1
  214. package/src/graph/DependencyManager.ts +10 -1
  215. package/src/graph/MetaModelConst.ts +1 -0
  216. package/src/graph/PureModel.ts +21 -1
  217. package/src/graph/helpers/DomainHelper.ts +42 -1
  218. package/src/graph/helpers/PureLanguageHelper.ts +16 -8
  219. package/src/graph/metamodel/pure/packageableElements/PackageableElement.ts +5 -1
  220. package/src/graph/metamodel/pure/packageableElements/domain/PrimitiveType.ts +1 -0
  221. package/src/graph/metamodel/pure/packageableElements/{domain → function}/ConcreteFunctionDefinition.ts +4 -4
  222. package/src/graph/metamodel/pure/packageableElements/function/FunctionActivator.ts +33 -0
  223. package/src/graph/metamodel/pure/packageableElements/function/INTERNAL__UnknownFunctionActivator.ts +49 -0
  224. package/src/graph/metamodel/pure/packageableElements/mapping/INTERNAL__UnknownMappingInclude.ts +43 -0
  225. package/src/graph/metamodel/pure/packageableElements/mapping/MappingInclude.ts +5 -17
  226. package/src/graph/metamodel/pure/packageableElements/mapping/MappingIncludeMapping.ts +34 -0
  227. package/src/graph/metamodel/pure/packageableElements/mapping/SubstituteStore.ts +3 -3
  228. package/src/graph/metamodel/pure/packageableElements/store/relational/connection/RelationalDatabaseConnection.ts +7 -0
  229. package/src/graph-manager/AbstractPureGraphManager.ts +61 -46
  230. package/src/graph-manager/GraphManagerState.ts +1 -1
  231. package/src/graph-manager/action/changeDetection/CoreObserverHelper.ts +1 -1
  232. package/src/graph-manager/action/changeDetection/DSL_Data_ObserverHelper.ts +1 -1
  233. package/src/graph-manager/action/changeDetection/DSL_Mapping_ObserverHelper.ts +14 -9
  234. package/src/graph-manager/action/changeDetection/DomainObserverHelper.ts +16 -1
  235. package/src/graph-manager/action/changeDetection/GraphObserverHelper.ts +5 -0
  236. package/src/graph-manager/action/changeDetection/PackageableElementObserver.ts +9 -1
  237. package/src/graph-manager/action/changeDetection/STO_Relational_ObserverHelper.ts +4 -3
  238. package/src/graph-manager/action/functionActivator/FunctionActivatorConfiguration.ts +28 -0
  239. package/src/graph-manager/protocol/pure/extensions/DSL_Mapping_PureProtocolProcessorPlugin_Extension.ts +35 -0
  240. package/src/graph-manager/protocol/pure/v1/V1_PureGraphManager.ts +527 -422
  241. package/src/graph-manager/protocol/pure/v1/engine/V1_Engine.ts +53 -3
  242. package/src/graph-manager/protocol/pure/v1/engine/V1_EngineServerClient.ts +81 -75
  243. package/src/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorError.ts +28 -0
  244. package/src/graph-manager/protocol/pure/v1/engine/functionActivator/V1_FunctionActivatorInfo.ts +50 -0
  245. package/src/graph-manager/protocol/pure/v1/engine/{service/V1_TEMPORARY__SnowflakeServiceDeploymentInput.ts → functionActivator/V1_FunctionActivatorInput.ts} +6 -23
  246. package/src/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.ts +4 -0
  247. package/src/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_FunctionActivator.ts +25 -0
  248. package/src/graph-manager/protocol/pure/v1/model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.ts +49 -0
  249. package/src/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_INTERNAL__UnknownMappingInclude.ts +33 -0
  250. package/src/graph-manager/protocol/pure/v1/model/packageableElements/mapping/V1_MappingInclude.ts +8 -3
  251. package/src/graph-manager/protocol/pure/v1/model/packageableElements/store/relational/connection/V1_RelationalDatabaseConnection.ts +7 -0
  252. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_ConnectionTransformer.ts +1 -0
  253. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_DomainTransformer.ts +1 -1
  254. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_MappingTransformer.ts +45 -13
  255. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/from/V1_PackageableElementTransformer.ts +13 -1
  256. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFifthPassBuilder.ts +7 -0
  257. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFirstPassBuilder.ts +30 -1
  258. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementFourthPassBuilder.ts +7 -0
  259. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementSecondPassBuilder.ts +79 -10
  260. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_ElementThirdPassBuilder.ts +7 -0
  261. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderContext.ts +1 -1
  262. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/V1_GraphBuilderExtensions.ts +2 -0
  263. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_ConnectionBuilderHelper.ts +1 -0
  264. package/src/graph-manager/protocol/pure/v1/transformation/pureGraph/to/helpers/V1_MappingBuilderHelper.ts +44 -14
  265. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/V1_PackageableElementSerialization.ts +7 -0
  266. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DatabaseSerializationHelper.ts +1 -0
  267. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_DomainSerializationHelper.ts +8 -0
  268. package/src/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_MappingSerializationHelper.ts +78 -18
  269. package/src/index.ts +13 -3
  270. package/tsconfig.json +12 -2
  271. package/lib/graph/metamodel/pure/packageableElements/domain/ConcreteFunctionDefinition.d.ts.map +0 -1
  272. package/lib/graph/metamodel/pure/packageableElements/domain/ConcreteFunctionDefinition.js.map +0 -1
  273. package/lib/graph-manager/protocol/pure/v1/engine/service/V1_TEMPORARY__SnowflakeServiceDeploymentInput.d.ts.map +0 -1
  274. package/lib/graph-manager/protocol/pure/v1/engine/service/V1_TEMPORARY__SnowflakeServiceDeploymentInput.js.map +0 -1
@@ -302,10 +302,14 @@ import {
302
302
  import type { DEPRECATED__MappingTest } from '../../../../graph/metamodel/pure/packageableElements/mapping/DEPRECATED__MappingTest.js';
303
303
  import { DEPRECATED__validate_MappingTest } from '../../../action/validation/DSL_Mapping_ValidationHelper.js';
304
304
  import { V1_SERVICE_ELEMENT_PROTOCOL_TYPE } from './transformation/pureProtocol/serializationHelpers/V1_ServiceSerializationHelper.js';
305
- import { V1_TEMPORARY__SnowflakeServiceDeploymentInput } from './engine/service/V1_TEMPORARY__SnowflakeServiceDeploymentInput.js';
306
305
  import { V1_INTERNAL__UnknownPackageableElement } from './model/packageableElements/V1_INTERNAL__UnknownPackageableElement.js';
307
306
  import type { SourceInformation } from '../../../action/SourceInformation.js';
308
307
  import type { V1_SourceInformation } from './model/V1_SourceInformation.js';
308
+ import type { FunctionActivator } from '../../../../graph/metamodel/pure/packageableElements/function/FunctionActivator.js';
309
+ import { FunctionActivatorConfiguration } from '../../../action/functionActivator/FunctionActivatorConfiguration.js';
310
+ import { V1_FunctionActivatorInput } from './engine/functionActivator/V1_FunctionActivatorInput.js';
311
+ import { V1_FunctionActivator } from './model/packageableElements/function/V1_FunctionActivator.js';
312
+ import { V1_INTERNAL__UnknownFunctionActivator } from './model/packageableElements/function/V1_INTERNAL__UnknownFunctionActivator.js';
309
313
 
310
314
  class V1_PureModelContextDataIndex {
311
315
  elements: V1_PackageableElement[] = [];
@@ -315,6 +319,7 @@ class V1_PureModelContextDataIndex {
315
319
  classes: V1_Class[] = [];
316
320
  enumerations: V1_Enumeration[] = [];
317
321
  functions: V1_ConcreteFunctionDefinition[] = [];
322
+ functionActivators: V1_FunctionActivator[] = [];
318
323
  profiles: V1_Profile[] = [];
319
324
  measures: V1_Measure[] = [];
320
325
 
@@ -383,6 +388,8 @@ export const V1_indexPureModelContextData = (
383
388
  index.enumerations.push(el);
384
389
  } else if (el instanceof V1_ConcreteFunctionDefinition) {
385
390
  index.functions.push(el);
391
+ } else if (el instanceof V1_FunctionActivator) {
392
+ index.functionActivators.push(el);
386
393
  } else if (el instanceof V1_Profile) {
387
394
  index.profiles.push(el);
388
395
  } else if (el instanceof V1_Measure) {
@@ -448,6 +455,9 @@ export const V1_indexPureModelContextData = (
448
455
  (report.elementCount.enumeration ?? 0) + index.enumerations.length;
449
456
  report.elementCount.function =
450
457
  (report.elementCount.function ?? 0) + index.functions.length;
458
+ report.elementCount.functionActivators =
459
+ (report.elementCount.functionActivators ?? 0) +
460
+ index.functionActivators.length;
451
461
  report.elementCount.profile =
452
462
  (report.elementCount.profile ?? 0) + index.profiles.length;
453
463
  report.elementCount.measure =
@@ -1050,6 +1060,13 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
1050
1060
  GRAPH_MANAGER_EVENT.GRAPH_BUILDER_BUILD_CONNECTIONS_AND_RUNTIMES__SUCCESS,
1051
1061
  );
1052
1062
 
1063
+ // build function activators
1064
+ graphBuilderState.setMessage(`Building function activators...`);
1065
+ await this.buildFunctionActivators(graph, inputs, options);
1066
+ stopWatch.record(
1067
+ GRAPH_MANAGER_EVENT.GRAPH_BUILDER_BUILD_DOMAIN_MODELS__SUCCESS,
1068
+ );
1069
+
1053
1070
  // build services
1054
1071
  graphBuilderState.setMessage(
1055
1072
  `Building services and execution environments...`,
@@ -1302,6 +1319,25 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
1302
1319
  );
1303
1320
  }
1304
1321
 
1322
+ private async buildFunctionActivators(
1323
+ graph: PureModel,
1324
+ inputs: V1_PureGraphBuilderInput[],
1325
+ options?: GraphBuilderOptions,
1326
+ ): Promise<void> {
1327
+ await Promise.all(
1328
+ inputs.flatMap((input) =>
1329
+ input.data.functionActivators.map((element) =>
1330
+ this.visitWithGraphBuilderErrorHandling(
1331
+ element,
1332
+ new V1_ElementSecondPassBuilder(
1333
+ this.getBuilderContext(graph, input.model, element, options),
1334
+ ),
1335
+ ),
1336
+ ),
1337
+ ),
1338
+ );
1339
+ }
1340
+
1305
1341
  private async buildStores(
1306
1342
  graph: PureModel,
1307
1343
  inputs: V1_PureGraphBuilderInput[],
@@ -2296,6 +2332,23 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
2296
2332
 
2297
2333
  // --------------------------------------------- Execution ---------------------------------------------
2298
2334
 
2335
+ private prepareExecutionContextGraphData(
2336
+ graphData: GraphData,
2337
+ ): V1_PureModelContext {
2338
+ if (graphData instanceof InMemoryGraphData) {
2339
+ return this.buildExecutionInputGraphData(graphData.graph);
2340
+ } else if (graphData instanceof GraphDataWithOrigin) {
2341
+ return this.buildPureModelSDLCPointer(
2342
+ graphData.origin,
2343
+ V1_PureGraphManager.PROD_PROTOCOL_VERSION,
2344
+ );
2345
+ }
2346
+ throw new UnsupportedOperationError(
2347
+ `Can't build Pure model context from unsupported graph data`,
2348
+ graphData,
2349
+ );
2350
+ }
2351
+
2299
2352
  public createExecutionInput = (
2300
2353
  graph: PureModel,
2301
2354
  mapping: Mapping | undefined,
@@ -2378,6 +2431,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
2378
2431
  element instanceof V1_Profile ||
2379
2432
  element instanceof V1_Association ||
2380
2433
  element instanceof V1_ConcreteFunctionDefinition ||
2434
+ element instanceof V1_FunctionActivator ||
2381
2435
  element instanceof V1_Measure ||
2382
2436
  element instanceof V1_Store ||
2383
2437
  element instanceof V1_PackageableConnection ||
@@ -2663,175 +2717,487 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
2663
2717
  );
2664
2718
  }
2665
2719
 
2666
- // --------------------------------------------- Service ---------------------------------------------
2720
+ // --------------------------------------------- Query ---------------------------------------------
2667
2721
 
2668
- async registerService(
2669
- service: Service,
2670
- graph: PureModel,
2671
- groupId: string,
2672
- artifactId: string,
2673
- version: string | undefined,
2674
- server: string,
2675
- executionMode: ServiceExecutionMode,
2676
- options?: ServiceRegistrationOptions,
2677
- ): Promise<ServiceRegistrationSuccess> {
2678
- const serverServiceInfo = await this.engine.getServerServiceInfo();
2679
- // input
2680
- let input: V1_PureModelContext;
2681
- const protocol = new V1_Protocol(
2682
- V1_PureGraphManager.PURE_PROTOCOL_NAME,
2683
- serverServiceInfo.services.dependencies.pure,
2722
+ async searchQueries(
2723
+ searchSpecification: QuerySearchSpecification,
2724
+ ): Promise<LightQuery[]> {
2725
+ return (
2726
+ await this.engine.searchQueries(
2727
+ V1_transformQuerySearchSpecification(searchSpecification),
2728
+ )
2729
+ ).map((protocol) =>
2730
+ V1_buildLightQuery(protocol, this.engine.getCurrentUserId()),
2684
2731
  );
2685
- switch (executionMode) {
2686
- case ServiceExecutionMode.FULL_INTERACTIVE: {
2687
- const data = this.createServiceRegistrationInputGraphData(graph);
2688
- data.elements.push(this.elementToProtocol<V1_Service>(service));
2689
- data.origin = new V1_PureModelContextPointer(protocol);
2690
- input = data;
2691
- break;
2692
- }
2693
- case ServiceExecutionMode.SEMI_INTERACTIVE: {
2694
- const sdlcInfo = new V1_LegendSDLC(groupId, artifactId, version);
2695
- const pointer = new V1_PureModelContextPointer(protocol, sdlcInfo);
2732
+ }
2696
2733
 
2697
- // data
2698
- const data = new V1_PureModelContextData();
2699
- data.origin = new V1_PureModelContextPointer(protocol);
2700
- const serviceProtocol = this.elementToProtocol<V1_Service>(service);
2734
+ async getQueries(queryIds: string[]): Promise<LightQuery[]> {
2735
+ return (await this.engine.getQueries(queryIds)).map((protocol) =>
2736
+ V1_buildLightQuery(protocol, this.engine.getCurrentUserId()),
2737
+ );
2738
+ }
2701
2739
 
2702
- // override the URL pattern if specified
2703
- if (options?.TEMPORARY__semiInteractiveOverridePattern) {
2704
- serviceProtocol.pattern =
2705
- options.TEMPORARY__semiInteractiveOverridePattern;
2706
- }
2740
+ async getLightQuery(queryId: string): Promise<LightQuery> {
2741
+ return V1_buildLightQuery(
2742
+ await this.engine.getQuery(queryId),
2743
+ this.engine.getCurrentUserId(),
2744
+ );
2745
+ }
2707
2746
 
2708
- data.elements = [serviceProtocol];
2747
+ async getQuery(queryId: string, graph: PureModel): Promise<Query> {
2748
+ return V1_buildQuery(
2749
+ await this.engine.getQuery(queryId),
2750
+ graph,
2751
+ this.engine.getCurrentUserId(),
2752
+ );
2753
+ }
2709
2754
 
2710
- // SDLC info
2711
- // TODO: We may need to add `runtime` pointers if the runtime defned in the service is a packageable runtime
2712
- // and not embedded.
2713
- const execution = service.execution;
2714
- if (execution instanceof PureSingleExecution) {
2715
- if (execution.mapping) {
2716
- sdlcInfo.packageableElementPointers = [
2717
- new V1_PackageableElementPointer(
2718
- PackageableElementPointerType.MAPPING,
2719
- execution.mapping.value.path,
2720
- ),
2721
- ];
2722
- }
2723
- } else if (execution instanceof PureMultiExecution) {
2724
- sdlcInfo.packageableElementPointers =
2725
- execution.executionParameters.map(
2726
- (e) =>
2727
- new V1_PackageableElementPointer(
2728
- PackageableElementPointerType.MAPPING,
2729
- e.mapping.value.path,
2730
- ),
2731
- );
2732
- } else {
2733
- throw new UnsupportedOperationError(
2734
- `Can't register service with the specified execution`,
2735
- execution,
2736
- );
2737
- }
2738
- // composite input
2739
- input = new V1_PureModelContextComposite(protocol, data, pointer);
2740
- break;
2741
- }
2742
- case ServiceExecutionMode.PROD: {
2743
- const sdlcInfo = new V1_LegendSDLC(groupId, artifactId, version);
2744
- const pointer = new V1_PureModelContextPointer(protocol, sdlcInfo);
2745
- sdlcInfo.packageableElementPointers = [
2746
- new V1_PackageableElementPointer(
2747
- PackageableElementPointerType.SERVICE,
2748
- service.path,
2749
- ),
2750
- ];
2751
- input = pointer;
2752
- break;
2753
- }
2754
- default: {
2755
- throw new UnsupportedOperationError(
2756
- `Can't register service with execution mode '${executionMode}'`,
2757
- );
2758
- }
2759
- }
2760
- return V1_buildServiceRegistrationSuccess(
2761
- service,
2762
- await this.engine.registerService(
2763
- input,
2764
- server,
2765
- executionMode,
2766
- Boolean(options?.TEMPORARY__useStoreModel),
2767
- Boolean(options?.TEMPORARY__useGenerateLineage),
2768
- ),
2755
+ async getQueryInfo(queryId: string): Promise<QueryInfo> {
2756
+ const query = await this.engine.getQuery(queryId);
2757
+ return {
2758
+ name: query.name,
2759
+ id: query.id,
2760
+ versionId: query.versionId,
2761
+ groupId: query.groupId,
2762
+ artifactId: query.artifactId,
2763
+ mapping: query.mapping,
2764
+ runtime: query.runtime,
2765
+ content: query.content,
2766
+ };
2767
+ }
2768
+
2769
+ async createQuery(query: Query, graph: PureModel): Promise<Query> {
2770
+ return V1_buildQuery(
2771
+ await this.engine.createQuery(V1_transformQuery(query)),
2772
+ graph,
2773
+ this.engine.getCurrentUserId(),
2769
2774
  );
2770
2775
  }
2771
2776
 
2772
- async bulkServiceRegistration(
2773
- services: Service[],
2774
- graph: PureModel,
2775
- groupId: string,
2776
- artifactId: string,
2777
- version: string | undefined,
2778
- server: string,
2779
- executionMode: ServiceExecutionMode,
2780
- options?: ServiceRegistrationOptions,
2781
- ): Promise<ServiceRegistrationResult[]> {
2782
- const serverServiceInfo = await this.engine.getServerServiceInfo();
2783
- const input: ServiceRegistrationInput[] = [];
2777
+ async updateQuery(query: Query, graph: PureModel): Promise<Query> {
2778
+ return V1_buildQuery(
2779
+ await this.engine.updateQuery(V1_transformQuery(query)),
2780
+ graph,
2781
+ this.engine.getCurrentUserId(),
2782
+ );
2783
+ }
2784
2784
 
2785
- const protocol = new V1_Protocol(
2786
- V1_PureGraphManager.PURE_PROTOCOL_NAME,
2787
- serverServiceInfo.services.dependencies.pure,
2785
+ async renameQuery(queryId: string, queryName: string): Promise<LightQuery> {
2786
+ const query = await this.engine.getQuery(queryId);
2787
+ query.name = queryName;
2788
+ return V1_buildLightQuery(
2789
+ await this.engine.updateQuery(query),
2790
+ this.engine.getCurrentUserId(),
2788
2791
  );
2789
- switch (executionMode) {
2790
- case ServiceExecutionMode.FULL_INTERACTIVE: {
2791
- const pmcp = this.createBulkServiceRegistrationInput(graph, services);
2792
- pmcp.forEach((data) => {
2793
- const pmcd = data.context as V1_PureModelContextData;
2794
- pmcd.origin = new V1_PureModelContextPointer(protocol);
2795
- input.push({ service: data.service, context: pmcd });
2796
- });
2797
- break;
2798
- }
2799
- case ServiceExecutionMode.SEMI_INTERACTIVE: {
2800
- services.forEach((service) => {
2801
- const sdlcInfo = new V1_LegendSDLC(groupId, artifactId, version);
2802
- const pointer = new V1_PureModelContextPointer(protocol, sdlcInfo);
2803
- // data
2804
- const data = new V1_PureModelContextData();
2805
- data.origin = new V1_PureModelContextPointer(protocol);
2806
- const serviceProtocol = this.elementToProtocol<V1_Service>(service);
2792
+ }
2807
2793
 
2808
- // override the URL pattern if specified
2809
- if (options?.TEMPORARY__semiInteractiveOverridePattern) {
2810
- serviceProtocol.pattern =
2811
- options.TEMPORARY__semiInteractiveOverridePattern;
2812
- }
2794
+ async deleteQuery(queryId: string): Promise<LightQuery> {
2795
+ return V1_buildLightQuery(
2796
+ await this.engine.deleteQuery(queryId),
2797
+ this.engine.getCurrentUserId(),
2798
+ );
2799
+ }
2813
2800
 
2814
- data.elements = [serviceProtocol];
2801
+ // --------------------------------------------- Analysis ---------------------------------------------
2815
2802
 
2816
- // SDLC info
2817
- // TODO: We may need to add `runtime` pointers if the runtime defned in the service is a packageable runtime
2818
- // and not embedded.
2819
- const execution = service.execution;
2820
- if (execution instanceof PureSingleExecution) {
2821
- if (execution.mapping) {
2822
- sdlcInfo.packageableElementPointers = [
2823
- new V1_PackageableElementPointer(
2824
- PackageableElementPointerType.MAPPING,
2825
- execution.mapping.value.path,
2826
- ),
2827
- ];
2828
- }
2829
- } else if (execution instanceof PureMultiExecution) {
2830
- sdlcInfo.packageableElementPointers =
2831
- execution.executionParameters.map(
2832
- (e) =>
2833
- new V1_PackageableElementPointer(
2834
- PackageableElementPointerType.MAPPING,
2803
+ async analyzeMappingModelCoverage(
2804
+ mapping: Mapping,
2805
+ graph: PureModel,
2806
+ ): Promise<MappingModelCoverageAnalysisResult> {
2807
+ const input = new V1_MappingModelCoverageAnalysisInput();
2808
+ input.clientVersion = V1_PureGraphManager.DEV_PROTOCOL_VERSION;
2809
+ input.mapping = mapping.path;
2810
+ input.model = graph.origin
2811
+ ? this.buildPureModelSDLCPointer(graph.origin, undefined)
2812
+ : this.buildExecutionInputGraphData(graph);
2813
+ return V1_buildModelCoverageAnalysisResult(
2814
+ await this.engine.analyzeMappingModelCoverage(input),
2815
+ mapping,
2816
+ );
2817
+ }
2818
+
2819
+ buildMappingModelCoverageAnalysisResult(
2820
+ input: RawMappingModelCoverageAnalysisResult,
2821
+ mapping: Mapping,
2822
+ ): MappingModelCoverageAnalysisResult {
2823
+ return V1_buildModelCoverageAnalysisResult(
2824
+ deserialize(
2825
+ V1_MappingModelCoverageAnalysisResult,
2826
+ input as PlainObject<V1_MappingModelCoverageAnalysisResult>,
2827
+ ),
2828
+ mapping,
2829
+ );
2830
+ }
2831
+
2832
+ generateStoreEntitlementAnalysisInput(
2833
+ mapping: string,
2834
+ runtime: string,
2835
+ query: RawLambda | undefined,
2836
+ graphData: GraphData,
2837
+ ): V1_StoreEntitlementAnalysisInput {
2838
+ const input = new V1_StoreEntitlementAnalysisInput();
2839
+ input.clientVersion = V1_PureGraphManager.PROD_PROTOCOL_VERSION;
2840
+ input.mapping = mapping;
2841
+ input.runtime = runtime;
2842
+ input.query = query
2843
+ ? V1_transformRawLambda(
2844
+ query,
2845
+ new V1_GraphTransformerContextBuilder(
2846
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2847
+ ).build(),
2848
+ )
2849
+ : undefined;
2850
+ input.model = this.prepareExecutionContextGraphData(graphData);
2851
+ return input;
2852
+ }
2853
+
2854
+ async surveyDatasets(
2855
+ mapping: string,
2856
+ runtime: string,
2857
+ query: RawLambda | undefined,
2858
+ graphData: GraphData,
2859
+ ): Promise<DatasetSpecification[]> {
2860
+ return (
2861
+ await this.engine.surveyDatasets(
2862
+ this.generateStoreEntitlementAnalysisInput(
2863
+ mapping,
2864
+ runtime,
2865
+ query,
2866
+ graphData,
2867
+ ),
2868
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2869
+ )
2870
+ ).map((dataset) =>
2871
+ V1_buildDatasetSpecification(
2872
+ dataset,
2873
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2874
+ ),
2875
+ );
2876
+ }
2877
+
2878
+ async checkDatasetEntitlements(
2879
+ datasets: DatasetSpecification[],
2880
+ mapping: string,
2881
+ runtime: string,
2882
+ query: RawLambda | undefined,
2883
+ graphData: GraphData,
2884
+ ): Promise<DatasetEntitlementReport[]> {
2885
+ const input = new V1_EntitlementReportAnalyticsInput();
2886
+ input.storeEntitlementAnalyticsInput =
2887
+ this.generateStoreEntitlementAnalysisInput(
2888
+ mapping,
2889
+ runtime,
2890
+ query,
2891
+ graphData,
2892
+ );
2893
+ input.reports = datasets.map((dataset) =>
2894
+ V1_transformDatasetSpecification(
2895
+ dataset,
2896
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2897
+ ),
2898
+ );
2899
+ return (
2900
+ await this.engine.checkDatasetEntitlements(
2901
+ input,
2902
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2903
+ )
2904
+ ).map((report) =>
2905
+ V1_buildDatasetEntitlementReport(
2906
+ report,
2907
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2908
+ ),
2909
+ );
2910
+ }
2911
+
2912
+ async buildDatabase(input: DatabaseBuilderInput): Promise<Entity[]> {
2913
+ const dbBuilderInput = new V1_DatabaseBuilderInput();
2914
+ dbBuilderInput.connection = V1_transformRelationalDatabaseConnection(
2915
+ input.connection,
2916
+ new V1_GraphTransformerContextBuilder(
2917
+ this.pluginManager.getPureProtocolProcessorPlugins(),
2918
+ ).build(),
2919
+ );
2920
+ const targetDatabase = new V1_TargetDatabase();
2921
+ targetDatabase.package = input.targetDatabase.package;
2922
+ targetDatabase.name = input.targetDatabase.name;
2923
+ dbBuilderInput.targetDatabase = targetDatabase;
2924
+ const config = new V1_DatabaseBuilderConfig();
2925
+ config.maxTables = input.config.maxTables;
2926
+ config.enrichTables = input.config.enrichTables;
2927
+ config.enrichPrimaryKeys = input.config.enrichPrimaryKeys;
2928
+ config.enrichColumns = input.config.enrichColumns;
2929
+ config.patterns = input.config.patterns.map(
2930
+ (storePattern: DatabasePattern): V1_DatabasePattern => {
2931
+ const pattern = new V1_DatabasePattern();
2932
+ pattern.schemaPattern = storePattern.schemaPattern;
2933
+ pattern.tablePattern = storePattern.tablePattern;
2934
+ pattern.escapeSchemaPattern = storePattern.escapeSchemaPattern;
2935
+ pattern.escapeTablePattern = storePattern.escapeTablePattern;
2936
+ return pattern;
2937
+ },
2938
+ );
2939
+ dbBuilderInput.config = config;
2940
+ return this.pureModelContextDataToEntities(
2941
+ await this.engine.buildDatabase(dbBuilderInput),
2942
+ );
2943
+ }
2944
+
2945
+ // --------------------------------------------- Function ---------------------------------------------
2946
+
2947
+ async getAvailableFunctionActivatorConfigurations(
2948
+ coreModel: CoreModel,
2949
+ systemModel: SystemModel,
2950
+ ): Promise<FunctionActivatorConfiguration[]> {
2951
+ return (
2952
+ await Promise.all(
2953
+ (
2954
+ await this.engine.getAvailableFunctionActivators()
2955
+ ).map(async (info) => {
2956
+ try {
2957
+ const config = new FunctionActivatorConfiguration();
2958
+ config.name = info.name;
2959
+ config.description = info.description;
2960
+ config.packageableElementJSONType =
2961
+ info.configuration.packageableElementJSONType;
2962
+
2963
+ // build the mini graph for configuration
2964
+ const graph = new PureModel(
2965
+ coreModel,
2966
+ systemModel,
2967
+ this.pluginManager.getPureGraphPlugins(),
2968
+ );
2969
+ const _report = createGraphBuilderReport();
2970
+ const _stopWatch = new StopWatch();
2971
+ const _buildState = ActionState.create();
2972
+ const data = new V1_PureModelContextData();
2973
+ data.elements = info.configuration.model;
2974
+ const buildInputs: V1_PureGraphBuilderInput[] = [
2975
+ {
2976
+ model: graph,
2977
+ data: V1_indexPureModelContextData(
2978
+ _report,
2979
+ data,
2980
+ this.graphBuilderExtensions,
2981
+ ),
2982
+ },
2983
+ ];
2984
+ await this.buildGraphFromInputs(
2985
+ graph,
2986
+ buildInputs,
2987
+ _report,
2988
+ _stopWatch,
2989
+ _buildState,
2990
+ {},
2991
+ );
2992
+ config.graph = graph;
2993
+ config.configurationType = graph.getClass(
2994
+ info.configuration.topElement,
2995
+ );
2996
+ return config;
2997
+ } catch (error) {
2998
+ assertErrorThrown(error);
2999
+ this.logService.warn(
3000
+ LogEvent.create(GRAPH_MANAGER_EVENT.GRAPH_MANAGER_FAILURE),
3001
+ `Can't build function activator config: ${error.message}`,
3002
+ );
3003
+ return undefined;
3004
+ }
3005
+ }),
3006
+ )
3007
+ ).filter(isNonNullable);
3008
+ }
3009
+
3010
+ async validateFunctionActivator(
3011
+ functionActivator: FunctionActivator,
3012
+ graphData: GraphData,
3013
+ ): Promise<void> {
3014
+ const input = new V1_FunctionActivatorInput();
3015
+ input.clientVersion = V1_PureGraphManager.PROD_PROTOCOL_VERSION;
3016
+ input.functionActivator = functionActivator.path;
3017
+ input.model = this.prepareExecutionContextGraphData(graphData);
3018
+ await this.engine.validateFunctionActivator(input);
3019
+ }
3020
+
3021
+ async publishFunctionActivatorToSandbox(
3022
+ functionActivator: FunctionActivator,
3023
+ graphData: GraphData,
3024
+ ): Promise<void> {
3025
+ const input = new V1_FunctionActivatorInput();
3026
+ input.clientVersion = V1_PureGraphManager.PROD_PROTOCOL_VERSION;
3027
+ input.functionActivator = functionActivator.path;
3028
+ input.model = this.prepareExecutionContextGraphData(graphData);
3029
+ await this.engine.publishFunctionActivatorToSandbox(input);
3030
+ }
3031
+
3032
+ // --------------------------------------------- Service ---------------------------------------------
3033
+
3034
+ async registerService(
3035
+ service: Service,
3036
+ graph: PureModel,
3037
+ groupId: string,
3038
+ artifactId: string,
3039
+ version: string | undefined,
3040
+ server: string,
3041
+ executionMode: ServiceExecutionMode,
3042
+ options?: ServiceRegistrationOptions,
3043
+ ): Promise<ServiceRegistrationSuccess> {
3044
+ const serverServiceInfo = await this.engine.getServerServiceInfo();
3045
+ // input
3046
+ let input: V1_PureModelContext;
3047
+ const protocol = new V1_Protocol(
3048
+ V1_PureGraphManager.PURE_PROTOCOL_NAME,
3049
+ serverServiceInfo.services.dependencies.pure,
3050
+ );
3051
+ switch (executionMode) {
3052
+ case ServiceExecutionMode.FULL_INTERACTIVE: {
3053
+ const data = this.createServiceRegistrationInputGraphData(graph);
3054
+ data.elements.push(this.elementToProtocol<V1_Service>(service));
3055
+ data.origin = new V1_PureModelContextPointer(protocol);
3056
+ input = data;
3057
+ break;
3058
+ }
3059
+ case ServiceExecutionMode.SEMI_INTERACTIVE: {
3060
+ const sdlcInfo = new V1_LegendSDLC(groupId, artifactId, version);
3061
+ const pointer = new V1_PureModelContextPointer(protocol, sdlcInfo);
3062
+
3063
+ // data
3064
+ const data = new V1_PureModelContextData();
3065
+ data.origin = new V1_PureModelContextPointer(protocol);
3066
+ const serviceProtocol = this.elementToProtocol<V1_Service>(service);
3067
+
3068
+ // override the URL pattern if specified
3069
+ if (options?.TEMPORARY__semiInteractiveOverridePattern) {
3070
+ serviceProtocol.pattern =
3071
+ options.TEMPORARY__semiInteractiveOverridePattern;
3072
+ }
3073
+
3074
+ data.elements = [serviceProtocol];
3075
+
3076
+ // SDLC info
3077
+ // TODO: We may need to add `runtime` pointers if the runtime defned in the service is a packageable runtime
3078
+ // and not embedded.
3079
+ const execution = service.execution;
3080
+ if (execution instanceof PureSingleExecution) {
3081
+ if (execution.mapping) {
3082
+ sdlcInfo.packageableElementPointers = [
3083
+ new V1_PackageableElementPointer(
3084
+ PackageableElementPointerType.MAPPING,
3085
+ execution.mapping.value.path,
3086
+ ),
3087
+ ];
3088
+ }
3089
+ } else if (execution instanceof PureMultiExecution) {
3090
+ sdlcInfo.packageableElementPointers =
3091
+ execution.executionParameters.map(
3092
+ (e) =>
3093
+ new V1_PackageableElementPointer(
3094
+ PackageableElementPointerType.MAPPING,
3095
+ e.mapping.value.path,
3096
+ ),
3097
+ );
3098
+ } else {
3099
+ throw new UnsupportedOperationError(
3100
+ `Can't register service with the specified execution`,
3101
+ execution,
3102
+ );
3103
+ }
3104
+ // composite input
3105
+ input = new V1_PureModelContextComposite(protocol, data, pointer);
3106
+ break;
3107
+ }
3108
+ case ServiceExecutionMode.PROD: {
3109
+ const sdlcInfo = new V1_LegendSDLC(groupId, artifactId, version);
3110
+ const pointer = new V1_PureModelContextPointer(protocol, sdlcInfo);
3111
+ sdlcInfo.packageableElementPointers = [
3112
+ new V1_PackageableElementPointer(
3113
+ PackageableElementPointerType.SERVICE,
3114
+ service.path,
3115
+ ),
3116
+ ];
3117
+ input = pointer;
3118
+ break;
3119
+ }
3120
+ default: {
3121
+ throw new UnsupportedOperationError(
3122
+ `Can't register service with execution mode '${executionMode}'`,
3123
+ );
3124
+ }
3125
+ }
3126
+ return V1_buildServiceRegistrationSuccess(
3127
+ service,
3128
+ await this.engine.registerService(
3129
+ input,
3130
+ server,
3131
+ executionMode,
3132
+ Boolean(options?.TEMPORARY__useStoreModel),
3133
+ Boolean(options?.TEMPORARY__useGenerateLineage),
3134
+ ),
3135
+ );
3136
+ }
3137
+
3138
+ async bulkServiceRegistration(
3139
+ services: Service[],
3140
+ graph: PureModel,
3141
+ groupId: string,
3142
+ artifactId: string,
3143
+ version: string | undefined,
3144
+ server: string,
3145
+ executionMode: ServiceExecutionMode,
3146
+ options?: ServiceRegistrationOptions,
3147
+ ): Promise<ServiceRegistrationResult[]> {
3148
+ const serverServiceInfo = await this.engine.getServerServiceInfo();
3149
+ const input: ServiceRegistrationInput[] = [];
3150
+
3151
+ const protocol = new V1_Protocol(
3152
+ V1_PureGraphManager.PURE_PROTOCOL_NAME,
3153
+ serverServiceInfo.services.dependencies.pure,
3154
+ );
3155
+ switch (executionMode) {
3156
+ case ServiceExecutionMode.FULL_INTERACTIVE: {
3157
+ const pmcp = this.createBulkServiceRegistrationInput(graph, services);
3158
+ pmcp.forEach((data) => {
3159
+ const pmcd = data.context as V1_PureModelContextData;
3160
+ pmcd.origin = new V1_PureModelContextPointer(protocol);
3161
+ input.push({ service: data.service, context: pmcd });
3162
+ });
3163
+ break;
3164
+ }
3165
+ case ServiceExecutionMode.SEMI_INTERACTIVE: {
3166
+ services.forEach((service) => {
3167
+ const sdlcInfo = new V1_LegendSDLC(groupId, artifactId, version);
3168
+ const pointer = new V1_PureModelContextPointer(protocol, sdlcInfo);
3169
+ // data
3170
+ const data = new V1_PureModelContextData();
3171
+ data.origin = new V1_PureModelContextPointer(protocol);
3172
+ const serviceProtocol = this.elementToProtocol<V1_Service>(service);
3173
+
3174
+ // override the URL pattern if specified
3175
+ if (options?.TEMPORARY__semiInteractiveOverridePattern) {
3176
+ serviceProtocol.pattern =
3177
+ options.TEMPORARY__semiInteractiveOverridePattern;
3178
+ }
3179
+
3180
+ data.elements = [serviceProtocol];
3181
+
3182
+ // SDLC info
3183
+ // TODO: We may need to add `runtime` pointers if the runtime defned in the service is a packageable runtime
3184
+ // and not embedded.
3185
+ const execution = service.execution;
3186
+ if (execution instanceof PureSingleExecution) {
3187
+ if (execution.mapping) {
3188
+ sdlcInfo.packageableElementPointers = [
3189
+ new V1_PackageableElementPointer(
3190
+ PackageableElementPointerType.MAPPING,
3191
+ execution.mapping.value.path,
3192
+ ),
3193
+ ];
3194
+ }
3195
+ } else if (execution instanceof PureMultiExecution) {
3196
+ sdlcInfo.packageableElementPointers =
3197
+ execution.executionParameters.map(
3198
+ (e) =>
3199
+ new V1_PackageableElementPointer(
3200
+ PackageableElementPointerType.MAPPING,
2835
3201
  e.mapping.value.path,
2836
3202
  ),
2837
3203
  );
@@ -2954,111 +3320,6 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
2954
3320
  });
2955
3321
  return results;
2956
3322
  };
2957
- async TEMPORARY__deploySnowflakeService(
2958
- query: RawLambda,
2959
- graph: PureModel,
2960
- ): Promise<PlainObject> {
2961
- const input = new V1_TEMPORARY__SnowflakeServiceDeploymentInput();
2962
- input.clientVersion = V1_PureGraphManager.PROD_PROTOCOL_VERSION;
2963
- input.query = V1_transformRawLambda(
2964
- query,
2965
- new V1_GraphTransformerContextBuilder(
2966
- this.pluginManager.getPureProtocolProcessorPlugins(),
2967
- ).build(),
2968
- );
2969
- input.model = graph.origin
2970
- ? this.buildPureModelSDLCPointer(graph.origin, undefined)
2971
- : this.buildExecutionInputGraphData(graph);
2972
- return this.engine
2973
- .getEngineServerClient()
2974
- .TEMPORARY__deploySnowflakeService(
2975
- V1_TEMPORARY__SnowflakeServiceDeploymentInput.serialization.toJson(
2976
- input,
2977
- ),
2978
- );
2979
- }
2980
- // -----------------------------/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html---------------- Query ---------------------------------------------
2981
-
2982
- async searchQueries(
2983
- searchSpecification: QuerySearchSpecification,
2984
- ): Promise<LightQuery[]> {
2985
- return (
2986
- await this.engine.searchQueries(
2987
- V1_transformQuerySearchSpecification(searchSpecification),
2988
- )
2989
- ).map((protocol) =>
2990
- V1_buildLightQuery(protocol, this.engine.getCurrentUserId()),
2991
- );
2992
- }
2993
-
2994
- async getQueries(queryIds: string[]): Promise<LightQuery[]> {
2995
- return (await this.engine.getQueries(queryIds)).map((protocol) =>
2996
- V1_buildLightQuery(protocol, this.engine.getCurrentUserId()),
2997
- );
2998
- }
2999
-
3000
- async getLightQuery(queryId: string): Promise<LightQuery> {
3001
- return V1_buildLightQuery(
3002
- await this.engine.getQuery(queryId),
3003
- this.engine.getCurrentUserId(),
3004
- );
3005
- }
3006
-
3007
- // --------------------------------------------- Query ------------------------------------------------------
3008
-
3009
- async getQuery(queryId: string, graph: PureModel): Promise<Query> {
3010
- return V1_buildQuery(
3011
- await this.engine.getQuery(queryId),
3012
- graph,
3013
- this.engine.getCurrentUserId(),
3014
- );
3015
- }
3016
-
3017
- async getQueryInfo(queryId: string): Promise<QueryInfo> {
3018
- const query = await this.engine.getQuery(queryId);
3019
- return {
3020
- name: query.name,
3021
- id: query.id,
3022
- versionId: query.versionId,
3023
- groupId: query.groupId,
3024
- artifactId: query.artifactId,
3025
- mapping: query.mapping,
3026
- runtime: query.runtime,
3027
- content: query.content,
3028
- };
3029
- }
3030
-
3031
- async createQuery(query: Query, graph: PureModel): Promise<Query> {
3032
- return V1_buildQuery(
3033
- await this.engine.createQuery(V1_transformQuery(query)),
3034
- graph,
3035
- this.engine.getCurrentUserId(),
3036
- );
3037
- }
3038
-
3039
- async updateQuery(query: Query, graph: PureModel): Promise<Query> {
3040
- return V1_buildQuery(
3041
- await this.engine.updateQuery(V1_transformQuery(query)),
3042
- graph,
3043
- this.engine.getCurrentUserId(),
3044
- );
3045
- }
3046
-
3047
- async renameQuery(queryId: string, queryName: string): Promise<LightQuery> {
3048
- const query = await this.engine.getQuery(queryId);
3049
- query.name = queryName;
3050
- return V1_buildLightQuery(
3051
- await this.engine.updateQuery(query),
3052
- this.engine.getCurrentUserId(),
3053
- );
3054
- }
3055
-
3056
- async deleteQuery(queryId: string): Promise<LightQuery> {
3057
- return V1_buildLightQuery(
3058
- await this.engine.deleteQuery(queryId),
3059
- this.engine.getCurrentUserId(),
3060
- );
3061
- }
3062
3323
 
3063
3324
  async cancelUserExecutions(broadcastToCluster: boolean): Promise<string> {
3064
3325
  return this.engine.cancelUserExecutions(broadcastToCluster);
@@ -3108,164 +3369,7 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
3108
3369
  return hashMap;
3109
3370
  }
3110
3371
 
3111
- async analyzeMappingModelCoverage(
3112
- mapping: Mapping,
3113
- graph: PureModel,
3114
- ): Promise<MappingModelCoverageAnalysisResult> {
3115
- const input = new V1_MappingModelCoverageAnalysisInput();
3116
- input.clientVersion = V1_PureGraphManager.DEV_PROTOCOL_VERSION;
3117
- input.mapping = mapping.path;
3118
- input.model = graph.origin
3119
- ? this.buildPureModelSDLCPointer(graph.origin, undefined)
3120
- : this.buildExecutionInputGraphData(graph);
3121
- return V1_buildModelCoverageAnalysisResult(
3122
- await this.engine.analyzeMappingModelCoverage(input),
3123
- mapping,
3124
- );
3125
- }
3126
-
3127
- buildMappingModelCoverageAnalysisResult(
3128
- input: RawMappingModelCoverageAnalysisResult,
3129
- mapping: Mapping,
3130
- ): MappingModelCoverageAnalysisResult {
3131
- return V1_buildModelCoverageAnalysisResult(
3132
- deserialize(
3133
- V1_MappingModelCoverageAnalysisResult,
3134
- input as PlainObject<V1_MappingModelCoverageAnalysisResult>,
3135
- ),
3136
- mapping,
3137
- );
3138
- }
3139
-
3140
- generateStoreEntitlementAnalysisInput(
3141
- mapping: string,
3142
- runtime: string,
3143
- query: RawLambda | undefined,
3144
- graphData: GraphData,
3145
- ): V1_StoreEntitlementAnalysisInput {
3146
- const input = new V1_StoreEntitlementAnalysisInput();
3147
- input.clientVersion = V1_PureGraphManager.PROD_PROTOCOL_VERSION;
3148
- input.mapping = mapping;
3149
- input.runtime = runtime;
3150
- input.query = query
3151
- ? V1_transformRawLambda(
3152
- query,
3153
- new V1_GraphTransformerContextBuilder(
3154
- this.pluginManager.getPureProtocolProcessorPlugins(),
3155
- ).build(),
3156
- )
3157
- : undefined;
3158
-
3159
- if (graphData instanceof InMemoryGraphData) {
3160
- input.model = this.buildExecutionInputGraphData(graphData.graph);
3161
- } else if (graphData instanceof GraphDataWithOrigin) {
3162
- input.model = this.buildPureModelSDLCPointer(
3163
- graphData.origin,
3164
- V1_PureGraphManager.PROD_PROTOCOL_VERSION,
3165
- );
3166
- } else {
3167
- throw new UnsupportedOperationError(
3168
- `Can't process unsupported graph data`,
3169
- graphData,
3170
- );
3171
- }
3172
- return input;
3173
- }
3174
-
3175
- async surveyDatasets(
3176
- mapping: string,
3177
- runtime: string,
3178
- query: RawLambda | undefined,
3179
- graphData: GraphData,
3180
- ): Promise<DatasetSpecification[]> {
3181
- return (
3182
- await this.engine.surveyDatasets(
3183
- this.generateStoreEntitlementAnalysisInput(
3184
- mapping,
3185
- runtime,
3186
- query,
3187
- graphData,
3188
- ),
3189
- this.pluginManager.getPureProtocolProcessorPlugins(),
3190
- )
3191
- ).map((dataset) =>
3192
- V1_buildDatasetSpecification(
3193
- dataset,
3194
- this.pluginManager.getPureProtocolProcessorPlugins(),
3195
- ),
3196
- );
3197
- }
3198
-
3199
- async checkDatasetEntitlements(
3200
- datasets: DatasetSpecification[],
3201
- mapping: string,
3202
- runtime: string,
3203
- query: RawLambda | undefined,
3204
- graphData: GraphData,
3205
- ): Promise<DatasetEntitlementReport[]> {
3206
- const input = new V1_EntitlementReportAnalyticsInput();
3207
- input.storeEntitlementAnalyticsInput =
3208
- this.generateStoreEntitlementAnalysisInput(
3209
- mapping,
3210
- runtime,
3211
- query,
3212
- graphData,
3213
- );
3214
- input.reports = datasets.map((dataset) =>
3215
- V1_transformDatasetSpecification(
3216
- dataset,
3217
- this.pluginManager.getPureProtocolProcessorPlugins(),
3218
- ),
3219
- );
3220
- return (
3221
- await this.engine.checkDatasetEntitlements(
3222
- input,
3223
- this.pluginManager.getPureProtocolProcessorPlugins(),
3224
- )
3225
- ).map((report) =>
3226
- V1_buildDatasetEntitlementReport(
3227
- report,
3228
- this.pluginManager.getPureProtocolProcessorPlugins(),
3229
- ),
3230
- );
3231
- }
3232
-
3233
- // --------------------------------------------- Database ---------------------------------------------
3234
-
3235
- async buildDatabase(input: DatabaseBuilderInput): Promise<Entity[]> {
3236
- const dbBuilderInput = new V1_DatabaseBuilderInput();
3237
- dbBuilderInput.connection = V1_transformRelationalDatabaseConnection(
3238
- input.connection,
3239
- new V1_GraphTransformerContextBuilder(
3240
- this.pluginManager.getPureProtocolProcessorPlugins(),
3241
- ).build(),
3242
- );
3243
- const targetDatabase = new V1_TargetDatabase();
3244
- targetDatabase.package = input.targetDatabase.package;
3245
- targetDatabase.name = input.targetDatabase.name;
3246
- dbBuilderInput.targetDatabase = targetDatabase;
3247
- const config = new V1_DatabaseBuilderConfig();
3248
- config.maxTables = input.config.maxTables;
3249
- config.enrichTables = input.config.enrichTables;
3250
- config.enrichPrimaryKeys = input.config.enrichPrimaryKeys;
3251
- config.enrichColumns = input.config.enrichColumns;
3252
- config.patterns = input.config.patterns.map(
3253
- (storePattern: DatabasePattern): V1_DatabasePattern => {
3254
- const pattern = new V1_DatabasePattern();
3255
- pattern.schemaPattern = storePattern.schemaPattern;
3256
- pattern.tablePattern = storePattern.tablePattern;
3257
- pattern.escapeSchemaPattern = storePattern.escapeSchemaPattern;
3258
- pattern.escapeTablePattern = storePattern.escapeTablePattern;
3259
- return pattern;
3260
- },
3261
- );
3262
- dbBuilderInput.config = config;
3263
- return this.pureModelContextDataToEntities(
3264
- await this.engine.buildDatabase(dbBuilderInput),
3265
- );
3266
- }
3267
-
3268
- // --------------------------------------------- Utilities ---------------------------------------------
3372
+ // --------------------------------------------- Shared ---------------------------------------------
3269
3373
 
3270
3374
  elementToEntity = (
3271
3375
  element: PackageableElement,
@@ -3282,8 +3386,6 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
3282
3386
  return entity;
3283
3387
  };
3284
3388
 
3285
- // --------------------------------------------- Shared ---------------------------------------------
3286
-
3287
3389
  private prunePureModelContextData = (
3288
3390
  data: V1_PureModelContextData,
3289
3391
  elementFilter?: (val: V1_PackageableElement) => boolean,
@@ -3500,7 +3602,10 @@ export class V1_PureGraphManager extends AbstractPureGraphManager {
3500
3602
  private getElementClassiferPath = (
3501
3603
  protocol: V1_PackageableElement,
3502
3604
  ): string => {
3503
- if (protocol instanceof V1_INTERNAL__UnknownPackageableElement) {
3605
+ if (
3606
+ protocol instanceof V1_INTERNAL__UnknownPackageableElement ||
3607
+ protocol instanceof V1_INTERNAL__UnknownFunctionActivator
3608
+ ) {
3504
3609
  const _type = protocol.content._type;
3505
3610
  const classifierPath = isString(_type)
3506
3611
  ? this.elementClassifierPathMap.get(_type)