@cratis/chronicle 6.62.0 → 6.64.0

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 (448) hide show
  1. package/ChronicleClient.ts +86 -3
  2. package/artifacts/DefaultClientArtifactsProvider.ts +5 -0
  3. package/artifacts/IClientArtifactsProvider.ts +3 -0
  4. package/connection/ConnectionLifecycle.ts +42 -1
  5. package/dist/ChronicleClient.d.ts +28 -1
  6. package/dist/ChronicleClient.d.ts.map +1 -1
  7. package/dist/ChronicleClient.js +71 -3
  8. package/dist/ChronicleClient.js.map +1 -1
  9. package/dist/artifacts/DefaultClientArtifactsProvider.d.ts +2 -0
  10. package/dist/artifacts/DefaultClientArtifactsProvider.d.ts.map +1 -1
  11. package/dist/artifacts/DefaultClientArtifactsProvider.js +4 -0
  12. package/dist/artifacts/DefaultClientArtifactsProvider.js.map +1 -1
  13. package/dist/artifacts/IClientArtifactsProvider.d.ts +2 -0
  14. package/dist/artifacts/IClientArtifactsProvider.d.ts.map +1 -1
  15. package/dist/connection/ConnectionLifecycle.d.ts +24 -0
  16. package/dist/connection/ConnectionLifecycle.d.ts.map +1 -1
  17. package/dist/connection/ConnectionLifecycle.js +40 -1
  18. package/dist/connection/ConnectionLifecycle.js.map +1 -1
  19. package/dist/observation/ObservationReconnectBackoff.d.ts +64 -0
  20. package/dist/observation/ObservationReconnectBackoff.d.ts.map +1 -0
  21. package/dist/observation/ObservationReconnectBackoff.js +75 -0
  22. package/dist/observation/ObservationReconnectBackoff.js.map +1 -0
  23. package/dist/observation/ObservationStreamOutcome.d.ts +10 -0
  24. package/dist/observation/ObservationStreamOutcome.d.ts.map +1 -0
  25. package/dist/observation/ObservationStreamOutcome.js +4 -0
  26. package/dist/observation/ObservationStreamOutcome.js.map +1 -0
  27. package/dist/observation/classifyStreamError.d.ts +25 -0
  28. package/dist/observation/classifyStreamError.d.ts.map +1 -0
  29. package/dist/observation/classifyStreamError.js +55 -0
  30. package/dist/observation/classifyStreamError.js.map +1 -0
  31. package/dist/observation/for_ObservationReconnectBackoff/given/a_backoff.d.ts +13 -0
  32. package/dist/observation/for_ObservationReconnectBackoff/given/a_backoff.d.ts.map +1 -0
  33. package/dist/observation/for_ObservationReconnectBackoff/given/a_backoff.js +25 -0
  34. package/dist/observation/for_ObservationReconnectBackoff/given/a_backoff.js.map +1 -0
  35. package/dist/observation/for_ObservationReconnectBackoff/given/a_scripted_stream.d.ts +27 -0
  36. package/dist/observation/for_ObservationReconnectBackoff/given/a_scripted_stream.d.ts.map +1 -0
  37. package/dist/observation/for_ObservationReconnectBackoff/given/a_scripted_stream.js +36 -0
  38. package/dist/observation/for_ObservationReconnectBackoff/given/a_scripted_stream.js.map +1 -0
  39. package/dist/projections/for_Graphs/given/a_discovered_graph.d.ts +2 -1
  40. package/dist/projections/for_Graphs/given/a_discovered_graph.d.ts.map +1 -1
  41. package/dist/projections/for_Graphs/given/a_discovered_graph.js +3 -2
  42. package/dist/projections/for_Graphs/given/a_discovered_graph.js.map +1 -1
  43. package/dist/projections/for_Graphs/given/a_graph_with_views.d.ts +40 -0
  44. package/dist/projections/for_Graphs/given/a_graph_with_views.d.ts.map +1 -0
  45. package/dist/projections/for_Graphs/given/a_graph_with_views.js +80 -0
  46. package/dist/projections/for_Graphs/given/a_graph_with_views.js.map +1 -0
  47. package/dist/projections/for_Graphs/given/organization.d.ts +2 -1
  48. package/dist/projections/for_Graphs/given/organization.d.ts.map +1 -1
  49. package/dist/projections/for_Graphs/given/organization.js +3 -2
  50. package/dist/projections/for_Graphs/given/organization.js.map +1 -1
  51. package/dist/projections/graphs/Graphs.d.ts +5 -0
  52. package/dist/projections/graphs/Graphs.d.ts.map +1 -1
  53. package/dist/projections/graphs/Graphs.js +43 -0
  54. package/dist/projections/graphs/Graphs.js.map +1 -1
  55. package/dist/projections/graphs/IGraphs.d.ts +9 -2
  56. package/dist/projections/graphs/IGraphs.d.ts.map +1 -1
  57. package/dist/projections/graphs/index.d.ts +1 -0
  58. package/dist/projections/graphs/index.d.ts.map +1 -1
  59. package/dist/projections/graphs/index.js +1 -0
  60. package/dist/projections/graphs/index.js.map +1 -1
  61. package/dist/projections/graphs/views/AmbiguousDirection.d.ts +16 -0
  62. package/dist/projections/graphs/views/AmbiguousDirection.d.ts.map +1 -0
  63. package/dist/projections/graphs/views/AmbiguousDirection.js +21 -0
  64. package/dist/projections/graphs/views/AmbiguousDirection.js.map +1 -0
  65. package/dist/projections/graphs/views/DuplicateViewName.d.ts +16 -0
  66. package/dist/projections/graphs/views/DuplicateViewName.d.ts.map +1 -0
  67. package/dist/projections/graphs/views/DuplicateViewName.js +21 -0
  68. package/dist/projections/graphs/views/DuplicateViewName.js.map +1 -0
  69. package/dist/projections/graphs/views/EdgeNotIncidentOnRoot.d.ts +17 -0
  70. package/dist/projections/graphs/views/EdgeNotIncidentOnRoot.d.ts.map +1 -0
  71. package/dist/projections/graphs/views/EdgeNotIncidentOnRoot.js +22 -0
  72. package/dist/projections/graphs/views/EdgeNotIncidentOnRoot.js.map +1 -0
  73. package/dist/projections/graphs/views/EdgePropertyViewNotUsedAsTarget.d.ts +14 -0
  74. package/dist/projections/graphs/views/EdgePropertyViewNotUsedAsTarget.d.ts.map +1 -0
  75. package/dist/projections/graphs/views/EdgePropertyViewNotUsedAsTarget.js +19 -0
  76. package/dist/projections/graphs/views/EdgePropertyViewNotUsedAsTarget.js.map +1 -0
  77. package/dist/projections/graphs/views/EdgePropertyViewSharedAcrossEdges.d.ts +15 -0
  78. package/dist/projections/graphs/views/EdgePropertyViewSharedAcrossEdges.d.ts.map +1 -0
  79. package/dist/projections/graphs/views/EdgePropertyViewSharedAcrossEdges.js +20 -0
  80. package/dist/projections/graphs/views/EdgePropertyViewSharedAcrossEdges.js.map +1 -0
  81. package/dist/projections/graphs/views/FollowsOptions.d.ts +16 -0
  82. package/dist/projections/graphs/views/FollowsOptions.d.ts.map +1 -0
  83. package/dist/projections/graphs/views/FollowsOptions.js +4 -0
  84. package/dist/projections/graphs/views/FollowsOptions.js.map +1 -0
  85. package/dist/projections/graphs/views/GraphEdgeDirection.d.ts +10 -0
  86. package/dist/projections/graphs/views/GraphEdgeDirection.d.ts.map +1 -0
  87. package/dist/projections/graphs/views/GraphEdgeDirection.js +13 -0
  88. package/dist/projections/graphs/views/GraphEdgeDirection.js.map +1 -0
  89. package/dist/projections/graphs/views/GraphView.d.ts +13 -0
  90. package/dist/projections/graphs/views/GraphView.d.ts.map +1 -0
  91. package/dist/projections/graphs/views/GraphView.js +4 -0
  92. package/dist/projections/graphs/views/GraphView.js.map +1 -0
  93. package/dist/projections/graphs/views/GraphViewBuildResult.d.ts +15 -0
  94. package/dist/projections/graphs/views/GraphViewBuildResult.d.ts.map +1 -0
  95. package/dist/projections/graphs/views/GraphViewBuildResult.js +4 -0
  96. package/dist/projections/graphs/views/GraphViewBuildResult.js.map +1 -0
  97. package/dist/projections/graphs/views/GraphViewCardinality.d.ts +10 -0
  98. package/dist/projections/graphs/views/GraphViewCardinality.d.ts.map +1 -0
  99. package/dist/projections/graphs/views/GraphViewCardinality.js +13 -0
  100. package/dist/projections/graphs/views/GraphViewCardinality.js.map +1 -0
  101. package/dist/projections/graphs/views/GraphViewDefinition.d.ts +15 -0
  102. package/dist/projections/graphs/views/GraphViewDefinition.d.ts.map +1 -0
  103. package/dist/projections/graphs/views/GraphViewDefinition.js +4 -0
  104. package/dist/projections/graphs/views/GraphViewDefinition.js.map +1 -0
  105. package/dist/projections/graphs/views/GraphViewDefinitionBuilder.d.ts +30 -0
  106. package/dist/projections/graphs/views/GraphViewDefinitionBuilder.d.ts.map +1 -0
  107. package/dist/projections/graphs/views/GraphViewDefinitionBuilder.js +259 -0
  108. package/dist/projections/graphs/views/GraphViewDefinitionBuilder.js.map +1 -0
  109. package/dist/projections/graphs/views/GraphViewDefinitionSerializer.d.ts +21 -0
  110. package/dist/projections/graphs/views/GraphViewDefinitionSerializer.d.ts.map +1 -0
  111. package/dist/projections/graphs/views/GraphViewDefinitionSerializer.js +77 -0
  112. package/dist/projections/graphs/views/GraphViewDefinitionSerializer.js.map +1 -0
  113. package/dist/projections/graphs/views/GraphViewEdgeReference.d.ts +6 -0
  114. package/dist/projections/graphs/views/GraphViewEdgeReference.d.ts.map +1 -0
  115. package/dist/projections/graphs/views/GraphViewEdgeReference.js +4 -0
  116. package/dist/projections/graphs/views/GraphViewEdgeReference.js.map +1 -0
  117. package/dist/projections/graphs/views/GraphViewMember.d.ts +8 -0
  118. package/dist/projections/graphs/views/GraphViewMember.d.ts.map +1 -0
  119. package/dist/projections/graphs/views/GraphViewMember.js +4 -0
  120. package/dist/projections/graphs/views/GraphViewMember.js.map +1 -0
  121. package/dist/projections/graphs/views/GraphViewMemberKind.d.ts +12 -0
  122. package/dist/projections/graphs/views/GraphViewMemberKind.d.ts.map +1 -0
  123. package/dist/projections/graphs/views/GraphViewMemberKind.js +15 -0
  124. package/dist/projections/graphs/views/GraphViewMemberKind.js.map +1 -0
  125. package/dist/projections/graphs/views/GraphViewMemberMetadata.d.ts +22 -0
  126. package/dist/projections/graphs/views/GraphViewMemberMetadata.d.ts.map +1 -0
  127. package/dist/projections/graphs/views/GraphViewMemberMetadata.js +4 -0
  128. package/dist/projections/graphs/views/GraphViewMemberMetadata.js.map +1 -0
  129. package/dist/projections/graphs/views/GraphViewPropertyMember.d.ts +13 -0
  130. package/dist/projections/graphs/views/GraphViewPropertyMember.d.ts.map +1 -0
  131. package/dist/projections/graphs/views/GraphViewPropertyMember.js +4 -0
  132. package/dist/projections/graphs/views/GraphViewPropertyMember.js.map +1 -0
  133. package/dist/projections/graphs/views/GraphViewReason.d.ts +33 -0
  134. package/dist/projections/graphs/views/GraphViewReason.d.ts.map +1 -0
  135. package/dist/projections/graphs/views/GraphViewReason.js +36 -0
  136. package/dist/projections/graphs/views/GraphViewReason.js.map +1 -0
  137. package/dist/projections/graphs/views/GraphViewRelationMember.d.ts +21 -0
  138. package/dist/projections/graphs/views/GraphViewRelationMember.d.ts.map +1 -0
  139. package/dist/projections/graphs/views/GraphViewRelationMember.js +4 -0
  140. package/dist/projections/graphs/views/GraphViewRelationMember.js.map +1 -0
  141. package/dist/projections/graphs/views/GraphViewSchema.d.ts +10 -0
  142. package/dist/projections/graphs/views/GraphViewSchema.d.ts.map +1 -0
  143. package/dist/projections/graphs/views/GraphViewSchema.js +4 -0
  144. package/dist/projections/graphs/views/GraphViewSchema.js.map +1 -0
  145. package/dist/projections/graphs/views/GraphViewSchemaEdge.d.ts +14 -0
  146. package/dist/projections/graphs/views/GraphViewSchemaEdge.d.ts.map +1 -0
  147. package/dist/projections/graphs/views/GraphViewSchemaEdge.js +4 -0
  148. package/dist/projections/graphs/views/GraphViewSchemaEdge.js.map +1 -0
  149. package/dist/projections/graphs/views/GraphViewSchemaNode.d.ts +10 -0
  150. package/dist/projections/graphs/views/GraphViewSchemaNode.d.ts.map +1 -0
  151. package/dist/projections/graphs/views/GraphViewSchemaNode.js +4 -0
  152. package/dist/projections/graphs/views/GraphViewSchemaNode.js.map +1 -0
  153. package/dist/projections/graphs/views/GraphViewSerializerOptions.d.ts +9 -0
  154. package/dist/projections/graphs/views/GraphViewSerializerOptions.d.ts.map +1 -0
  155. package/dist/projections/graphs/views/GraphViewSerializerOptions.js +4 -0
  156. package/dist/projections/graphs/views/GraphViewSerializerOptions.js.map +1 -0
  157. package/dist/projections/graphs/views/RecursiveView.d.ts +15 -0
  158. package/dist/projections/graphs/views/RecursiveView.d.ts.map +1 -0
  159. package/dist/projections/graphs/views/RecursiveView.js +20 -0
  160. package/dist/projections/graphs/views/RecursiveView.js.map +1 -0
  161. package/dist/projections/graphs/views/RelationTargetNotAView.d.ts +16 -0
  162. package/dist/projections/graphs/views/RelationTargetNotAView.d.ts.map +1 -0
  163. package/dist/projections/graphs/views/RelationTargetNotAView.js +21 -0
  164. package/dist/projections/graphs/views/RelationTargetNotAView.js.map +1 -0
  165. package/dist/projections/graphs/views/TargetLabelMismatch.d.ts +18 -0
  166. package/dist/projections/graphs/views/TargetLabelMismatch.d.ts.map +1 -0
  167. package/dist/projections/graphs/views/TargetLabelMismatch.js +23 -0
  168. package/dist/projections/graphs/views/TargetLabelMismatch.js.map +1 -0
  169. package/dist/projections/graphs/views/UnknownEdge.d.ts +16 -0
  170. package/dist/projections/graphs/views/UnknownEdge.d.ts.map +1 -0
  171. package/dist/projections/graphs/views/UnknownEdge.js +21 -0
  172. package/dist/projections/graphs/views/UnknownEdge.js.map +1 -0
  173. package/dist/projections/graphs/views/UnknownEdgeProperty.d.ts +17 -0
  174. package/dist/projections/graphs/views/UnknownEdgeProperty.d.ts.map +1 -0
  175. package/dist/projections/graphs/views/UnknownEdgeProperty.js +22 -0
  176. package/dist/projections/graphs/views/UnknownEdgeProperty.js.map +1 -0
  177. package/dist/projections/graphs/views/UnknownNodeProperty.d.ts +17 -0
  178. package/dist/projections/graphs/views/UnknownNodeProperty.d.ts.map +1 -0
  179. package/dist/projections/graphs/views/UnknownNodeProperty.js +22 -0
  180. package/dist/projections/graphs/views/UnknownNodeProperty.js.map +1 -0
  181. package/dist/projections/graphs/views/ViewIsAlsoSchema.d.ts +14 -0
  182. package/dist/projections/graphs/views/ViewIsAlsoSchema.d.ts.map +1 -0
  183. package/dist/projections/graphs/views/ViewIsAlsoSchema.js +19 -0
  184. package/dist/projections/graphs/views/ViewIsAlsoSchema.js.map +1 -0
  185. package/dist/projections/graphs/views/ViewOfMetadata.d.ts +8 -0
  186. package/dist/projections/graphs/views/ViewOfMetadata.d.ts.map +1 -0
  187. package/dist/projections/graphs/views/ViewOfMetadata.js +4 -0
  188. package/dist/projections/graphs/views/ViewOfMetadata.js.map +1 -0
  189. package/dist/projections/graphs/views/ViewOfOptions.d.ts +6 -0
  190. package/dist/projections/graphs/views/ViewOfOptions.d.ts.map +1 -0
  191. package/dist/projections/graphs/views/ViewOfOptions.js +4 -0
  192. package/dist/projections/graphs/views/ViewOfOptions.js.map +1 -0
  193. package/dist/projections/graphs/views/ViewRootNotANode.d.ts +16 -0
  194. package/dist/projections/graphs/views/ViewRootNotANode.d.ts.map +1 -0
  195. package/dist/projections/graphs/views/ViewRootNotANode.js +21 -0
  196. package/dist/projections/graphs/views/ViewRootNotANode.js.map +1 -0
  197. package/dist/projections/graphs/views/declareGraphViewMember.d.ts +17 -0
  198. package/dist/projections/graphs/views/declareGraphViewMember.d.ts.map +1 -0
  199. package/dist/projections/graphs/views/declareGraphViewMember.js +31 -0
  200. package/dist/projections/graphs/views/declareGraphViewMember.js.map +1 -0
  201. package/dist/projections/graphs/views/follows.d.ts +13 -0
  202. package/dist/projections/graphs/views/follows.d.ts.map +1 -0
  203. package/dist/projections/graphs/views/follows.js +24 -0
  204. package/dist/projections/graphs/views/follows.js.map +1 -0
  205. package/dist/projections/graphs/views/fromEdge.d.ts +10 -0
  206. package/dist/projections/graphs/views/fromEdge.d.ts.map +1 -0
  207. package/dist/projections/graphs/views/fromEdge.js +15 -0
  208. package/dist/projections/graphs/views/fromEdge.js.map +1 -0
  209. package/dist/projections/graphs/views/index.d.ts +41 -0
  210. package/dist/projections/graphs/views/index.d.ts.map +1 -0
  211. package/dist/projections/graphs/views/index.js +28 -0
  212. package/dist/projections/graphs/views/index.js.map +1 -0
  213. package/dist/projections/graphs/views/viewKey.d.ts +8 -0
  214. package/dist/projections/graphs/views/viewKey.d.ts.map +1 -0
  215. package/dist/projections/graphs/views/viewKey.js +13 -0
  216. package/dist/projections/graphs/views/viewKey.js.map +1 -0
  217. package/dist/projections/graphs/views/viewOf.d.ts +22 -0
  218. package/dist/projections/graphs/views/viewOf.d.ts.map +1 -0
  219. package/dist/projections/graphs/views/viewOf.js +41 -0
  220. package/dist/projections/graphs/views/viewOf.js.map +1 -0
  221. package/dist/projections/graphs/views/viewProperty.d.ts +9 -0
  222. package/dist/projections/graphs/views/viewProperty.d.ts.map +1 -0
  223. package/dist/projections/graphs/views/viewProperty.js +14 -0
  224. package/dist/projections/graphs/views/viewProperty.js.map +1 -0
  225. package/dist/reactors/Reactors.d.ts +15 -5
  226. package/dist/reactors/Reactors.d.ts.map +1 -1
  227. package/dist/reactors/Reactors.js +95 -18
  228. package/dist/reactors/Reactors.js.map +1 -1
  229. package/dist/reactors/for_Reactors/when_reconnecting_the_observation_stream/given/a_reactor_whose_stream_ends.d.ts +26 -0
  230. package/dist/reactors/for_Reactors/when_reconnecting_the_observation_stream/given/a_reactor_whose_stream_ends.d.ts.map +1 -0
  231. package/dist/reactors/for_Reactors/when_reconnecting_the_observation_stream/given/a_reactor_whose_stream_ends.js +64 -0
  232. package/dist/reactors/for_Reactors/when_reconnecting_the_observation_stream/given/a_reactor_whose_stream_ends.js.map +1 -0
  233. package/dist/reducers/Reducers.d.ts +11 -5
  234. package/dist/reducers/Reducers.d.ts.map +1 -1
  235. package/dist/reducers/Reducers.js +93 -19
  236. package/dist/reducers/Reducers.js.map +1 -1
  237. package/dist/reducers/for_Reducers/when_reconnecting_the_observation_stream/given/a_reducer_whose_stream_ends.d.ts +25 -0
  238. package/dist/reducers/for_Reducers/when_reconnecting_the_observation_stream/given/a_reducer_whose_stream_ends.d.ts.map +1 -0
  239. package/dist/reducers/for_Reducers/when_reconnecting_the_observation_stream/given/a_reducer_whose_stream_ends.js +70 -0
  240. package/dist/reducers/for_Reducers/when_reconnecting_the_observation_stream/given/a_reducer_whose_stream_ends.js.map +1 -0
  241. package/dist/testing/InProcessAppendMetadata.d.ts +30 -0
  242. package/dist/testing/InProcessAppendMetadata.d.ts.map +1 -0
  243. package/dist/testing/InProcessAppendMetadata.js +107 -0
  244. package/dist/testing/InProcessAppendMetadata.js.map +1 -0
  245. package/dist/testing/InProcessBatchAppend.d.ts +62 -0
  246. package/dist/testing/InProcessBatchAppend.d.ts.map +1 -0
  247. package/dist/testing/InProcessBatchAppend.js +131 -0
  248. package/dist/testing/InProcessBatchAppend.js.map +1 -0
  249. package/dist/testing/InProcessEventPayload.d.ts +23 -0
  250. package/dist/testing/InProcessEventPayload.d.ts.map +1 -0
  251. package/dist/testing/InProcessEventPayload.js +94 -0
  252. package/dist/testing/InProcessEventPayload.js.map +1 -0
  253. package/dist/testing/InProcessEventReadCriteria.d.ts +9 -0
  254. package/dist/testing/InProcessEventReadCriteria.d.ts.map +1 -0
  255. package/dist/testing/InProcessEventReadCriteria.js +4 -0
  256. package/dist/testing/InProcessEventReadCriteria.js.map +1 -0
  257. package/dist/testing/InProcessEventReadFilter.d.ts +14 -0
  258. package/dist/testing/InProcessEventReadFilter.d.ts.map +1 -0
  259. package/dist/testing/InProcessEventReadFilter.js +31 -0
  260. package/dist/testing/InProcessEventReadFilter.js.map +1 -0
  261. package/dist/testing/InProcessEventSequence.d.ts +8 -5
  262. package/dist/testing/InProcessEventSequence.d.ts.map +1 -1
  263. package/dist/testing/InProcessEventSequence.js +59 -275
  264. package/dist/testing/InProcessEventSequence.js.map +1 -1
  265. package/dist/testing/InProcessEventSequenceEnvironment.d.ts +13 -0
  266. package/dist/testing/InProcessEventSequenceEnvironment.d.ts.map +1 -0
  267. package/dist/testing/InProcessEventSequenceEnvironment.js +4 -0
  268. package/dist/testing/InProcessEventSequenceEnvironment.js.map +1 -0
  269. package/dist/testing/InProcessSingleAppend.d.ts +34 -0
  270. package/dist/testing/InProcessSingleAppend.d.ts.map +1 -0
  271. package/dist/testing/InProcessSingleAppend.js +95 -0
  272. package/dist/testing/InProcessSingleAppend.js.map +1 -0
  273. package/dist/testing/projections/ProjectionCapabilities.d.ts +0 -8
  274. package/dist/testing/projections/ProjectionCapabilities.d.ts.map +1 -1
  275. package/dist/testing/projections/ProjectionCapabilities.js +21 -312
  276. package/dist/testing/projections/ProjectionCapabilities.js.map +1 -1
  277. package/dist/testing/projections/ProjectionCapabilityReject.d.ts +3 -0
  278. package/dist/testing/projections/ProjectionCapabilityReject.d.ts.map +1 -0
  279. package/dist/testing/projections/ProjectionCapabilityReject.js +4 -0
  280. package/dist/testing/projections/ProjectionCapabilityReject.js.map +1 -0
  281. package/dist/testing/projections/ProjectionCapabilityReporter.d.ts +12 -0
  282. package/dist/testing/projections/ProjectionCapabilityReporter.d.ts.map +1 -0
  283. package/dist/testing/projections/ProjectionCapabilityReporter.js +33 -0
  284. package/dist/testing/projections/ProjectionCapabilityReporter.js.map +1 -0
  285. package/dist/testing/projections/ProjectionDefinitionCapabilities.d.ts +11 -0
  286. package/dist/testing/projections/ProjectionDefinitionCapabilities.d.ts.map +1 -0
  287. package/dist/testing/projections/ProjectionDefinitionCapabilities.js +45 -0
  288. package/dist/testing/projections/ProjectionDefinitionCapabilities.js.map +1 -0
  289. package/dist/testing/projections/ProjectionEventSchemaResolver.d.ts +13 -0
  290. package/dist/testing/projections/ProjectionEventSchemaResolver.d.ts.map +1 -0
  291. package/dist/testing/projections/ProjectionEventSchemaResolver.js +22 -0
  292. package/dist/testing/projections/ProjectionEventSchemaResolver.js.map +1 -0
  293. package/dist/testing/projections/ProjectionExpressionCapabilities.d.ts +19 -0
  294. package/dist/testing/projections/ProjectionExpressionCapabilities.d.ts.map +1 -0
  295. package/dist/testing/projections/ProjectionExpressionCapabilities.js +103 -0
  296. package/dist/testing/projections/ProjectionExpressionCapabilities.js.map +1 -0
  297. package/dist/testing/projections/ProjectionInitialValueCapabilities.d.ts +16 -0
  298. package/dist/testing/projections/ProjectionInitialValueCapabilities.d.ts.map +1 -0
  299. package/dist/testing/projections/ProjectionInitialValueCapabilities.js +72 -0
  300. package/dist/testing/projections/ProjectionInitialValueCapabilities.js.map +1 -0
  301. package/dist/testing/projections/ProjectionMappingCapabilities.d.ts +21 -0
  302. package/dist/testing/projections/ProjectionMappingCapabilities.d.ts.map +1 -0
  303. package/dist/testing/projections/ProjectionMappingCapabilities.js +86 -0
  304. package/dist/testing/projections/ProjectionMappingCapabilities.js.map +1 -0
  305. package/dist/testing/projections/ProjectionMappingValidation.d.ts +9 -0
  306. package/dist/testing/projections/ProjectionMappingValidation.d.ts.map +1 -0
  307. package/dist/testing/projections/ProjectionMappingValidation.js +4 -0
  308. package/dist/testing/projections/ProjectionMappingValidation.js.map +1 -0
  309. package/dist/testing/projections/ProjectionReadModelCapabilities.d.ts +11 -0
  310. package/dist/testing/projections/ProjectionReadModelCapabilities.d.ts.map +1 -0
  311. package/dist/testing/projections/ProjectionReadModelCapabilities.js +40 -0
  312. package/dist/testing/projections/ProjectionReadModelCapabilities.js.map +1 -0
  313. package/dist/testing/projections/ProjectionRootCapabilities.d.ts +20 -0
  314. package/dist/testing/projections/ProjectionRootCapabilities.d.ts.map +1 -0
  315. package/dist/testing/projections/ProjectionRootCapabilities.js +73 -0
  316. package/dist/testing/projections/ProjectionRootCapabilities.js.map +1 -0
  317. package/dist/testing/projections/ProjectionScalarConverter.d.ts +21 -0
  318. package/dist/testing/projections/ProjectionScalarConverter.d.ts.map +1 -0
  319. package/dist/testing/projections/ProjectionScalarConverter.js +105 -0
  320. package/dist/testing/projections/ProjectionScalarConverter.js.map +1 -0
  321. package/dist/testing/projections/ProjectionSchemaCapabilities.d.ts +26 -0
  322. package/dist/testing/projections/ProjectionSchemaCapabilities.d.ts.map +1 -0
  323. package/dist/testing/projections/ProjectionSchemaCapabilities.js +109 -0
  324. package/dist/testing/projections/ProjectionSchemaCapabilities.js.map +1 -0
  325. package/dist/testing/projections/ProjectionValueConverter.d.ts +5 -0
  326. package/dist/testing/projections/ProjectionValueConverter.d.ts.map +1 -1
  327. package/dist/testing/projections/ProjectionValueConverter.js +36 -84
  328. package/dist/testing/projections/ProjectionValueConverter.js.map +1 -1
  329. package/dist/tsconfig.tsbuildinfo +1 -1
  330. package/dist/types/DecoratorType.d.ts +3 -1
  331. package/dist/types/DecoratorType.d.ts.map +1 -1
  332. package/dist/types/DecoratorType.js +2 -0
  333. package/dist/types/DecoratorType.js.map +1 -1
  334. package/for_ChronicleClient/when_reconnecting/and_an_observation_stream_lost_its_session.spec.ts +212 -0
  335. package/observation/ObservationReconnectBackoff.ts +109 -0
  336. package/observation/ObservationStreamOutcome.ts +12 -0
  337. package/observation/classifyStreamError.ts +67 -0
  338. package/observation/for_ObservationReconnectBackoff/given/a_backoff.ts +29 -0
  339. package/observation/for_ObservationReconnectBackoff/given/a_scripted_stream.ts +52 -0
  340. package/observation/for_ObservationReconnectBackoff/when_a_stream_delivered_before_it_ended.spec.ts +23 -0
  341. package/observation/for_ObservationReconnectBackoff/when_a_stream_stayed_open_before_it_ended.spec.ts +25 -0
  342. package/observation/for_ObservationReconnectBackoff/when_jittering_the_delay.spec.ts +24 -0
  343. package/observation/for_ObservationReconnectBackoff/when_streams_keep_ending_without_working.spec.ts +24 -0
  344. package/observation/for_ObservationReconnectBackoff/when_the_base_delay_is_not_positive.spec.ts +18 -0
  345. package/observation/for_ObservationReconnectBackoff/when_the_settings_are_not_finite.spec.ts +32 -0
  346. package/observation/for_ObservationReconnectBackoff/when_using_the_defaults.spec.ts +29 -0
  347. package/observation/for_classifyStreamError/when_classifying_a_stream_error.spec.ts +36 -0
  348. package/package.json +2 -2
  349. package/projections/for_Graphs/given/a_discovered_graph.ts +3 -2
  350. package/projections/for_Graphs/given/a_graph_with_views.ts +91 -0
  351. package/projections/for_Graphs/given/organization.ts +3 -2
  352. package/projections/for_Graphs/given/organization_with_views.fixture.ts +129 -0
  353. package/projections/for_Graphs/when_building_graph_views.spec.ts +218 -0
  354. package/projections/for_Graphs/when_declaring_an_invalid_graph_view.spec.ts +229 -0
  355. package/projections/for_Graphs/when_declaring_graph_views.standard.spec.ts +49 -0
  356. package/projections/for_Graphs/when_discovering_graph_views.spec.ts +58 -0
  357. package/projections/graphs/Graphs.ts +44 -0
  358. package/projections/graphs/IGraphs.ts +10 -2
  359. package/projections/graphs/index.ts +1 -0
  360. package/projections/graphs/views/AmbiguousDirection.ts +23 -0
  361. package/projections/graphs/views/DuplicateViewName.ts +23 -0
  362. package/projections/graphs/views/EdgeNotIncidentOnRoot.ts +24 -0
  363. package/projections/graphs/views/EdgePropertyViewNotUsedAsTarget.ts +21 -0
  364. package/projections/graphs/views/EdgePropertyViewSharedAcrossEdges.ts +22 -0
  365. package/projections/graphs/views/FollowsOptions.ts +20 -0
  366. package/projections/graphs/views/GraphEdgeDirection.ts +13 -0
  367. package/projections/graphs/views/GraphView.ts +18 -0
  368. package/projections/graphs/views/GraphViewBuildResult.ts +19 -0
  369. package/projections/graphs/views/GraphViewCardinality.ts +13 -0
  370. package/projections/graphs/views/GraphViewDefinition.ts +20 -0
  371. package/projections/graphs/views/GraphViewDefinitionBuilder.ts +322 -0
  372. package/projections/graphs/views/GraphViewDefinitionSerializer.ts +90 -0
  373. package/projections/graphs/views/GraphViewEdgeReference.ts +8 -0
  374. package/projections/graphs/views/GraphViewMember.ts +11 -0
  375. package/projections/graphs/views/GraphViewMemberKind.ts +16 -0
  376. package/projections/graphs/views/GraphViewMemberMetadata.ts +31 -0
  377. package/projections/graphs/views/GraphViewPropertyMember.ts +18 -0
  378. package/projections/graphs/views/GraphViewReason.ts +47 -0
  379. package/projections/graphs/views/GraphViewRelationMember.ts +29 -0
  380. package/projections/graphs/views/GraphViewSchema.ts +14 -0
  381. package/projections/graphs/views/GraphViewSchemaEdge.ts +20 -0
  382. package/projections/graphs/views/GraphViewSchemaNode.ts +14 -0
  383. package/projections/graphs/views/GraphViewSerializerOptions.ts +11 -0
  384. package/projections/graphs/views/RecursiveView.ts +22 -0
  385. package/projections/graphs/views/RelationTargetNotAView.ts +23 -0
  386. package/projections/graphs/views/TargetLabelMismatch.ts +25 -0
  387. package/projections/graphs/views/UnknownEdge.ts +23 -0
  388. package/projections/graphs/views/UnknownEdgeProperty.ts +24 -0
  389. package/projections/graphs/views/UnknownNodeProperty.ts +24 -0
  390. package/projections/graphs/views/ViewIsAlsoSchema.ts +21 -0
  391. package/projections/graphs/views/ViewOfMetadata.ts +11 -0
  392. package/projections/graphs/views/ViewOfOptions.ts +8 -0
  393. package/projections/graphs/views/ViewRootNotANode.ts +23 -0
  394. package/projections/graphs/views/declareGraphViewMember.ts +36 -0
  395. package/projections/graphs/views/follows.ts +28 -0
  396. package/projections/graphs/views/fromEdge.ts +17 -0
  397. package/projections/graphs/views/index.ts +43 -0
  398. package/projections/graphs/views/viewKey.ts +15 -0
  399. package/projections/graphs/views/viewOf.ts +50 -0
  400. package/projections/graphs/views/viewProperty.ts +16 -0
  401. package/reactors/Reactors.ts +101 -18
  402. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_a_handler_failed_with_a_lost_session.spec.ts +32 -0
  403. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_a_replaced_stream_fails_late.spec.ts +28 -0
  404. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_a_stream_delivered_before_it_ended.spec.ts +24 -0
  405. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_a_stream_stayed_open_before_it_ended.spec.ts +23 -0
  406. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_it_is_disposed_while_waiting_to_reopen.spec.ts +27 -0
  407. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_streams_keep_ending_without_working.spec.ts +24 -0
  408. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_the_client_reconnected_after_streams_kept_ending.spec.ts +24 -0
  409. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_the_client_reconnected_while_waiting_to_reopen.spec.ts +25 -0
  410. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/and_the_kernel_lost_the_session.spec.ts +24 -0
  411. package/reactors/for_Reactors/when_reconnecting_the_observation_stream/given/a_reactor_whose_stream_ends.ts +69 -0
  412. package/reducers/Reducers.ts +99 -19
  413. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_a_reducer_failed_with_a_lost_session.spec.ts +33 -0
  414. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_a_replaced_stream_fails_late.spec.ts +28 -0
  415. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_a_stream_delivered_before_it_ended.spec.ts +24 -0
  416. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_a_stream_stayed_open_before_it_ended.spec.ts +23 -0
  417. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_it_is_disposed_while_waiting_to_reopen.spec.ts +27 -0
  418. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_streams_keep_ending_without_working.spec.ts +24 -0
  419. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_the_client_reconnected_after_streams_kept_ending.spec.ts +24 -0
  420. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_the_client_reconnected_while_waiting_to_reopen.spec.ts +25 -0
  421. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/and_the_kernel_lost_the_session.spec.ts +24 -0
  422. package/reducers/for_Reducers/when_reconnecting_the_observation_stream/given/a_reducer_whose_stream_ends.ts +69 -0
  423. package/testing/InProcessAppendMetadata.ts +119 -0
  424. package/testing/InProcessBatchAppend.ts +142 -0
  425. package/testing/InProcessEventPayload.ts +100 -0
  426. package/testing/InProcessEventReadCriteria.ts +11 -0
  427. package/testing/InProcessEventReadFilter.ts +37 -0
  428. package/testing/InProcessEventSequence.ts +63 -257
  429. package/testing/InProcessEventSequenceEnvironment.ts +16 -0
  430. package/testing/InProcessSingleAppend.ts +99 -0
  431. package/testing/for_InProcessEventSequence/when_preserving_validation_and_commit_order.spec.ts +95 -0
  432. package/testing/projections/ProjectionCapabilities.ts +23 -279
  433. package/testing/projections/ProjectionCapabilityReject.ts +5 -0
  434. package/testing/projections/ProjectionCapabilityReporter.ts +31 -0
  435. package/testing/projections/ProjectionDefinitionCapabilities.ts +45 -0
  436. package/testing/projections/ProjectionEventSchemaResolver.ts +23 -0
  437. package/testing/projections/ProjectionExpressionCapabilities.ts +101 -0
  438. package/testing/projections/ProjectionInitialValueCapabilities.ts +73 -0
  439. package/testing/projections/ProjectionMappingCapabilities.ts +85 -0
  440. package/testing/projections/ProjectionMappingValidation.ts +12 -0
  441. package/testing/projections/ProjectionReadModelCapabilities.ts +42 -0
  442. package/testing/projections/ProjectionRootCapabilities.ts +75 -0
  443. package/testing/projections/ProjectionScalarConverter.ts +106 -0
  444. package/testing/projections/ProjectionSchemaCapabilities.ts +112 -0
  445. package/testing/projections/ProjectionValueConverter.ts +37 -76
  446. package/testing/projections/for_ProjectionCapabilities/when_reporting_the_first_unsupported_operation.spec.ts +74 -0
  447. package/testing/projections/for_ProjectionValueConverter/when_converting_structured_and_scalar_values.spec.ts +64 -0
  448. package/types/DecoratorType.ts +4 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnknownEdgeProperty.js","sourceRoot":"","sources":["../../../../projections/graphs/views/UnknownEdgeProperty.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC1C,0DAA0D;IACjD,MAAM,GAAG,eAAe,CAAC,mBAAmB,CAAC;IAEtD;;;;;;OAMG;IACH,YAAY,IAAc,EAAE,MAAc,EAAE,IAAY,EAAE,MAAc;QACpE,KAAK,CAAC,eAAe,MAAM,kBAAkB,IAAI,CAAC,IAAI,YAAY,MAAM,2CAA2C,IAAI,IAAI,CAAC,CAAC;QAC7H,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACtC,CAAC;CACJ"}
@@ -0,0 +1,17 @@
1
+ import { GraphViewReason } from './GraphViewReason.js';
2
+ /**
3
+ * Error raised when a property member of a view names a property the root node does not declare.
4
+ */
5
+ export declare class UnknownNodeProperty extends Error {
6
+ /** The stable reason code of the rule that was broken. */
7
+ readonly reason = GraphViewReason.UnknownNodeProperty;
8
+ /**
9
+ * Creates a new {@link UnknownNodeProperty}.
10
+ * @param view - The view type.
11
+ * @param member - The name of the member.
12
+ * @param node - The label of the root node.
13
+ * @param source - The name of the property that is not declared.
14
+ */
15
+ constructor(view: Function, member: string, node: string, source: string);
16
+ }
17
+ //# sourceMappingURL=UnknownNodeProperty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnknownNodeProperty.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/UnknownNodeProperty.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC1C,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,uCAAuC;IAEtD;;;;;;OAMG;IACH,YAAY,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAGvE;CACJ"}
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewReason } from './GraphViewReason.js';
4
+ /**
5
+ * Error raised when a property member of a view names a property the root node does not declare.
6
+ */
7
+ export class UnknownNodeProperty extends Error {
8
+ /** The stable reason code of the rule that was broken. */
9
+ reason = GraphViewReason.UnknownNodeProperty;
10
+ /**
11
+ * Creates a new {@link UnknownNodeProperty}.
12
+ * @param view - The view type.
13
+ * @param member - The name of the member.
14
+ * @param node - The label of the root node.
15
+ * @param source - The name of the property that is not declared.
16
+ */
17
+ constructor(view, member, node, source) {
18
+ super(`The member '${member}' of the view '${view.name}' reads '${source}', which is not a property of the node '${node}'.`);
19
+ this.name = 'UnknownNodeProperty';
20
+ }
21
+ }
22
+ //# sourceMappingURL=UnknownNodeProperty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnknownNodeProperty.js","sourceRoot":"","sources":["../../../../projections/graphs/views/UnknownNodeProperty.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAC1C,0DAA0D;IACjD,MAAM,GAAG,eAAe,CAAC,mBAAmB,CAAC;IAEtD;;;;;;OAMG;IACH,YAAY,IAAc,EAAE,MAAc,EAAE,IAAY,EAAE,MAAc;QACpE,KAAK,CAAC,eAAe,MAAM,kBAAkB,IAAI,CAAC,IAAI,YAAY,MAAM,2CAA2C,IAAI,IAAI,CAAC,CAAC;QAC7H,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACtC,CAAC;CACJ"}
@@ -0,0 +1,14 @@
1
+ import { GraphViewReason } from './GraphViewReason.js';
2
+ /**
3
+ * Error raised when a view type is also a node or an edge.
4
+ */
5
+ export declare class ViewIsAlsoSchema extends Error {
6
+ /** The stable reason code of the rule that was broken. */
7
+ readonly reason = GraphViewReason.ViewIsAlsoSchema;
8
+ /**
9
+ * Creates a new {@link ViewIsAlsoSchema}.
10
+ * @param view - The view type.
11
+ */
12
+ constructor(view: Function);
13
+ }
14
+ //# sourceMappingURL=ViewIsAlsoSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewIsAlsoSchema.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewIsAlsoSchema.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACvC,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,oCAAoC;IAEnD;;;OAGG;IACH,YAAY,IAAI,EAAE,QAAQ,EAGzB;CACJ"}
@@ -0,0 +1,19 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewReason } from './GraphViewReason.js';
4
+ /**
5
+ * Error raised when a view type is also a node or an edge.
6
+ */
7
+ export class ViewIsAlsoSchema extends Error {
8
+ /** The stable reason code of the rule that was broken. */
9
+ reason = GraphViewReason.ViewIsAlsoSchema;
10
+ /**
11
+ * Creates a new {@link ViewIsAlsoSchema}.
12
+ * @param view - The view type.
13
+ */
14
+ constructor(view) {
15
+ super(`The view '${view.name}' is also a node or an edge. A view is a read model over the graph and cannot be part of its schema.`);
16
+ this.name = 'ViewIsAlsoSchema';
17
+ }
18
+ }
19
+ //# sourceMappingURL=ViewIsAlsoSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewIsAlsoSchema.js","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewIsAlsoSchema.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACvC,0DAA0D;IACjD,MAAM,GAAG,eAAe,CAAC,gBAAgB,CAAC;IAEnD;;;OAGG;IACH,YAAY,IAAc;QACtB,KAAK,CAAC,aAAa,IAAI,CAAC,IAAI,sGAAsG,CAAC,CAAC;QACpI,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACnC,CAAC;CACJ"}
@@ -0,0 +1,8 @@
1
+ /** Metadata stored by the viewOf class decorator. */
2
+ export interface ViewOfMetadata {
3
+ /** A function returning the class of the node the view is anchored at. */
4
+ readonly root: () => Function;
5
+ /** The name of the view. */
6
+ readonly name: string;
7
+ }
8
+ //# sourceMappingURL=ViewOfMetadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewOfMetadata.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewOfMetadata.ts"],"names":[],"mappings":"AAGA,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,QAAQ,CAAC;IAE9B,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ export {};
4
+ //# sourceMappingURL=ViewOfMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewOfMetadata.js","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewOfMetadata.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
@@ -0,0 +1,6 @@
1
+ /** Options of the viewOf decorator. */
2
+ export interface ViewOfOptions {
3
+ /** The name of the view. View names are unique in a graph. Defaults to the name of the class. */
4
+ readonly name?: string;
5
+ }
6
+ //# sourceMappingURL=ViewOfOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewOfOptions.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewOfOptions.ts"],"names":[],"mappings":"AAGA,uCAAuC;AACvC,MAAM,WAAW,aAAa;IAC1B,iGAAiG;IACjG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ export {};
4
+ //# sourceMappingURL=ViewOfOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewOfOptions.js","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewOfOptions.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
@@ -0,0 +1,16 @@
1
+ import { GraphViewReason } from './GraphViewReason.js';
2
+ /**
3
+ * Error raised when the root of a view is not a node declared in the graph of the view.
4
+ */
5
+ export declare class ViewRootNotANode extends Error {
6
+ /** The stable reason code of the rule that was broken. */
7
+ readonly reason = GraphViewReason.ViewRootNotANode;
8
+ /**
9
+ * Creates a new {@link ViewRootNotANode}.
10
+ * @param view - The view type.
11
+ * @param graph - The name of the graph.
12
+ * @param root - The type the view is anchored at.
13
+ */
14
+ constructor(view: Function, graph: string, root: Function);
15
+ }
16
+ //# sourceMappingURL=ViewRootNotANode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewRootNotANode.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewRootNotANode.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACvC,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,oCAAoC;IAEnD;;;;;OAKG;IACH,YAAY,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAGxD;CACJ"}
@@ -0,0 +1,21 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewReason } from './GraphViewReason.js';
4
+ /**
5
+ * Error raised when the root of a view is not a node declared in the graph of the view.
6
+ */
7
+ export class ViewRootNotANode extends Error {
8
+ /** The stable reason code of the rule that was broken. */
9
+ reason = GraphViewReason.ViewRootNotANode;
10
+ /**
11
+ * Creates a new {@link ViewRootNotANode}.
12
+ * @param view - The view type.
13
+ * @param graph - The name of the graph.
14
+ * @param root - The type the view is anchored at.
15
+ */
16
+ constructor(view, graph, root) {
17
+ super(`The view '${view.name}' is anchored at '${root.name}', which is not a node of the graph '${graph}'.`);
18
+ this.name = 'ViewRootNotANode';
19
+ }
20
+ }
21
+ //# sourceMappingURL=ViewRootNotANode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewRootNotANode.js","sourceRoot":"","sources":["../../../../projections/graphs/views/ViewRootNotANode.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACvC,0DAA0D;IACjD,MAAM,GAAG,eAAe,CAAC,gBAAgB,CAAC;IAEnD;;;;;OAKG;IACH,YAAY,IAAc,EAAE,KAAa,EAAE,IAAc;QACrD,KAAK,CAAC,aAAa,IAAI,CAAC,IAAI,qBAAqB,IAAI,CAAC,IAAI,wCAAwC,KAAK,IAAI,CAAC,CAAC;QAC7G,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACnC,CAAC;CACJ"}
@@ -0,0 +1,17 @@
1
+ import 'reflect-metadata';
2
+ import { type ChroniclePropertyDecorator } from '../../../types/propertyDecoratorMetadata.js';
3
+ import type { GraphViewMemberMetadata } from './GraphViewMemberMetadata.js';
4
+ /**
5
+ * Creates a property decorator that declares a member of a graph view. Members are read in the order they are declared.
6
+ * @param metadata - What the member is.
7
+ * @returns A property decorator.
8
+ */
9
+ export declare function declareGraphViewMember(metadata: GraphViewMemberMetadata): ChroniclePropertyDecorator;
10
+ /**
11
+ * Retrieves the metadata stored by the member decorators of a graph view on a property.
12
+ * @param target - The class prototype.
13
+ * @param propertyKey - The property name.
14
+ * @returns The metadata, or undefined when the property is not a member of a view.
15
+ */
16
+ export declare function getGraphViewMemberMetadata(target: object, propertyKey: string): GraphViewMemberMetadata | undefined;
17
+ //# sourceMappingURL=declareGraphViewMember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declareGraphViewMember.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/declareGraphViewMember.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAyC,KAAK,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACrI,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAI5E;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,uBAAuB,GAAG,0BAA0B,CAUpG;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS,CAEnH"}
@@ -0,0 +1,31 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import 'reflect-metadata';
4
+ import { TypeIntrospector } from '../../../types/index.js';
5
+ import { decorateProperty, getPropertyMetadata } from '../../../types/propertyDecoratorMetadata.js';
6
+ const METADATA_KEY = 'chronicle:graph:view:member';
7
+ /**
8
+ * Creates a property decorator that declares a member of a graph view. Members are read in the order they are declared.
9
+ * @param metadata - What the member is.
10
+ * @returns A property decorator.
11
+ */
12
+ export function declareGraphViewMember(metadata) {
13
+ return decorateProperty((target, propertyKey) => {
14
+ const key = propertyKey.toString();
15
+ if (Reflect.getOwnMetadata(METADATA_KEY, target, key) !== undefined) {
16
+ throw new TypeError(`The member '${key}' of a graph view can be declared as one kind of member only.`);
17
+ }
18
+ TypeIntrospector.trackProperty(target.constructor, key);
19
+ Reflect.defineMetadata(METADATA_KEY, metadata, target, key);
20
+ });
21
+ }
22
+ /**
23
+ * Retrieves the metadata stored by the member decorators of a graph view on a property.
24
+ * @param target - The class prototype.
25
+ * @param propertyKey - The property name.
26
+ * @returns The metadata, or undefined when the property is not a member of a view.
27
+ */
28
+ export function getGraphViewMemberMetadata(target, propertyKey) {
29
+ return getPropertyMetadata(METADATA_KEY, target, propertyKey);
30
+ }
31
+ //# sourceMappingURL=declareGraphViewMember.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declareGraphViewMember.js","sourceRoot":"","sources":["../../../../projections/graphs/views/declareGraphViewMember.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAmC,MAAM,6CAA6C,CAAC;AAGrI,MAAM,YAAY,GAAG,6BAA6B,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAiC;IACpE,OAAO,gBAAgB,CAAC,CAAC,MAAc,EAAE,WAA4B,EAAE,EAAE;QACrE,MAAM,GAAG,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;QACnC,IAAI,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YAClE,MAAM,IAAI,SAAS,CAAC,eAAe,GAAG,+DAA+D,CAAC,CAAC;QAC3G,CAAC;QAED,gBAAgB,CAAC,aAAa,CAAE,MAAoC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACvF,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAc,EAAE,WAAmB;IAC1E,OAAO,mBAAmB,CAA0B,YAAY,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AAC3F,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ChroniclePropertyDecorator } from '../../../types/propertyDecoratorMetadata.js';
2
+ import type { FollowsOptions } from './FollowsOptions.js';
3
+ import type { GraphViewEdgeReference } from './GraphViewEdgeReference.js';
4
+ /**
5
+ * Property decorator that declares a member of a graph view that follows one edge type to a nested view.
6
+ * @param edge - The edge to follow: a function returning the edge class, or the edge type string.
7
+ * @param view - A function returning the class of the nested view.
8
+ * @param options - The cardinality, which is many by default, and the direction, which is derived unless the edge
9
+ * starts and ends at the same label.
10
+ * @returns A property decorator.
11
+ */
12
+ export declare function follows(edge: GraphViewEdgeReference, view: () => Function, options?: FollowsOptions): ChroniclePropertyDecorator;
13
+ //# sourceMappingURL=follows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"follows.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/follows.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAI1E;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,QAAQ,EAAE,OAAO,GAAE,cAAmB,GAAG,0BAA0B,CASpI"}
@@ -0,0 +1,24 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewCardinality } from './GraphViewCardinality.js';
4
+ import { GraphViewMemberKind } from './GraphViewMemberKind.js';
5
+ import { declareGraphViewMember } from './declareGraphViewMember.js';
6
+ /**
7
+ * Property decorator that declares a member of a graph view that follows one edge type to a nested view.
8
+ * @param edge - The edge to follow: a function returning the edge class, or the edge type string.
9
+ * @param view - A function returning the class of the nested view.
10
+ * @param options - The cardinality, which is many by default, and the direction, which is derived unless the edge
11
+ * starts and ends at the same label.
12
+ * @returns A property decorator.
13
+ */
14
+ export function follows(edge, view, options = {}) {
15
+ return declareGraphViewMember({
16
+ kind: GraphViewMemberKind.Relation,
17
+ isKey: false,
18
+ edge,
19
+ view,
20
+ direction: options.direction,
21
+ cardinality: options.cardinality ?? GraphViewCardinality.Many
22
+ });
23
+ }
24
+ //# sourceMappingURL=follows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"follows.js","sourceRoot":"","sources":["../../../../projections/graphs/views/follows.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAIrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,IAA4B,EAAE,IAAoB,EAAE,OAAO,GAAmB,EAAE;IACpG,OAAO,sBAAsB,CAAC;QAC1B,IAAI,EAAE,mBAAmB,CAAC,QAAQ;QAClC,KAAK,EAAE,KAAK;QACZ,IAAI;QACJ,IAAI;QACJ,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,oBAAoB,CAAC,IAAI;KAChE,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ChroniclePropertyDecorator } from '../../../types/propertyDecoratorMetadata.js';
2
+ /**
3
+ * Property decorator that declares a member of a graph view that reads a property of the edge that was followed to
4
+ * reach the view. It is valid only in a view that is the target of relations of exactly one edge type.
5
+ * @param source - The name of the property of the edge. It is matched without regard to case. When missing, the
6
+ * name of the member is matched against the properties of the edge.
7
+ * @returns A property decorator.
8
+ */
9
+ export declare function fromEdge(source?: string): ChroniclePropertyDecorator;
10
+ //# sourceMappingURL=fromEdge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromEdge.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/fromEdge.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAI9F;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,0BAA0B,CAEpE"}
@@ -0,0 +1,15 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewMemberKind } from './GraphViewMemberKind.js';
4
+ import { declareGraphViewMember } from './declareGraphViewMember.js';
5
+ /**
6
+ * Property decorator that declares a member of a graph view that reads a property of the edge that was followed to
7
+ * reach the view. It is valid only in a view that is the target of relations of exactly one edge type.
8
+ * @param source - The name of the property of the edge. It is matched without regard to case. When missing, the
9
+ * name of the member is matched against the properties of the edge.
10
+ * @returns A property decorator.
11
+ */
12
+ export function fromEdge(source) {
13
+ return declareGraphViewMember({ kind: GraphViewMemberKind.EdgeProperty, isKey: false, source });
14
+ }
15
+ //# sourceMappingURL=fromEdge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fromEdge.js","sourceRoot":"","sources":["../../../../projections/graphs/views/fromEdge.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAe;IACpC,OAAO,sBAAsB,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AACpG,CAAC"}
@@ -0,0 +1,41 @@
1
+ export { viewOf, getViewOfMetadata } from './viewOf.js';
2
+ export type { ViewOfOptions } from './ViewOfOptions.js';
3
+ export type { ViewOfMetadata } from './ViewOfMetadata.js';
4
+ export { viewKey } from './viewKey.js';
5
+ export { viewProperty } from './viewProperty.js';
6
+ export { fromEdge } from './fromEdge.js';
7
+ export { follows } from './follows.js';
8
+ export type { FollowsOptions } from './FollowsOptions.js';
9
+ export { getGraphViewMemberMetadata } from './declareGraphViewMember.js';
10
+ export type { GraphViewMemberMetadata } from './GraphViewMemberMetadata.js';
11
+ export type { GraphViewEdgeReference } from './GraphViewEdgeReference.js';
12
+ export { GraphViewMemberKind } from './GraphViewMemberKind.js';
13
+ export { GraphEdgeDirection } from './GraphEdgeDirection.js';
14
+ export { GraphViewCardinality } from './GraphViewCardinality.js';
15
+ export { GraphViewReason } from './GraphViewReason.js';
16
+ export type { GraphViewDefinition } from './GraphViewDefinition.js';
17
+ export type { GraphView } from './GraphView.js';
18
+ export type { GraphViewMember } from './GraphViewMember.js';
19
+ export type { GraphViewPropertyMember } from './GraphViewPropertyMember.js';
20
+ export type { GraphViewRelationMember } from './GraphViewRelationMember.js';
21
+ export type { GraphViewBuildResult } from './GraphViewBuildResult.js';
22
+ export { GraphViewDefinitionBuilder } from './GraphViewDefinitionBuilder.js';
23
+ export { GraphViewDefinitionSerializer } from './GraphViewDefinitionSerializer.js';
24
+ export { ViewRootNotANode } from './ViewRootNotANode.js';
25
+ export { ViewIsAlsoSchema } from './ViewIsAlsoSchema.js';
26
+ export { DuplicateViewName } from './DuplicateViewName.js';
27
+ export { UnknownNodeProperty } from './UnknownNodeProperty.js';
28
+ export { UnknownEdge } from './UnknownEdge.js';
29
+ export { UnknownEdgeProperty } from './UnknownEdgeProperty.js';
30
+ export { EdgeNotIncidentOnRoot } from './EdgeNotIncidentOnRoot.js';
31
+ export { AmbiguousDirection } from './AmbiguousDirection.js';
32
+ export { TargetLabelMismatch } from './TargetLabelMismatch.js';
33
+ export { RelationTargetNotAView } from './RelationTargetNotAView.js';
34
+ export { RecursiveView } from './RecursiveView.js';
35
+ export { EdgePropertyViewNotUsedAsTarget } from './EdgePropertyViewNotUsedAsTarget.js';
36
+ export { EdgePropertyViewSharedAcrossEdges } from './EdgePropertyViewSharedAcrossEdges.js';
37
+ export type { GraphViewSchema } from './GraphViewSchema.js';
38
+ export type { GraphViewSchemaNode } from './GraphViewSchemaNode.js';
39
+ export type { GraphViewSchemaEdge } from './GraphViewSchemaEdge.js';
40
+ export type { GraphViewSerializerOptions } from './GraphViewSerializerOptions.js';
41
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC5E,YAAY,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,28 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ export { viewOf, getViewOfMetadata } from './viewOf.js';
4
+ export { viewKey } from './viewKey.js';
5
+ export { viewProperty } from './viewProperty.js';
6
+ export { fromEdge } from './fromEdge.js';
7
+ export { follows } from './follows.js';
8
+ export { getGraphViewMemberMetadata } from './declareGraphViewMember.js';
9
+ export { GraphViewMemberKind } from './GraphViewMemberKind.js';
10
+ export { GraphEdgeDirection } from './GraphEdgeDirection.js';
11
+ export { GraphViewCardinality } from './GraphViewCardinality.js';
12
+ export { GraphViewReason } from './GraphViewReason.js';
13
+ export { GraphViewDefinitionBuilder } from './GraphViewDefinitionBuilder.js';
14
+ export { GraphViewDefinitionSerializer } from './GraphViewDefinitionSerializer.js';
15
+ export { ViewRootNotANode } from './ViewRootNotANode.js';
16
+ export { ViewIsAlsoSchema } from './ViewIsAlsoSchema.js';
17
+ export { DuplicateViewName } from './DuplicateViewName.js';
18
+ export { UnknownNodeProperty } from './UnknownNodeProperty.js';
19
+ export { UnknownEdge } from './UnknownEdge.js';
20
+ export { UnknownEdgeProperty } from './UnknownEdgeProperty.js';
21
+ export { EdgeNotIncidentOnRoot } from './EdgeNotIncidentOnRoot.js';
22
+ export { AmbiguousDirection } from './AmbiguousDirection.js';
23
+ export { TargetLabelMismatch } from './TargetLabelMismatch.js';
24
+ export { RelationTargetNotAView } from './RelationTargetNotAView.js';
25
+ export { RecursiveView } from './RecursiveView.js';
26
+ export { EdgePropertyViewNotUsedAsTarget } from './EdgePropertyViewNotUsedAsTarget.js';
27
+ export { EdgePropertyViewSharedAcrossEdges } from './EdgePropertyViewSharedAcrossEdges.js';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projections/graphs/views/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAOvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ChroniclePropertyDecorator } from '../../../types/propertyDecoratorMetadata.js';
2
+ /**
3
+ * Property decorator that declares the member of a graph view that holds the key of the root node. The member reads
4
+ * whatever property the node uses as its key, so the view does not repeat the name of it.
5
+ * @returns A property decorator.
6
+ */
7
+ export declare function viewKey(): ChroniclePropertyDecorator;
8
+ //# sourceMappingURL=viewKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewKey.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/viewKey.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAI9F;;;;GAIG;AACH,wBAAgB,OAAO,IAAI,0BAA0B,CAEpD"}
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewMemberKind } from './GraphViewMemberKind.js';
4
+ import { declareGraphViewMember } from './declareGraphViewMember.js';
5
+ /**
6
+ * Property decorator that declares the member of a graph view that holds the key of the root node. The member reads
7
+ * whatever property the node uses as its key, so the view does not repeat the name of it.
8
+ * @returns A property decorator.
9
+ */
10
+ export function viewKey() {
11
+ return declareGraphViewMember({ kind: GraphViewMemberKind.Property, isKey: true });
12
+ }
13
+ //# sourceMappingURL=viewKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewKey.js","sourceRoot":"","sources":["../../../../projections/graphs/views/viewKey.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;GAIG;AACH,MAAM,UAAU,OAAO;IACnB,OAAO,sBAAsB,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import 'reflect-metadata';
2
+ import type { ChronicleClassDecorator } from '../../../types/standardDecoratorMetadata.js';
3
+ import type { ViewOfMetadata } from './ViewOfMetadata.js';
4
+ import type { ViewOfOptions } from './ViewOfOptions.js';
5
+ /**
6
+ * Class decorator that marks a class as a view over a property graph. A view is a read model that is anchored at one
7
+ * node. Its members are properties of that node (viewKey and viewProperty), relations along declared edges to other
8
+ * views (follows) and properties of the edge that was followed (fromEdge). Name the graph with the graph decorator.
9
+ * A view only declares what is read; the class is never a node or an edge.
10
+ * @param root - A function returning the class of the node the view is anchored at. It is resolved when the views
11
+ * are validated, so the classes can be declared in any order.
12
+ * @param options - The name of the view, which defaults to the name of the class.
13
+ * @returns A class decorator.
14
+ */
15
+ export declare function viewOf(root: () => Function, options?: ViewOfOptions): ChronicleClassDecorator;
16
+ /**
17
+ * Retrieves the metadata stored by the viewOf decorator.
18
+ * @param target - The class constructor.
19
+ * @returns The metadata, or undefined when the class is not a view.
20
+ */
21
+ export declare function getViewOfMetadata(target: Function): ViewOfMetadata | undefined;
22
+ //# sourceMappingURL=viewOf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewOf.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/viewOf.ts"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,QAAQ,EAAE,OAAO,GAAE,aAAkB,GAAG,uBAAuB,CAkBjG;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,QAAQ,GAAG,cAAc,GAAG,SAAS,CAE9E"}
@@ -0,0 +1,41 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import 'reflect-metadata';
4
+ import { DecoratorType, TypeDiscoverer } from '../../../types/index.js';
5
+ const METADATA_KEY = 'chronicle:graph:view';
6
+ /**
7
+ * Class decorator that marks a class as a view over a property graph. A view is a read model that is anchored at one
8
+ * node. Its members are properties of that node (viewKey and viewProperty), relations along declared edges to other
9
+ * views (follows) and properties of the edge that was followed (fromEdge). Name the graph with the graph decorator.
10
+ * A view only declares what is read; the class is never a node or an edge.
11
+ * @param root - A function returning the class of the node the view is anchored at. It is resolved when the views
12
+ * are validated, so the classes can be declared in any order.
13
+ * @param options - The name of the view, which defaults to the name of the class.
14
+ * @returns A class decorator.
15
+ */
16
+ export function viewOf(root, options = {}) {
17
+ return (target) => {
18
+ const type = target;
19
+ const metadata = { root, name: options.name ?? type.name };
20
+ Reflect.defineMetadata(METADATA_KEY, metadata, target);
21
+ // Discovery is keyed by name. Views of different graphs may share a class name, so they must not replace each other.
22
+ const registered = TypeDiscoverer.default.getTypesByDecoratorType(DecoratorType.GraphView);
23
+ if (!registered.includes(type)) {
24
+ let key = type.name;
25
+ let suffix = 2;
26
+ while (TypeDiscoverer.default.getTypeByDecoratorTypeAndName(DecoratorType.GraphView, key) !== undefined) {
27
+ key = `${type.name}#${suffix++}`;
28
+ }
29
+ TypeDiscoverer.default.register(DecoratorType.GraphView, type, key);
30
+ }
31
+ };
32
+ }
33
+ /**
34
+ * Retrieves the metadata stored by the viewOf decorator.
35
+ * @param target - The class constructor.
36
+ * @returns The metadata, or undefined when the class is not a view.
37
+ */
38
+ export function getViewOfMetadata(target) {
39
+ return Reflect.getMetadata(METADATA_KEY, target);
40
+ }
41
+ //# sourceMappingURL=viewOf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewOf.js","sourceRoot":"","sources":["../../../../projections/graphs/views/viewOf.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAKxE,MAAM,YAAY,GAAG,sBAAsB,CAAC;AAE5C;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAAC,IAAoB,EAAE,OAAO,GAAkB,EAAE;IACpE,OAAO,CAAC,MAAc,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,MAAkB,CAAC;QAChC,MAAM,QAAQ,GAAmB,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QAC3E,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAEvD,qHAAqH;QACrH,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC3F,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAmB,CAAC,EAAE,CAAC;YAC5C,IAAI,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;YACpB,IAAI,MAAM,GAAG,CAAC,CAAC;YACf,OAAO,cAAc,CAAC,OAAO,CAAC,6BAA6B,CAAC,aAAa,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;gBACtG,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,MAAM,EAAE,EAAE,CAAC;YACrC,CAAC;YAED,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,EAAE,IAAmB,EAAE,GAAG,CAAC,CAAC;QACvF,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAgB;IAC9C,OAAO,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAA+B,CAAC;AACnF,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ChroniclePropertyDecorator } from '../../../types/propertyDecoratorMetadata.js';
2
+ /**
3
+ * Property decorator that declares a member of a graph view that reads a property of the root node.
4
+ * @param source - The name of the property of the node. It is matched without regard to case. When missing, the
5
+ * name of the member is matched against the properties of the node.
6
+ * @returns A property decorator.
7
+ */
8
+ export declare function viewProperty(source?: string): ChroniclePropertyDecorator;
9
+ //# sourceMappingURL=viewProperty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewProperty.d.ts","sourceRoot":"","sources":["../../../../projections/graphs/views/viewProperty.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAI9F;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,0BAA0B,CAExE"}
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ import { GraphViewMemberKind } from './GraphViewMemberKind.js';
4
+ import { declareGraphViewMember } from './declareGraphViewMember.js';
5
+ /**
6
+ * Property decorator that declares a member of a graph view that reads a property of the root node.
7
+ * @param source - The name of the property of the node. It is matched without regard to case. When missing, the
8
+ * name of the member is matched against the properties of the node.
9
+ * @returns A property decorator.
10
+ */
11
+ export function viewProperty(source) {
12
+ return declareGraphViewMember({ kind: GraphViewMemberKind.Property, isKey: false, source });
13
+ }
14
+ //# sourceMappingURL=viewProperty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewProperty.js","sourceRoot":"","sources":["../../../../projections/graphs/views/viewProperty.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,MAAe;IACxC,OAAO,sBAAsB,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AAChG,CAAC"}