@cratis/chronicle 6.59.0 → 6.61.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.
- package/ChronicleClient.ts +1 -1
- package/ChronicleOptions.ts +11 -0
- package/EventStore.ts +9 -1
- package/IEventStore.ts +7 -0
- package/README.md +1 -1
- package/artifacts/DefaultClientArtifactsProvider.ts +13 -1
- package/artifacts/IClientArtifactsProvider.ts +6 -0
- package/dist/ChronicleClient.js +1 -1
- package/dist/ChronicleClient.js.map +1 -1
- package/dist/ChronicleOptions.d.ts +7 -0
- package/dist/ChronicleOptions.d.ts.map +1 -1
- package/dist/ChronicleOptions.js +8 -0
- package/dist/ChronicleOptions.js.map +1 -1
- package/dist/EventStore.d.ts +3 -1
- package/dist/EventStore.d.ts.map +1 -1
- package/dist/EventStore.js +7 -1
- package/dist/EventStore.js.map +1 -1
- package/dist/IEventStore.d.ts +6 -0
- package/dist/IEventStore.d.ts.map +1 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.d.ts +4 -0
- package/dist/artifacts/DefaultClientArtifactsProvider.d.ts.map +1 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.js +11 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.js.map +1 -1
- package/dist/artifacts/IClientArtifactsProvider.d.ts +4 -0
- package/dist/artifacts/IClientArtifactsProvider.d.ts.map +1 -1
- package/dist/projections/ChildrenOrderingNotSupportedByContracts.d.ts +15 -0
- package/dist/projections/ChildrenOrderingNotSupportedByContracts.d.ts.map +1 -0
- package/dist/projections/ChildrenOrderingNotSupportedByContracts.js +22 -0
- package/dist/projections/ChildrenOrderingNotSupportedByContracts.js.map +1 -0
- package/dist/projections/InvalidCausedByProperty.d.ts +10 -0
- package/dist/projections/InvalidCausedByProperty.d.ts.map +1 -0
- package/dist/projections/InvalidCausedByProperty.js +16 -0
- package/dist/projections/InvalidCausedByProperty.js.map +1 -0
- package/dist/projections/Projections.d.ts.map +1 -1
- package/dist/projections/Projections.js +7 -30
- package/dist/projections/Projections.js.map +1 -1
- package/dist/projections/causedBy.d.ts +15 -0
- package/dist/projections/causedBy.d.ts.map +1 -0
- package/dist/projections/causedBy.js +24 -0
- package/dist/projections/causedBy.js.map +1 -0
- package/dist/projections/childrenOrdering.d.ts +38 -0
- package/dist/projections/childrenOrdering.d.ts.map +1 -0
- package/dist/projections/childrenOrdering.js +37 -0
- package/dist/projections/childrenOrdering.js.map +1 -0
- package/dist/projections/childrenOrderingSupport.d.ts +14 -0
- package/dist/projections/childrenOrderingSupport.d.ts.map +1 -0
- package/dist/projections/childrenOrderingSupport.js +37 -0
- package/dist/projections/childrenOrderingSupport.js.map +1 -0
- package/dist/projections/declarative/AllSetBuilder.d.ts +3 -0
- package/dist/projections/declarative/AllSetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/AllSetBuilder.js +6 -0
- package/dist/projections/declarative/AllSetBuilder.js.map +1 -1
- package/dist/projections/declarative/ChildrenBuilder.d.ts +9 -0
- package/dist/projections/declarative/ChildrenBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/ChildrenBuilder.js +29 -1
- package/dist/projections/declarative/ChildrenBuilder.js.map +1 -1
- package/dist/projections/declarative/ChildrenOrderingAlreadyDefined.d.ts +6 -0
- package/dist/projections/declarative/ChildrenOrderingAlreadyDefined.d.ts.map +1 -0
- package/dist/projections/declarative/ChildrenOrderingAlreadyDefined.js +11 -0
- package/dist/projections/declarative/ChildrenOrderingAlreadyDefined.js.map +1 -0
- package/dist/projections/declarative/DictionaryKey.d.ts +48 -0
- package/dist/projections/declarative/DictionaryKey.d.ts.map +1 -0
- package/dist/projections/declarative/DictionaryKey.js +82 -0
- package/dist/projections/declarative/DictionaryKey.js.map +1 -0
- package/dist/projections/declarative/FromAllBuilder.d.ts +2 -0
- package/dist/projections/declarative/FromAllBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromAllBuilder.js +5 -0
- package/dist/projections/declarative/FromAllBuilder.js.map +1 -1
- package/dist/projections/declarative/FromBuilder.d.ts +18 -6
- package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromBuilder.js +34 -31
- package/dist/projections/declarative/FromBuilder.js.map +1 -1
- package/dist/projections/declarative/FromEveryBuilder.d.ts +2 -0
- package/dist/projections/declarative/FromEveryBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromEveryBuilder.js +7 -0
- package/dist/projections/declarative/FromEveryBuilder.js.map +1 -1
- package/dist/projections/declarative/IAllSetBuilder.d.ts +7 -0
- package/dist/projections/declarative/IAllSetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IChildrenBuilder.d.ts +19 -0
- package/dist/projections/declarative/IChildrenBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IFromAllBuilder.d.ts +6 -0
- package/dist/projections/declarative/IFromAllBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IFromEveryBuilder.d.ts +6 -0
- package/dist/projections/declarative/IFromEveryBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts +37 -6
- package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/ISetBuilder.d.ts +7 -0
- package/dist/projections/declarative/ISetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/InvalidDictionaryKey.d.ts +10 -0
- package/dist/projections/declarative/InvalidDictionaryKey.d.ts.map +1 -0
- package/dist/projections/declarative/InvalidDictionaryKey.js +16 -0
- package/dist/projections/declarative/InvalidDictionaryKey.js.map +1 -0
- package/dist/projections/declarative/JoinBuilder.d.ts +18 -6
- package/dist/projections/declarative/JoinBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/JoinBuilder.js +34 -31
- package/dist/projections/declarative/JoinBuilder.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts +2 -0
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -1
- package/dist/projections/declarative/SetBuilder.d.ts +3 -0
- package/dist/projections/declarative/SetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/SetBuilder.js +6 -0
- package/dist/projections/declarative/SetBuilder.js.map +1 -1
- package/dist/projections/declarative/index.d.ts +4 -0
- package/dist/projections/declarative/index.d.ts.map +1 -1
- package/dist/projections/declarative/index.js +3 -0
- package/dist/projections/declarative/index.js.map +1 -1
- package/dist/projections/for_Graphs/given/a_discovered_graph.d.ts +29 -0
- package/dist/projections/for_Graphs/given/a_discovered_graph.d.ts.map +1 -0
- package/dist/projections/for_Graphs/given/a_discovered_graph.js +19 -0
- package/dist/projections/for_Graphs/given/a_discovered_graph.js.map +1 -0
- package/dist/projections/for_Graphs/given/a_fake_connection.d.ts +24 -0
- package/dist/projections/for_Graphs/given/a_fake_connection.d.ts.map +1 -0
- package/dist/projections/for_Graphs/given/a_fake_connection.js +17 -0
- package/dist/projections/for_Graphs/given/a_fake_connection.js.map +1 -0
- package/dist/projections/for_Graphs/given/organization.d.ts +43 -0
- package/dist/projections/for_Graphs/given/organization.d.ts.map +1 -0
- package/dist/projections/for_Graphs/given/organization.js +84 -0
- package/dist/projections/for_Graphs/given/organization.js.map +1 -0
- package/dist/projections/graphs/EdgeCanHaveOnlyOneIdentifyingKey.d.ts +11 -0
- package/dist/projections/graphs/EdgeCanHaveOnlyOneIdentifyingKey.d.ts.map +1 -0
- package/dist/projections/graphs/EdgeCanHaveOnlyOneIdentifyingKey.js +16 -0
- package/dist/projections/graphs/EdgeCanHaveOnlyOneIdentifyingKey.js.map +1 -0
- package/dist/projections/graphs/EdgeMustHaveOneSourceAndOneTarget.d.ts +11 -0
- package/dist/projections/graphs/EdgeMustHaveOneSourceAndOneTarget.d.ts.map +1 -0
- package/dist/projections/graphs/EdgeMustHaveOneSourceAndOneTarget.js +16 -0
- package/dist/projections/graphs/EdgeMustHaveOneSourceAndOneTarget.js.map +1 -0
- package/dist/projections/graphs/GraphDeclaredMoreThanOnce.d.ts +11 -0
- package/dist/projections/graphs/GraphDeclaredMoreThanOnce.d.ts.map +1 -0
- package/dist/projections/graphs/GraphDeclaredMoreThanOnce.js +16 -0
- package/dist/projections/graphs/GraphDeclaredMoreThanOnce.js.map +1 -0
- package/dist/projections/graphs/GraphDefinitionBuilder.d.ts +24 -0
- package/dist/projections/graphs/GraphDefinitionBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphDefinitionBuilder.js +148 -0
- package/dist/projections/graphs/GraphDefinitionBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphEdgeBuilder.d.ts +41 -0
- package/dist/projections/graphs/GraphEdgeBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphEdgeBuilder.js +94 -0
- package/dist/projections/graphs/GraphEdgeBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphEdgeFromBuilder.d.ts +25 -0
- package/dist/projections/graphs/GraphEdgeFromBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphEdgeFromBuilder.js +37 -0
- package/dist/projections/graphs/GraphEdgeFromBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphEdgeFromModel.d.ts +16 -0
- package/dist/projections/graphs/GraphEdgeFromModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphEdgeFromModel.js +4 -0
- package/dist/projections/graphs/GraphEdgeFromModel.js.map +1 -0
- package/dist/projections/graphs/GraphEdgeModel.d.ts +24 -0
- package/dist/projections/graphs/GraphEdgeModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphEdgeModel.js +4 -0
- package/dist/projections/graphs/GraphEdgeModel.js.map +1 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithBuilder.d.ts +21 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithBuilder.js +31 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithModel.d.ts +14 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithModel.js +4 -0
- package/dist/projections/graphs/GraphEdgeRemovedWithModel.js.map +1 -0
- package/dist/projections/graphs/GraphElementCannotBeReadModel.d.ts +11 -0
- package/dist/projections/graphs/GraphElementCannotBeReadModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphElementCannotBeReadModel.js +16 -0
- package/dist/projections/graphs/GraphElementCannotBeReadModel.js.map +1 -0
- package/dist/projections/graphs/GraphHasDuplicateElement.d.ts +13 -0
- package/dist/projections/graphs/GraphHasDuplicateElement.d.ts.map +1 -0
- package/dist/projections/graphs/GraphHasDuplicateElement.js +18 -0
- package/dist/projections/graphs/GraphHasDuplicateElement.js.map +1 -0
- package/dist/projections/graphs/GraphKeyPropertyNotFound.d.ts +12 -0
- package/dist/projections/graphs/GraphKeyPropertyNotFound.d.ts.map +1 -0
- package/dist/projections/graphs/GraphKeyPropertyNotFound.js +17 -0
- package/dist/projections/graphs/GraphKeyPropertyNotFound.js.map +1 -0
- package/dist/projections/graphs/GraphMappingBuilder.d.ts +32 -0
- package/dist/projections/graphs/GraphMappingBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphMappingBuilder.js +48 -0
- package/dist/projections/graphs/GraphMappingBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphMemberMappings.d.ts +9 -0
- package/dist/projections/graphs/GraphMemberMappings.d.ts.map +1 -0
- package/dist/projections/graphs/GraphMemberMappings.js +59 -0
- package/dist/projections/graphs/GraphMemberMappings.js.map +1 -0
- package/dist/projections/graphs/GraphModel.d.ts +15 -0
- package/dist/projections/graphs/GraphModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphModel.js +4 -0
- package/dist/projections/graphs/GraphModel.js.map +1 -0
- package/dist/projections/graphs/GraphNameRequired.d.ts +11 -0
- package/dist/projections/graphs/GraphNameRequired.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNameRequired.js +16 -0
- package/dist/projections/graphs/GraphNameRequired.js.map +1 -0
- package/dist/projections/graphs/GraphNodeBuilder.d.ts +34 -0
- package/dist/projections/graphs/GraphNodeBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNodeBuilder.js +66 -0
- package/dist/projections/graphs/GraphNodeBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphNodeFromBuilder.d.ts +21 -0
- package/dist/projections/graphs/GraphNodeFromBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNodeFromBuilder.js +30 -0
- package/dist/projections/graphs/GraphNodeFromBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphNodeFromModel.d.ts +14 -0
- package/dist/projections/graphs/GraphNodeFromModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNodeFromModel.js +4 -0
- package/dist/projections/graphs/GraphNodeFromModel.js.map +1 -0
- package/dist/projections/graphs/GraphNodeModel.d.ts +18 -0
- package/dist/projections/graphs/GraphNodeModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNodeModel.js +4 -0
- package/dist/projections/graphs/GraphNodeModel.js.map +1 -0
- package/dist/projections/graphs/GraphNodeRemovedWithBuilder.d.ts +17 -0
- package/dist/projections/graphs/GraphNodeRemovedWithBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNodeRemovedWithBuilder.js +24 -0
- package/dist/projections/graphs/GraphNodeRemovedWithBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphNodeRemovedWithModel.d.ts +12 -0
- package/dist/projections/graphs/GraphNodeRemovedWithModel.d.ts.map +1 -0
- package/dist/projections/graphs/GraphNodeRemovedWithModel.js +4 -0
- package/dist/projections/graphs/GraphNodeRemovedWithModel.js.map +1 -0
- package/dist/projections/graphs/GraphProjectionBuilder.d.ts +25 -0
- package/dist/projections/graphs/GraphProjectionBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/GraphProjectionBuilder.js +36 -0
- package/dist/projections/graphs/GraphProjectionBuilder.js.map +1 -0
- package/dist/projections/graphs/GraphRegistration.d.ts +14 -0
- package/dist/projections/graphs/GraphRegistration.d.ts.map +1 -0
- package/dist/projections/graphs/GraphRegistration.js +4 -0
- package/dist/projections/graphs/GraphRegistration.js.map +1 -0
- package/dist/projections/graphs/GraphSchemaWriter.d.ts +28 -0
- package/dist/projections/graphs/GraphSchemaWriter.d.ts.map +1 -0
- package/dist/projections/graphs/GraphSchemaWriter.js +76 -0
- package/dist/projections/graphs/GraphSchemaWriter.js.map +1 -0
- package/dist/projections/graphs/Graphs.d.ts +39 -0
- package/dist/projections/graphs/Graphs.d.ts.map +1 -0
- package/dist/projections/graphs/Graphs.js +144 -0
- package/dist/projections/graphs/Graphs.js.map +1 -0
- package/dist/projections/graphs/IGraphEdgeBuilder.d.ts +37 -0
- package/dist/projections/graphs/IGraphEdgeBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphEdgeBuilder.js +4 -0
- package/dist/projections/graphs/IGraphEdgeBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphEdgeFromBuilder.d.ts +29 -0
- package/dist/projections/graphs/IGraphEdgeFromBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphEdgeFromBuilder.js +4 -0
- package/dist/projections/graphs/IGraphEdgeFromBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphEdgeRemovedWithBuilder.d.ts +27 -0
- package/dist/projections/graphs/IGraphEdgeRemovedWithBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphEdgeRemovedWithBuilder.js +4 -0
- package/dist/projections/graphs/IGraphEdgeRemovedWithBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphMappingBuilder.d.ts +49 -0
- package/dist/projections/graphs/IGraphMappingBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphMappingBuilder.js +4 -0
- package/dist/projections/graphs/IGraphMappingBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphNodeBuilder.d.ts +32 -0
- package/dist/projections/graphs/IGraphNodeBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphNodeBuilder.js +4 -0
- package/dist/projections/graphs/IGraphNodeBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphNodeFromBuilder.d.ts +21 -0
- package/dist/projections/graphs/IGraphNodeFromBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphNodeFromBuilder.js +4 -0
- package/dist/projections/graphs/IGraphNodeFromBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphNodeRemovedWithBuilder.d.ts +19 -0
- package/dist/projections/graphs/IGraphNodeRemovedWithBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphNodeRemovedWithBuilder.js +4 -0
- package/dist/projections/graphs/IGraphNodeRemovedWithBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphProjection.d.ts +13 -0
- package/dist/projections/graphs/IGraphProjection.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphProjection.js +4 -0
- package/dist/projections/graphs/IGraphProjection.js.map +1 -0
- package/dist/projections/graphs/IGraphProjectionBuilder.d.ts +26 -0
- package/dist/projections/graphs/IGraphProjectionBuilder.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphProjectionBuilder.js +4 -0
- package/dist/projections/graphs/IGraphProjectionBuilder.js.map +1 -0
- package/dist/projections/graphs/IGraphs.d.ts +27 -0
- package/dist/projections/graphs/IGraphs.d.ts.map +1 -0
- package/dist/projections/graphs/IGraphs.js +4 -0
- package/dist/projections/graphs/IGraphs.js.map +1 -0
- package/dist/projections/graphs/ModelBoundGraphReader.d.ts +30 -0
- package/dist/projections/graphs/ModelBoundGraphReader.d.ts.map +1 -0
- package/dist/projections/graphs/ModelBoundGraphReader.js +112 -0
- package/dist/projections/graphs/ModelBoundGraphReader.js.map +1 -0
- package/dist/projections/graphs/NestedObjectInGraph.d.ts +12 -0
- package/dist/projections/graphs/NestedObjectInGraph.d.ts.map +1 -0
- package/dist/projections/graphs/NestedObjectInGraph.js +17 -0
- package/dist/projections/graphs/NestedObjectInGraph.js.map +1 -0
- package/dist/projections/graphs/NodeMustHaveExactlyOneKey.d.ts +12 -0
- package/dist/projections/graphs/NodeMustHaveExactlyOneKey.d.ts.map +1 -0
- package/dist/projections/graphs/NodeMustHaveExactlyOneKey.js +17 -0
- package/dist/projections/graphs/NodeMustHaveExactlyOneKey.js.map +1 -0
- package/dist/projections/graphs/SetOnceNotSupportedInGraph.d.ts +13 -0
- package/dist/projections/graphs/SetOnceNotSupportedInGraph.d.ts.map +1 -0
- package/dist/projections/graphs/SetOnceNotSupportedInGraph.js +18 -0
- package/dist/projections/graphs/SetOnceNotSupportedInGraph.js.map +1 -0
- package/dist/projections/graphs/UnknownGraphEventProperty.d.ts +13 -0
- package/dist/projections/graphs/UnknownGraphEventProperty.d.ts.map +1 -0
- package/dist/projections/graphs/UnknownGraphEventProperty.js +18 -0
- package/dist/projections/graphs/UnknownGraphEventProperty.js.map +1 -0
- package/dist/projections/graphs/UnknownGraphNode.d.ts +12 -0
- package/dist/projections/graphs/UnknownGraphNode.d.ts.map +1 -0
- package/dist/projections/graphs/UnknownGraphNode.js +17 -0
- package/dist/projections/graphs/UnknownGraphNode.js.map +1 -0
- package/dist/projections/graphs/edge.d.ts +23 -0
- package/dist/projections/graphs/edge.d.ts.map +1 -0
- package/dist/projections/graphs/edge.js +29 -0
- package/dist/projections/graphs/edge.js.map +1 -0
- package/dist/projections/graphs/edgeFrom.d.ts +31 -0
- package/dist/projections/graphs/edgeFrom.d.ts.map +1 -0
- package/dist/projections/graphs/edgeFrom.js +26 -0
- package/dist/projections/graphs/edgeFrom.js.map +1 -0
- package/dist/projections/graphs/edgeRemovedWith.d.ts +22 -0
- package/dist/projections/graphs/edgeRemovedWith.d.ts.map +1 -0
- package/dist/projections/graphs/edgeRemovedWith.js +25 -0
- package/dist/projections/graphs/edgeRemovedWith.js.map +1 -0
- package/dist/projections/graphs/edgeSource.d.ts +22 -0
- package/dist/projections/graphs/edgeSource.d.ts.map +1 -0
- package/dist/projections/graphs/edgeSource.js +30 -0
- package/dist/projections/graphs/edgeSource.js.map +1 -0
- package/dist/projections/graphs/edgeTarget.d.ts +22 -0
- package/dist/projections/graphs/edgeTarget.d.ts.map +1 -0
- package/dist/projections/graphs/edgeTarget.js +30 -0
- package/dist/projections/graphs/edgeTarget.js.map +1 -0
- package/dist/projections/graphs/graph.d.ts +16 -0
- package/dist/projections/graphs/graph.d.ts.map +1 -0
- package/dist/projections/graphs/graph.js +24 -0
- package/dist/projections/graphs/graph.js.map +1 -0
- package/dist/projections/graphs/graphKey.d.ts +16 -0
- package/dist/projections/graphs/graphKey.d.ts.map +1 -0
- package/dist/projections/graphs/graphKey.js +28 -0
- package/dist/projections/graphs/graphKey.js.map +1 -0
- package/dist/projections/graphs/graphProjection.d.ts +21 -0
- package/dist/projections/graphs/graphProjection.d.ts.map +1 -0
- package/dist/projections/graphs/graphProjection.js +28 -0
- package/dist/projections/graphs/graphProjection.js.map +1 -0
- package/dist/projections/graphs/index.d.ts +49 -0
- package/dist/projections/graphs/index.d.ts.map +1 -0
- package/dist/projections/graphs/index.js +28 -0
- package/dist/projections/graphs/index.js.map +1 -0
- package/dist/projections/graphs/isGraphElement.d.ts +7 -0
- package/dist/projections/graphs/isGraphElement.d.ts.map +1 -0
- package/dist/projections/graphs/isGraphElement.js +13 -0
- package/dist/projections/graphs/isGraphElement.js.map +1 -0
- package/dist/projections/graphs/node.d.ts +22 -0
- package/dist/projections/graphs/node.d.ts.map +1 -0
- package/dist/projections/graphs/node.js +29 -0
- package/dist/projections/graphs/node.js.map +1 -0
- package/dist/projections/graphs/nodeFrom.d.ts +31 -0
- package/dist/projections/graphs/nodeFrom.d.ts.map +1 -0
- package/dist/projections/graphs/nodeFrom.js +26 -0
- package/dist/projections/graphs/nodeFrom.js.map +1 -0
- package/dist/projections/graphs/nodeRemovedWith.d.ts +28 -0
- package/dist/projections/graphs/nodeRemovedWith.d.ts.map +1 -0
- package/dist/projections/graphs/nodeRemovedWith.js +25 -0
- package/dist/projections/graphs/nodeRemovedWith.js.map +1 -0
- package/dist/projections/graphs/propertyPathOf.d.ts +8 -0
- package/dist/projections/graphs/propertyPathOf.d.ts.map +1 -0
- package/dist/projections/graphs/propertyPathOf.js +14 -0
- package/dist/projections/graphs/propertyPathOf.js.map +1 -0
- package/dist/projections/index.d.ts +6 -0
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/index.js +4 -0
- package/dist/projections/index.js.map +1 -1
- package/dist/projections/modelBound/ConflictingChildrenOrdering.d.ts +10 -0
- package/dist/projections/modelBound/ConflictingChildrenOrdering.d.ts.map +1 -0
- package/dist/projections/modelBound/ConflictingChildrenOrdering.js +16 -0
- package/dist/projections/modelBound/ConflictingChildrenOrdering.js.map +1 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts +2 -0
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.js +9 -5
- package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -1
- package/dist/projections/modelBound/childrenFrom.d.ts +39 -1
- package/dist/projections/modelBound/childrenFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenFrom.js +30 -1
- package/dist/projections/modelBound/childrenFrom.js.map +1 -1
- package/dist/projections/modelBound/index.d.ts +3 -2
- package/dist/projections/modelBound/index.d.ts.map +1 -1
- package/dist/projections/modelBound/index.js +1 -0
- package/dist/projections/modelBound/index.js.map +1 -1
- package/dist/projections/modelBound/setFrom.d.ts +26 -0
- package/dist/projections/modelBound/setFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/setFrom.js +15 -8
- package/dist/projections/modelBound/setFrom.js.map +1 -1
- package/dist/projections/modelBound/setFromContext.d.ts +23 -1
- package/dist/projections/modelBound/setFromContext.d.ts.map +1 -1
- package/dist/projections/modelBound/setFromContext.js +20 -2
- package/dist/projections/modelBound/setFromContext.js.map +1 -1
- package/dist/projections/propertyExpressions.d.ts +9 -0
- package/dist/projections/propertyExpressions.d.ts.map +1 -0
- package/dist/projections/propertyExpressions.js +13 -0
- package/dist/projections/propertyExpressions.js.map +1 -0
- package/dist/projections/registerProjectionWithRetry.d.ts +15 -0
- package/dist/projections/registerProjectionWithRetry.d.ts.map +1 -0
- package/dist/projections/registerProjectionWithRetry.js +44 -0
- package/dist/projections/registerProjectionWithRetry.js.map +1 -0
- package/dist/readModels/rootReadModelTypes.d.ts.map +1 -1
- package/dist/readModels/rootReadModelTypes.js +3 -1
- package/dist/readModels/rootReadModelTypes.js.map +1 -1
- package/dist/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +2 -1
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/sinks/WellKnownSinks.d.ts +4 -0
- package/dist/sinks/WellKnownSinks.d.ts.map +1 -1
- package/dist/sinks/WellKnownSinks.js +5 -1
- package/dist/sinks/WellKnownSinks.js.map +1 -1
- package/dist/testing/projections/ProjectionCapabilities.d.ts.map +1 -1
- package/dist/testing/projections/ProjectionCapabilities.js +2 -0
- package/dist/testing/projections/ProjectionCapabilities.js.map +1 -1
- package/dist/testing/projections/ProjectionChildrenCapabilities.d.ts.map +1 -1
- package/dist/testing/projections/ProjectionChildrenCapabilities.js +2 -0
- package/dist/testing/projections/ProjectionChildrenCapabilities.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/DecoratorType.d.ts +5 -1
- package/dist/types/DecoratorType.d.ts.map +1 -1
- package/dist/types/DecoratorType.js +4 -0
- package/dist/types/DecoratorType.js.map +1 -1
- package/for_ChronicleOptions/when_configuring_the_graph_sink/with_graph_sink_type.spec.ts +22 -0
- package/package.json +3 -3
- package/projections/ChildrenOrderingNotSupportedByContracts.ts +18 -0
- package/projections/InvalidCausedByProperty.ts +14 -0
- package/projections/Projections.ts +8 -29
- package/projections/causedBy.ts +30 -0
- package/projections/childrenOrdering.ts +53 -0
- package/projections/childrenOrderingSupport.ts +40 -0
- package/projections/declarative/AllSetBuilder.ts +7 -0
- package/projections/declarative/ChildrenBuilder.ts +34 -1
- package/projections/declarative/ChildrenOrderingAlreadyDefined.ts +11 -0
- package/projections/declarative/DictionaryKey.ts +88 -0
- package/projections/declarative/FromAllBuilder.ts +10 -0
- package/projections/declarative/FromBuilder.ts +42 -32
- package/projections/declarative/FromEveryBuilder.ts +12 -0
- package/projections/declarative/IAllSetBuilder.ts +8 -0
- package/projections/declarative/IChildrenBuilder.ts +22 -0
- package/projections/declarative/IFromAllBuilder.ts +7 -0
- package/projections/declarative/IFromEveryBuilder.ts +7 -0
- package/projections/declarative/IReadModelPropertiesBuilder.ts +39 -6
- package/projections/declarative/ISetBuilder.ts +8 -0
- package/projections/declarative/InvalidDictionaryKey.ts +14 -0
- package/projections/declarative/JoinBuilder.ts +41 -32
- package/projections/declarative/ProjectionBuilderCore.ts +2 -0
- package/projections/declarative/SetBuilder.ts +7 -0
- package/projections/declarative/for_ChildrenBuilder/when_ordering_children.spec.ts +52 -0
- package/projections/declarative/for_FromAllBuilder/when_setting_once.spec.ts +29 -0
- package/projections/declarative/for_FromBuilder/when_setting_once.spec.ts +39 -0
- package/projections/declarative/for_FromBuilder/when_targeting_dictionary_entries.spec.ts +99 -0
- package/projections/declarative/for_JoinBuilder/when_setting_once_and_targeting_dictionary_entries.spec.ts +36 -0
- package/projections/declarative/for_SetBuilder/when_setting_to_the_causing_identity.spec.ts +37 -0
- package/projections/declarative/index.ts +4 -0
- package/projections/for_Graphs/given/a_discovered_graph.ts +21 -0
- package/projections/for_Graphs/given/a_fake_connection.ts +19 -0
- package/projections/for_Graphs/given/organization.ts +96 -0
- package/projections/for_Graphs/when_building_a_fluent_graph.spec.ts +112 -0
- package/projections/for_Graphs/when_building_a_model_bound_graph.spec.ts +92 -0
- package/projections/for_Graphs/when_declaring_an_edge_with_an_identity.spec.ts +137 -0
- package/projections/for_Graphs/when_declaring_an_invalid_graph.spec.ts +227 -0
- package/projections/for_Graphs/when_declaring_with_standard_decorators.standard.spec.ts +92 -0
- package/projections/for_Graphs/when_discovering_graph_elements.spec.ts +32 -0
- package/projections/for_Graphs/when_mapping_properties.spec.ts +159 -0
- package/projections/for_Graphs/when_registering_graphs.spec.ts +56 -0
- package/projections/for_Projections/when_registering_ordered_children.spec.ts +66 -0
- package/projections/for_childrenOrderingSupport/when_detecting_support_in_the_pinned_contracts.spec.ts +22 -0
- package/projections/for_childrenOrderingSupport/when_ensuring_children_ordering_is_supported.spec.ts +35 -0
- package/projections/graphs/EdgeCanHaveOnlyOneIdentifyingKey.ts +16 -0
- package/projections/graphs/EdgeMustHaveOneSourceAndOneTarget.ts +16 -0
- package/projections/graphs/GraphDeclaredMoreThanOnce.ts +16 -0
- package/projections/graphs/GraphDefinitionBuilder.ts +169 -0
- package/projections/graphs/GraphEdgeBuilder.ts +107 -0
- package/projections/graphs/GraphEdgeFromBuilder.ts +47 -0
- package/projections/graphs/GraphEdgeFromModel.ts +22 -0
- package/projections/graphs/GraphEdgeModel.ts +34 -0
- package/projections/graphs/GraphEdgeRemovedWithBuilder.ts +39 -0
- package/projections/graphs/GraphEdgeRemovedWithModel.ts +19 -0
- package/projections/graphs/GraphElementCannotBeReadModel.ts +16 -0
- package/projections/graphs/GraphHasDuplicateElement.ts +18 -0
- package/projections/graphs/GraphKeyPropertyNotFound.ts +17 -0
- package/projections/graphs/GraphMappingBuilder.ts +65 -0
- package/projections/graphs/GraphMemberMappings.ts +60 -0
- package/projections/graphs/GraphModel.ts +20 -0
- package/projections/graphs/GraphNameRequired.ts +16 -0
- package/projections/graphs/GraphNodeBuilder.ts +76 -0
- package/projections/graphs/GraphNodeFromBuilder.ts +38 -0
- package/projections/graphs/GraphNodeFromModel.ts +19 -0
- package/projections/graphs/GraphNodeModel.ts +25 -0
- package/projections/graphs/GraphNodeRemovedWithBuilder.ts +30 -0
- package/projections/graphs/GraphNodeRemovedWithModel.ts +16 -0
- package/projections/graphs/GraphProjectionBuilder.ts +52 -0
- package/projections/graphs/GraphRegistration.ts +19 -0
- package/projections/graphs/GraphSchemaWriter.ts +80 -0
- package/projections/graphs/Graphs.ts +165 -0
- package/projections/graphs/IGraphEdgeBuilder.ts +43 -0
- package/projections/graphs/IGraphEdgeFromBuilder.ts +34 -0
- package/projections/graphs/IGraphEdgeRemovedWithBuilder.ts +32 -0
- package/projections/graphs/IGraphMappingBuilder.ts +57 -0
- package/projections/graphs/IGraphNodeBuilder.ts +37 -0
- package/projections/graphs/IGraphNodeFromBuilder.ts +25 -0
- package/projections/graphs/IGraphNodeRemovedWithBuilder.ts +23 -0
- package/projections/graphs/IGraphProjection.ts +16 -0
- package/projections/graphs/IGraphProjectionBuilder.ts +34 -0
- package/projections/graphs/IGraphs.ts +33 -0
- package/projections/graphs/ModelBoundGraphReader.ts +119 -0
- package/projections/graphs/NestedObjectInGraph.ts +17 -0
- package/projections/graphs/NodeMustHaveExactlyOneKey.ts +17 -0
- package/projections/graphs/SetOnceNotSupportedInGraph.ts +18 -0
- package/projections/graphs/UnknownGraphEventProperty.ts +18 -0
- package/projections/graphs/UnknownGraphNode.ts +17 -0
- package/projections/graphs/edge.ts +40 -0
- package/projections/graphs/edgeFrom.ts +48 -0
- package/projections/graphs/edgeRemovedWith.ts +36 -0
- package/projections/graphs/edgeSource.ts +39 -0
- package/projections/graphs/edgeTarget.ts +39 -0
- package/projections/graphs/graph.ts +28 -0
- package/projections/graphs/graphKey.ts +31 -0
- package/projections/graphs/graphProjection.ts +39 -0
- package/projections/graphs/index.ts +51 -0
- package/projections/graphs/isGraphElement.ts +14 -0
- package/projections/graphs/node.ts +40 -0
- package/projections/graphs/nodeFrom.ts +48 -0
- package/projections/graphs/nodeRemovedWith.ts +44 -0
- package/projections/graphs/propertyPathOf.ts +15 -0
- package/projections/index.ts +6 -0
- package/projections/modelBound/ConflictingChildrenOrdering.ts +14 -0
- package/projections/modelBound/childrenAndNestedBuilder.ts +11 -5
- package/projections/modelBound/childrenFrom.ts +62 -2
- package/projections/modelBound/for_childrenFrom/when_ordering_children.spec.ts +91 -0
- package/projections/modelBound/for_setFrom/when_setting_once.spec.ts +52 -0
- package/projections/modelBound/index.ts +3 -2
- package/projections/modelBound/setFrom.ts +37 -2
- package/projections/modelBound/setFromContext.ts +38 -3
- package/projections/propertyExpressions.ts +14 -0
- package/projections/registerProjectionWithRetry.ts +53 -0
- package/readModels/rootReadModelTypes.ts +3 -1
- package/reducers/Reducers.ts +2 -1
- package/sinks/WellKnownSinks.ts +7 -1
- package/testing/projections/ProjectionCapabilities.ts +1 -0
- package/testing/projections/ProjectionChildrenCapabilities.ts +1 -0
- package/testing/projections/for_ProjectionCapabilities/when_rejecting_set_once_dictionary_entries_and_ordered_children.spec.ts +52 -0
- package/types/DecoratorType.ts +7 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeBuilder.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeBuilder.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PropertyAccessor } from '@cratis/fundamentals';
|
|
2
|
+
import { GraphMappingBuilder } from './GraphMappingBuilder.js';
|
|
3
|
+
import type { IGraphEdgeFromBuilder } from './IGraphEdgeFromBuilder.js';
|
|
4
|
+
/**
|
|
5
|
+
* Implements {@link IGraphEdgeFromBuilder}.
|
|
6
|
+
* @template TEdge - The type of edge.
|
|
7
|
+
* @template TEvent - The type of event.
|
|
8
|
+
*/
|
|
9
|
+
export declare class GraphEdgeFromBuilder<TEdge, TEvent> extends GraphMappingBuilder<TEdge, TEvent, IGraphEdgeFromBuilder<TEdge, TEvent>> implements IGraphEdgeFromBuilder<TEdge, TEvent> {
|
|
10
|
+
/** The expression for the key of the source node, or undefined for the event source id. */
|
|
11
|
+
sourceKey?: string;
|
|
12
|
+
/** The expression for the key of the target node, or undefined for the event source id. */
|
|
13
|
+
targetKey?: string;
|
|
14
|
+
/** The expression for the identity of the edge. */
|
|
15
|
+
identity?: string;
|
|
16
|
+
/** @inheritdoc */
|
|
17
|
+
protected get self(): IGraphEdgeFromBuilder<TEdge, TEvent>;
|
|
18
|
+
/** @inheritdoc */
|
|
19
|
+
usingSourceKey(keyAccessor: PropertyAccessor<TEvent>): IGraphEdgeFromBuilder<TEdge, TEvent>;
|
|
20
|
+
/** @inheritdoc */
|
|
21
|
+
usingTargetKey(keyAccessor: PropertyAccessor<TEvent>): IGraphEdgeFromBuilder<TEdge, TEvent>;
|
|
22
|
+
/** @inheritdoc */
|
|
23
|
+
usingIdentity(identityAccessor: PropertyAccessor<TEvent>): IGraphEdgeFromBuilder<TEdge, TEvent>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=GraphEdgeFromBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeFromBuilder.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeFromBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE;;;;GAIG;AACH,qBAAa,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAC5H,YAAW,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC;IAC/C,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,kBAAkB;IAClB,SAAS,KAAK,IAAI,IAAI,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAEzD;IAED,kBAAkB;IAClB,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAG1F;IAED,kBAAkB;IAClB,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAG1F;IAED,kBAAkB;IAClB,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAG9F;CACJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { GraphMappingBuilder } from './GraphMappingBuilder.js';
|
|
4
|
+
import { propertyPathOf } from './propertyPathOf.js';
|
|
5
|
+
/**
|
|
6
|
+
* Implements {@link IGraphEdgeFromBuilder}.
|
|
7
|
+
* @template TEdge - The type of edge.
|
|
8
|
+
* @template TEvent - The type of event.
|
|
9
|
+
*/
|
|
10
|
+
export class GraphEdgeFromBuilder extends GraphMappingBuilder {
|
|
11
|
+
/** The expression for the key of the source node, or undefined for the event source id. */
|
|
12
|
+
sourceKey;
|
|
13
|
+
/** The expression for the key of the target node, or undefined for the event source id. */
|
|
14
|
+
targetKey;
|
|
15
|
+
/** The expression for the identity of the edge. */
|
|
16
|
+
identity;
|
|
17
|
+
/** @inheritdoc */
|
|
18
|
+
get self() {
|
|
19
|
+
return this;
|
|
20
|
+
}
|
|
21
|
+
/** @inheritdoc */
|
|
22
|
+
usingSourceKey(keyAccessor) {
|
|
23
|
+
this.sourceKey = propertyPathOf(keyAccessor);
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
/** @inheritdoc */
|
|
27
|
+
usingTargetKey(keyAccessor) {
|
|
28
|
+
this.targetKey = propertyPathOf(keyAccessor);
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
/** @inheritdoc */
|
|
32
|
+
usingIdentity(identityAccessor) {
|
|
33
|
+
this.identity = propertyPathOf(identityAccessor);
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=GraphEdgeFromBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeFromBuilder.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeFromBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;GAIG;AACH,MAAM,OAAO,oBAAoC,SAAQ,mBAAwE;IAE7H,2FAA2F;IAC3F,SAAS,CAAU;IAEnB,2FAA2F;IAC3F,SAAS,CAAU;IAEnB,mDAAmD;IACnD,QAAQ,CAAU;IAElB,kBAAkB;IAClB,IAAc,IAAI;QACd,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,cAAc,CAAC,WAAqC;QAChD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,cAAc,CAAC,WAAqC;QAChD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,aAAa,CAAC,gBAA0C;QACpD,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents how an event creates or updates an edge.
|
|
3
|
+
*/
|
|
4
|
+
export interface GraphEdgeFromModel {
|
|
5
|
+
/** The event type. */
|
|
6
|
+
readonly eventType: Function;
|
|
7
|
+
/** The expression for the key of the source node, or undefined for the event source id. */
|
|
8
|
+
readonly sourceKey?: string;
|
|
9
|
+
/** The expression for the key of the target node, or undefined for the event source id. */
|
|
10
|
+
readonly targetKey?: string;
|
|
11
|
+
/** The expression for the identity of the edge, for an edge type with an identifying property. */
|
|
12
|
+
readonly identity?: string;
|
|
13
|
+
/** The property mapping expressions by edge property name. */
|
|
14
|
+
readonly properties: Readonly<Record<string, string>>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=GraphEdgeFromModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeFromModel.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeFromModel.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;IAE7B,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeFromModel.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeFromModel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GraphEdgeFromModel } from './GraphEdgeFromModel.js';
|
|
2
|
+
import type { GraphEdgeRemovedWithModel } from './GraphEdgeRemovedWithModel.js';
|
|
3
|
+
/**
|
|
4
|
+
* Represents an edge type with what it is projected from.
|
|
5
|
+
*/
|
|
6
|
+
export interface GraphEdgeModel {
|
|
7
|
+
/** The type of the edge. */
|
|
8
|
+
readonly type: Function;
|
|
9
|
+
/** The edge type name, for example MEMBER_OF. */
|
|
10
|
+
readonly edgeType: string;
|
|
11
|
+
/** The type of the node the edge starts at. */
|
|
12
|
+
readonly sourceNode: Function;
|
|
13
|
+
/** The type of the node the edge ends at. */
|
|
14
|
+
readonly targetNode: Function;
|
|
15
|
+
/** The name of the identifying property, if any. */
|
|
16
|
+
readonly identifyingProperty?: string;
|
|
17
|
+
/** The names of the members that are not properties of the edge: the ones holding the keys of the end nodes. */
|
|
18
|
+
readonly excludedProperties: readonly string[];
|
|
19
|
+
/** The mappings that create or update edges. */
|
|
20
|
+
readonly from: readonly GraphEdgeFromModel[];
|
|
21
|
+
/** The mappings that delete edges. */
|
|
22
|
+
readonly removedWith: readonly GraphEdgeRemovedWithModel[];
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=GraphEdgeModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeModel.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeModel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAExB,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;IAE9B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC;IAE9B,oDAAoD;IACpD,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAEtC,gHAAgH;IAChH,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IAE/C,gDAAgD;IAChD,QAAQ,CAAC,IAAI,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAE7C,sCAAsC;IACtC,QAAQ,CAAC,WAAW,EAAE,SAAS,yBAAyB,EAAE,CAAC;CAC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeModel.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeModel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PropertyAccessor } from '@cratis/fundamentals';
|
|
2
|
+
import type { IGraphEdgeRemovedWithBuilder } from './IGraphEdgeRemovedWithBuilder.js';
|
|
3
|
+
/**
|
|
4
|
+
* Implements {@link IGraphEdgeRemovedWithBuilder}.
|
|
5
|
+
* @template TEvent - The type of event.
|
|
6
|
+
*/
|
|
7
|
+
export declare class GraphEdgeRemovedWithBuilder<TEvent> implements IGraphEdgeRemovedWithBuilder<TEvent> {
|
|
8
|
+
/** The expression for the key of the source node, or undefined for the event source id. */
|
|
9
|
+
sourceKey?: string;
|
|
10
|
+
/** The expression for the key of the target node, or undefined for the event source id. */
|
|
11
|
+
targetKey?: string;
|
|
12
|
+
/** The expression for the identity of the edge. */
|
|
13
|
+
identity?: string;
|
|
14
|
+
/** @inheritdoc */
|
|
15
|
+
usingSourceKey(keyAccessor: PropertyAccessor<TEvent>): IGraphEdgeRemovedWithBuilder<TEvent>;
|
|
16
|
+
/** @inheritdoc */
|
|
17
|
+
usingTargetKey(keyAccessor: PropertyAccessor<TEvent>): IGraphEdgeRemovedWithBuilder<TEvent>;
|
|
18
|
+
/** @inheritdoc */
|
|
19
|
+
usingIdentity(identityAccessor: PropertyAccessor<TEvent>): IGraphEdgeRemovedWithBuilder<TEvent>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=GraphEdgeRemovedWithBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeRemovedWithBuilder.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeRemovedWithBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAGtF;;;GAGG;AACH,qBAAa,2BAA2B,CAAC,MAAM,CAAE,YAAW,4BAA4B,CAAC,MAAM,CAAC;IAC5F,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,2FAA2F;IAC3F,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,kBAAkB;IAClB,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAG1F;IAED,kBAAkB;IAClB,cAAc,CAAC,WAAW,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAG1F;IAED,kBAAkB;IAClB,aAAa,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC,MAAM,CAAC,CAG9F;CACJ"}
|
|
@@ -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 { propertyPathOf } from './propertyPathOf.js';
|
|
4
|
+
/**
|
|
5
|
+
* Implements {@link IGraphEdgeRemovedWithBuilder}.
|
|
6
|
+
* @template TEvent - The type of event.
|
|
7
|
+
*/
|
|
8
|
+
export class GraphEdgeRemovedWithBuilder {
|
|
9
|
+
/** The expression for the key of the source node, or undefined for the event source id. */
|
|
10
|
+
sourceKey;
|
|
11
|
+
/** The expression for the key of the target node, or undefined for the event source id. */
|
|
12
|
+
targetKey;
|
|
13
|
+
/** The expression for the identity of the edge. */
|
|
14
|
+
identity;
|
|
15
|
+
/** @inheritdoc */
|
|
16
|
+
usingSourceKey(keyAccessor) {
|
|
17
|
+
this.sourceKey = propertyPathOf(keyAccessor);
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
/** @inheritdoc */
|
|
21
|
+
usingTargetKey(keyAccessor) {
|
|
22
|
+
this.targetKey = propertyPathOf(keyAccessor);
|
|
23
|
+
return this;
|
|
24
|
+
}
|
|
25
|
+
/** @inheritdoc */
|
|
26
|
+
usingIdentity(identityAccessor) {
|
|
27
|
+
this.identity = propertyPathOf(identityAccessor);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=GraphEdgeRemovedWithBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeRemovedWithBuilder.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeRemovedWithBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAIrG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IACpC,2FAA2F;IAC3F,SAAS,CAAU;IAEnB,2FAA2F;IAC3F,SAAS,CAAU;IAEnB,mDAAmD;IACnD,QAAQ,CAAU;IAElB,kBAAkB;IAClB,cAAc,CAAC,WAAqC;QAChD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,cAAc,CAAC,WAAqC;QAChD,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,kBAAkB;IAClB,aAAa,CAAC,gBAA0C;QACpD,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents how an event deletes an edge.
|
|
3
|
+
*/
|
|
4
|
+
export interface GraphEdgeRemovedWithModel {
|
|
5
|
+
/** The event type. */
|
|
6
|
+
readonly eventType: Function;
|
|
7
|
+
/** The expression for the key of the source node, or undefined for the event source id. */
|
|
8
|
+
readonly sourceKey?: string;
|
|
9
|
+
/** The expression for the key of the target node, or undefined for the event source id. */
|
|
10
|
+
readonly targetKey?: string;
|
|
11
|
+
/** The expression for the identity of the edge, for an edge type with an identifying property. */
|
|
12
|
+
readonly identity?: string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=GraphEdgeRemovedWithModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeRemovedWithModel.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeRemovedWithModel.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,sBAAsB;IACtB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC;IAE7B,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,2FAA2F;IAC3F,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B,kGAAkG;IAClG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeRemovedWithModel.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeRemovedWithModel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when a node or an edge is also declared as a read model with the fromEvent decorator.
|
|
3
|
+
*/
|
|
4
|
+
export declare class GraphElementCannotBeReadModel extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new {@link GraphElementCannotBeReadModel}.
|
|
7
|
+
* @param type - The type.
|
|
8
|
+
*/
|
|
9
|
+
constructor(type: Function);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=GraphElementCannotBeReadModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphElementCannotBeReadModel.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphElementCannotBeReadModel.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;IACpD;;;OAGG;IACH,YAAY,IAAI,EAAE,QAAQ,EAGzB;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/**
|
|
4
|
+
* Error thrown when a node or an edge is also declared as a read model with the fromEvent decorator.
|
|
5
|
+
*/
|
|
6
|
+
export class GraphElementCannotBeReadModel extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new {@link GraphElementCannotBeReadModel}.
|
|
9
|
+
* @param type - The type.
|
|
10
|
+
*/
|
|
11
|
+
constructor(type) {
|
|
12
|
+
super(`The type '${type.name}' is a node or an edge in a graph and cannot also be a read model.`);
|
|
13
|
+
this.name = 'GraphElementCannotBeReadModel';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=GraphElementCannotBeReadModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphElementCannotBeReadModel.js","sourceRoot":"","sources":["../../../projections/graphs/GraphElementCannotBeReadModel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG;;GAEG;AACH,MAAM,OAAO,6BAA8B,SAAQ,KAAK;IACpD;;;OAGG;IACH,YAAY,IAAc;QACtB,KAAK,CAAC,aAAa,IAAI,CAAC,IAAI,oEAAoE,CAAC,CAAC;QAClG,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;IAChD,CAAC;CACJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when a graph has two nodes with the same label or two edges of the same type.
|
|
3
|
+
*/
|
|
4
|
+
export declare class GraphHasDuplicateElement extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new {@link GraphHasDuplicateElement}.
|
|
7
|
+
* @param graph - The name of the graph.
|
|
8
|
+
* @param kind - Either node or edge.
|
|
9
|
+
* @param name - The label or type.
|
|
10
|
+
*/
|
|
11
|
+
constructor(graph: string, kind: string, name: string);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=GraphHasDuplicateElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphHasDuplicateElement.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphHasDuplicateElement.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IAC/C;;;;;OAKG;IACH,YAAY,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAGpD;CACJ"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
/**
|
|
4
|
+
* Error thrown when a graph has two nodes with the same label or two edges of the same type.
|
|
5
|
+
*/
|
|
6
|
+
export class GraphHasDuplicateElement extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new {@link GraphHasDuplicateElement}.
|
|
9
|
+
* @param graph - The name of the graph.
|
|
10
|
+
* @param kind - Either node or edge.
|
|
11
|
+
* @param name - The label or type.
|
|
12
|
+
*/
|
|
13
|
+
constructor(graph, kind, name) {
|
|
14
|
+
super(`The graph '${graph}' declares the ${kind} '${name}' more than once.`);
|
|
15
|
+
this.name = 'GraphHasDuplicateElement';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=GraphHasDuplicateElement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphHasDuplicateElement.js","sourceRoot":"","sources":["../../../projections/graphs/GraphHasDuplicateElement.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAC/C;;;;;OAKG;IACH,YAAY,KAAa,EAAE,IAAY,EAAE,IAAY;QACjD,KAAK,CAAC,cAAc,KAAK,kBAAkB,IAAI,KAAK,IAAI,mBAAmB,CAAC,CAAC;QAC7E,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IAC3C,CAAC;CACJ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when the key of a node or the identity of an edge is not a property of its type.
|
|
3
|
+
*/
|
|
4
|
+
export declare class GraphKeyPropertyNotFound extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new {@link GraphKeyPropertyNotFound}.
|
|
7
|
+
* @param type - The node or edge type.
|
|
8
|
+
* @param property - The name of the key property.
|
|
9
|
+
*/
|
|
10
|
+
constructor(type: Function, property: string);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=GraphKeyPropertyNotFound.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphKeyPropertyNotFound.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphKeyPropertyNotFound.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IAC/C;;;;OAIG;IACH,YAAY,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAG3C;CACJ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
/**
|
|
4
|
+
* Error thrown when the key of a node or the identity of an edge is not a property of its type.
|
|
5
|
+
*/
|
|
6
|
+
export class GraphKeyPropertyNotFound extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new {@link GraphKeyPropertyNotFound}.
|
|
9
|
+
* @param type - The node or edge type.
|
|
10
|
+
* @param property - The name of the key property.
|
|
11
|
+
*/
|
|
12
|
+
constructor(type, property) {
|
|
13
|
+
super(`The key '${property}' of '${type.name}' is not a property of the type. Declare it with an initializer or with the field decorator so its type can be resolved.`);
|
|
14
|
+
this.name = 'GraphKeyPropertyNotFound';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=GraphKeyPropertyNotFound.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphKeyPropertyNotFound.js","sourceRoot":"","sources":["../../../projections/graphs/GraphKeyPropertyNotFound.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,KAAK;IAC/C;;;;OAIG;IACH,YAAY,IAAc,EAAE,QAAgB;QACxC,KAAK,CAAC,YAAY,QAAQ,SAAS,IAAI,CAAC,IAAI,0HAA0H,CAAC,CAAC;QACxK,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IAC3C,CAAC;CACJ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PropertyAccessor } from '@cratis/fundamentals';
|
|
2
|
+
import type { IAddBuilder } from '../declarative/IAddBuilder.js';
|
|
3
|
+
import type { ISetBuilder } from '../declarative/ISetBuilder.js';
|
|
4
|
+
import type { ISubtractBuilder } from '../declarative/ISubtractBuilder.js';
|
|
5
|
+
import type { IGraphMappingBuilder } from './IGraphMappingBuilder.js';
|
|
6
|
+
/**
|
|
7
|
+
* Implements the property mappings shared by nodes and edges, recording them as expressions by property name.
|
|
8
|
+
* @template TElement - The type of the node or edge.
|
|
9
|
+
* @template TEvent - The type of event.
|
|
10
|
+
* @template TSelf - The type of the builder, for continuation.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class GraphMappingBuilder<TElement, TEvent, TSelf> implements IGraphMappingBuilder<TElement, TEvent, TSelf> {
|
|
13
|
+
/** The property mapping expressions by property name. */
|
|
14
|
+
readonly properties: Record<string, string>;
|
|
15
|
+
/** Gets the builder to return for continuation. */
|
|
16
|
+
protected abstract get self(): TSelf;
|
|
17
|
+
/** @inheritdoc */
|
|
18
|
+
set(propertyAccessor: PropertyAccessor<TElement>): ISetBuilder<TEvent, TSelf>;
|
|
19
|
+
/** @inheritdoc */
|
|
20
|
+
add(propertyAccessor: PropertyAccessor<TElement>): IAddBuilder<TEvent, TSelf>;
|
|
21
|
+
/** @inheritdoc */
|
|
22
|
+
subtract(propertyAccessor: PropertyAccessor<TElement>): ISubtractBuilder<TEvent, TSelf>;
|
|
23
|
+
/** @inheritdoc */
|
|
24
|
+
increment(propertyAccessor: PropertyAccessor<TElement>): TSelf;
|
|
25
|
+
/** @inheritdoc */
|
|
26
|
+
decrement(propertyAccessor: PropertyAccessor<TElement>): TSelf;
|
|
27
|
+
/** @inheritdoc */
|
|
28
|
+
count(propertyAccessor: PropertyAccessor<TElement>): TSelf;
|
|
29
|
+
private readonly record;
|
|
30
|
+
private constant;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=GraphMappingBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphMappingBuilder.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphMappingBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGtE;;;;;GAKG;AACH,8BAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAE,YAAW,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC;IACvH,yDAAyD;IACzD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAEjD,mDAAmD;IACnD,SAAS,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC;IAErC,kBAAkB;IAClB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAE5E;IAED,kBAAkB;IAClB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAE5E;IAED,kBAAkB;IAClB,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAEtF;IAED,kBAAkB;IAClB,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,KAAK,CAE7D;IAED,kBAAkB;IAClB,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,KAAK,CAE7D;IAED,kBAAkB;IAClB,KAAK,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GAAG,KAAK,CAEzD;IAED,OAAO,CAAC,QAAQ,CAAC,MAAM,CAErB;IAEF,OAAO,CAAC,QAAQ;CAInB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { AddBuilder } from '../declarative/AddBuilder.js';
|
|
4
|
+
import { SetBuilder } from '../declarative/SetBuilder.js';
|
|
5
|
+
import { SubtractBuilder } from '../declarative/SubtractBuilder.js';
|
|
6
|
+
import { propertyPathOf } from './propertyPathOf.js';
|
|
7
|
+
/**
|
|
8
|
+
* Implements the property mappings shared by nodes and edges, recording them as expressions by property name.
|
|
9
|
+
* @template TElement - The type of the node or edge.
|
|
10
|
+
* @template TEvent - The type of event.
|
|
11
|
+
* @template TSelf - The type of the builder, for continuation.
|
|
12
|
+
*/
|
|
13
|
+
export class GraphMappingBuilder {
|
|
14
|
+
/** The property mapping expressions by property name. */
|
|
15
|
+
properties = {};
|
|
16
|
+
/** @inheritdoc */
|
|
17
|
+
set(propertyAccessor) {
|
|
18
|
+
return new SetBuilder(propertyPathOf(propertyAccessor), this.record, this.self);
|
|
19
|
+
}
|
|
20
|
+
/** @inheritdoc */
|
|
21
|
+
add(propertyAccessor) {
|
|
22
|
+
return new AddBuilder(propertyPathOf(propertyAccessor), this.record, this.self);
|
|
23
|
+
}
|
|
24
|
+
/** @inheritdoc */
|
|
25
|
+
subtract(propertyAccessor) {
|
|
26
|
+
return new SubtractBuilder(propertyPathOf(propertyAccessor), this.record, this.self);
|
|
27
|
+
}
|
|
28
|
+
/** @inheritdoc */
|
|
29
|
+
increment(propertyAccessor) {
|
|
30
|
+
return this.constant(propertyAccessor, '$increment');
|
|
31
|
+
}
|
|
32
|
+
/** @inheritdoc */
|
|
33
|
+
decrement(propertyAccessor) {
|
|
34
|
+
return this.constant(propertyAccessor, '$decrement');
|
|
35
|
+
}
|
|
36
|
+
/** @inheritdoc */
|
|
37
|
+
count(propertyAccessor) {
|
|
38
|
+
return this.constant(propertyAccessor, '$count');
|
|
39
|
+
}
|
|
40
|
+
record = (property, expression) => {
|
|
41
|
+
this.properties[property] = expression;
|
|
42
|
+
};
|
|
43
|
+
constant(propertyAccessor, expression) {
|
|
44
|
+
this.record(propertyPathOf(propertyAccessor), expression);
|
|
45
|
+
return this.self;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=GraphMappingBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphMappingBuilder.js","sourceRoot":"","sources":["../../../projections/graphs/GraphMappingBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,OAAgB,mBAAmB;IACrC,yDAAyD;IAChD,UAAU,GAA2B,EAAE,CAAC;IAKjD,kBAAkB;IAClB,GAAG,CAAC,gBAA4C;QAC5C,OAAO,IAAI,UAAU,CAAgB,cAAc,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnG,CAAC;IAED,kBAAkB;IAClB,GAAG,CAAC,gBAA4C;QAC5C,OAAO,IAAI,UAAU,CAAgB,cAAc,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnG,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,gBAA4C;QACjD,OAAO,IAAI,eAAe,CAAgB,cAAc,CAAC,gBAAgB,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxG,CAAC;IAED,kBAAkB;IAClB,SAAS,CAAC,gBAA4C;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACzD,CAAC;IAED,kBAAkB;IAClB,SAAS,CAAC,gBAA4C;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACzD,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,gBAA4C;QAC9C,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;IAEgB,MAAM,GAAG,CAAC,QAAgB,EAAE,UAAkB,EAAQ,EAAE;QACrE,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC;IAC3C,CAAC,CAAC;IAEM,QAAQ,CAAC,gBAA4C,EAAE,UAAkB;QAC7E,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the property mappings the model-bound decorators on the members of a node or an edge declare per event type.
|
|
3
|
+
* @param prototype - The class prototype of the node or edge.
|
|
4
|
+
* @param properties - The names of the members to read.
|
|
5
|
+
* @returns For each event type, the property name to expression.
|
|
6
|
+
* @throws {SetOnceNotSupportedInGraph} When a member is mapped with setOnce - graph projections cannot honor it.
|
|
7
|
+
*/
|
|
8
|
+
export declare function readGraphMemberMappings(prototype: object, properties: Iterable<string>): Map<Function, Record<string, string>>;
|
|
9
|
+
//# sourceMappingURL=GraphMemberMappings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphMemberMappings.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphMemberMappings.ts"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAsC9H"}
|
|
@@ -0,0 +1,59 @@
|
|
|
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 { constantValueExpression } from '../constantValueExpression.js';
|
|
4
|
+
import { getAddFromMetadata } from '../modelBound/addFrom.js';
|
|
5
|
+
import { getCountMetadata } from '../modelBound/count.js';
|
|
6
|
+
import { getDecrementMetadata } from '../modelBound/decrement.js';
|
|
7
|
+
import { getIncrementMetadata } from '../modelBound/increment.js';
|
|
8
|
+
import { getSetFromMetadata, setFromExpression } from '../modelBound/setFrom.js';
|
|
9
|
+
import { getSetFromContextMetadata, setFromContextExpression } from '../modelBound/setFromContext.js';
|
|
10
|
+
import { getSetValueMetadata } from '../modelBound/setValue.js';
|
|
11
|
+
import { getSubtractFromMetadata } from '../modelBound/subtractFrom.js';
|
|
12
|
+
import { SetOnceNotSupportedInGraph } from './SetOnceNotSupportedInGraph.js';
|
|
13
|
+
/**
|
|
14
|
+
* Reads the property mappings the model-bound decorators on the members of a node or an edge declare per event type.
|
|
15
|
+
* @param prototype - The class prototype of the node or edge.
|
|
16
|
+
* @param properties - The names of the members to read.
|
|
17
|
+
* @returns For each event type, the property name to expression.
|
|
18
|
+
* @throws {SetOnceNotSupportedInGraph} When a member is mapped with setOnce - graph projections cannot honor it.
|
|
19
|
+
*/
|
|
20
|
+
export function readGraphMemberMappings(prototype, properties) {
|
|
21
|
+
const result = new Map();
|
|
22
|
+
const record = (eventType, property, expression) => {
|
|
23
|
+
const mappings = result.get(eventType) ?? {};
|
|
24
|
+
mappings[property] = expression;
|
|
25
|
+
result.set(eventType, mappings);
|
|
26
|
+
};
|
|
27
|
+
for (const property of properties) {
|
|
28
|
+
for (const mapping of getSetFromMetadata(prototype, property)) {
|
|
29
|
+
if (mapping.setOnce === true)
|
|
30
|
+
throw new SetOnceNotSupportedInGraph(prototype.constructor, property);
|
|
31
|
+
record(mapping.eventType, property, setFromExpression(mapping, property));
|
|
32
|
+
}
|
|
33
|
+
for (const mapping of getSetFromContextMetadata(prototype, property)) {
|
|
34
|
+
if (mapping.setOnce === true)
|
|
35
|
+
throw new SetOnceNotSupportedInGraph(prototype.constructor, property);
|
|
36
|
+
record(mapping.eventType, property, setFromContextExpression(mapping, property));
|
|
37
|
+
}
|
|
38
|
+
for (const mapping of getSetValueMetadata(prototype, property)) {
|
|
39
|
+
record(mapping.eventType, property, constantValueExpression(mapping.value));
|
|
40
|
+
}
|
|
41
|
+
for (const mapping of getAddFromMetadata(prototype, property)) {
|
|
42
|
+
record(mapping.eventType, property, `$add(${mapping.eventPropertyName ?? property})`);
|
|
43
|
+
}
|
|
44
|
+
for (const mapping of getSubtractFromMetadata(prototype, property)) {
|
|
45
|
+
record(mapping.eventType, property, `$subtract(${mapping.eventPropertyName ?? property})`);
|
|
46
|
+
}
|
|
47
|
+
for (const mapping of getIncrementMetadata(prototype, property)) {
|
|
48
|
+
record(mapping.eventType, property, '$increment');
|
|
49
|
+
}
|
|
50
|
+
for (const mapping of getDecrementMetadata(prototype, property)) {
|
|
51
|
+
record(mapping.eventType, property, '$decrement');
|
|
52
|
+
}
|
|
53
|
+
for (const mapping of getCountMetadata(prototype, property)) {
|
|
54
|
+
record(mapping.eventType, property, '$count');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=GraphMemberMappings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphMemberMappings.js","sourceRoot":"","sources":["../../../projections/graphs/GraphMemberMappings.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GraphEdgeModel } from './GraphEdgeModel.js';
|
|
2
|
+
import type { GraphNodeModel } from './GraphNodeModel.js';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a graph as declared by the decorators or by the fluent builder, before it is turned into the
|
|
5
|
+
* definitions that are registered. Both forms produce this model, which is what makes them produce identical definitions.
|
|
6
|
+
*/
|
|
7
|
+
export interface GraphModel {
|
|
8
|
+
/** The name of the graph. */
|
|
9
|
+
readonly name: string;
|
|
10
|
+
/** The nodes. */
|
|
11
|
+
readonly nodes: readonly GraphNodeModel[];
|
|
12
|
+
/** The edges. */
|
|
13
|
+
readonly edges: readonly GraphEdgeModel[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=GraphModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphModel.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphModel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,UAAU;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,iBAAiB;IACjB,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAE1C,iBAAiB;IACjB,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphModel.js","sourceRoot":"","sources":["../../../projections/graphs/GraphModel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when a model-bound node or edge does not say which graph it belongs to.
|
|
3
|
+
*/
|
|
4
|
+
export declare class GraphNameRequired extends Error {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a new {@link GraphNameRequired}.
|
|
7
|
+
* @param type - The node or edge type.
|
|
8
|
+
*/
|
|
9
|
+
constructor(type: Function);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=GraphNameRequired.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphNameRequired.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphNameRequired.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IACxC;;;OAGG;IACH,YAAY,IAAI,EAAE,QAAQ,EAGzB;CACJ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/**
|
|
4
|
+
* Error thrown when a model-bound node or edge does not say which graph it belongs to.
|
|
5
|
+
*/
|
|
6
|
+
export class GraphNameRequired extends Error {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a new {@link GraphNameRequired}.
|
|
9
|
+
* @param type - The node or edge type.
|
|
10
|
+
*/
|
|
11
|
+
constructor(type) {
|
|
12
|
+
super(`The type '${type.name}' is a node or an edge but does not name its graph. Put the graph decorator on it, for example @graph('Organization').`);
|
|
13
|
+
this.name = 'GraphNameRequired';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=GraphNameRequired.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphNameRequired.js","sourceRoot":"","sources":["../../../projections/graphs/GraphNameRequired.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACxC;;;OAGG;IACH,YAAY,IAAc;QACtB,KAAK,CAAC,aAAa,IAAI,CAAC,IAAI,wHAAwH,CAAC,CAAC;QACtJ,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACpC,CAAC;CACJ"}
|