@cratis/chronicle 6.59.0 → 6.60.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/Projections.d.ts.map +1 -1
- package/dist/projections/Projections.js +3 -30
- package/dist/projections/Projections.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 +145 -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 +8 -0
- package/dist/projections/graphs/GraphMemberMappings.d.ts.map +1 -0
- package/dist/projections/graphs/GraphMemberMappings.js +54 -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/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 +48 -0
- package/dist/projections/graphs/index.d.ts.map +1 -0
- package/dist/projections/graphs/index.js +27 -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 +1 -0
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/index.js +1 -0
- package/dist/projections/index.js.map +1 -1
- 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/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/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/Projections.ts +4 -29
- 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 +91 -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 +199 -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/graphs/EdgeCanHaveOnlyOneIdentifyingKey.ts +16 -0
- package/projections/graphs/EdgeMustHaveOneSourceAndOneTarget.ts +16 -0
- package/projections/graphs/GraphDeclaredMoreThanOnce.ts +16 -0
- package/projections/graphs/GraphDefinitionBuilder.ts +166 -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 +57 -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/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 +50 -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 +1 -0
- package/projections/registerProjectionWithRetry.ts +53 -0
- package/readModels/rootReadModelTypes.ts +3 -1
- package/sinks/WellKnownSinks.ts +7 -1
- package/types/DecoratorType.ts +7 -1
|
@@ -0,0 +1,145 @@
|
|
|
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 { AutoMap, EventGenerationDelivery, ReadModelObserverType } from '@cratis/chronicle.contracts';
|
|
4
|
+
import { EventSequenceId } from '../../eventSequences/EventSequenceId.js';
|
|
5
|
+
import { getEventTypeJsonSchemaFor } from '../../events/eventTypeDecorator.js';
|
|
6
|
+
import { buildReadModelDefinition } from '../../readModels/buildReadModelDefinition.js';
|
|
7
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
8
|
+
import { toContractEventType } from '../modelBound/childrenAndNestedBuilder.js';
|
|
9
|
+
import { GraphHasDuplicateElement } from './GraphHasDuplicateElement.js';
|
|
10
|
+
import { GraphSchemaWriter } from './GraphSchemaWriter.js';
|
|
11
|
+
import { UnknownGraphEventProperty } from './UnknownGraphEventProperty.js';
|
|
12
|
+
const eventSourceId = '$eventSourceId';
|
|
13
|
+
/**
|
|
14
|
+
* Turns a {@link GraphModel} into the definitions that are registered with the kernel. The shape follows the
|
|
15
|
+
* .NET client's GraphDefinitionBuilder, so the same graph declared with either client registers the same definition.
|
|
16
|
+
*/
|
|
17
|
+
export class GraphDefinitionBuilder {
|
|
18
|
+
_schemaWriter = new GraphSchemaWriter();
|
|
19
|
+
/**
|
|
20
|
+
* Builds the registration of a graph.
|
|
21
|
+
* @param model - The {@link GraphModel}.
|
|
22
|
+
* @param projectionId - The identifier of the projection that fills the graph.
|
|
23
|
+
* @param sinkTypeId - The identifier of the sink type that stores the graph.
|
|
24
|
+
* @returns The {@link GraphRegistration}.
|
|
25
|
+
*/
|
|
26
|
+
build(model, projectionId, sinkTypeId) {
|
|
27
|
+
const nodes = {};
|
|
28
|
+
for (const node of model.nodes) {
|
|
29
|
+
if (Object.hasOwn(nodes, node.label))
|
|
30
|
+
throw new GraphHasDuplicateElement(model.name, 'node', node.label);
|
|
31
|
+
nodes[node.label] = this.node(node);
|
|
32
|
+
}
|
|
33
|
+
const edges = {};
|
|
34
|
+
for (const edge of model.edges) {
|
|
35
|
+
if (Object.hasOwn(edges, edge.edgeType))
|
|
36
|
+
throw new GraphHasDuplicateElement(model.name, 'edge', edge.edgeType);
|
|
37
|
+
edges[edge.edgeType] = this.edge(edge);
|
|
38
|
+
}
|
|
39
|
+
const projection = {
|
|
40
|
+
EventSequenceId: EventSequenceId.eventLog.value,
|
|
41
|
+
Identifier: projectionId,
|
|
42
|
+
ReadModel: model.name,
|
|
43
|
+
IsActive: true,
|
|
44
|
+
IsRewindable: true,
|
|
45
|
+
InitialModelState: '{}',
|
|
46
|
+
From: [],
|
|
47
|
+
Join: [],
|
|
48
|
+
Children: {},
|
|
49
|
+
FromEvery: [],
|
|
50
|
+
All: { Properties: {}, IncludeChildren: false, AutoMap: AutoMap.Inherit, Key: '' },
|
|
51
|
+
FromEventProperty: undefined,
|
|
52
|
+
RemovedWith: [],
|
|
53
|
+
RemovedWithJoin: [],
|
|
54
|
+
LastUpdated: undefined,
|
|
55
|
+
Tags: [],
|
|
56
|
+
AutoMap: AutoMap.Inherit,
|
|
57
|
+
Nested: {},
|
|
58
|
+
SubscribesToAllEvents: false,
|
|
59
|
+
NoAutoMapProperties: [],
|
|
60
|
+
GenerationDelivery: EventGenerationDelivery.Compatibility,
|
|
61
|
+
Graph: { Nodes: nodes, Edges: edges }
|
|
62
|
+
};
|
|
63
|
+
return {
|
|
64
|
+
graphName: model.name,
|
|
65
|
+
readModel: buildReadModelDefinition({
|
|
66
|
+
identifier: model.name,
|
|
67
|
+
schema: this._schemaWriter.write(model),
|
|
68
|
+
sinkTypeId,
|
|
69
|
+
observerType: ReadModelObserverType.Projection,
|
|
70
|
+
observerIdentifier: projectionId
|
|
71
|
+
}),
|
|
72
|
+
projection
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
node(node) {
|
|
76
|
+
const properties = Object.keys(this._schemaWriter.propertiesOf(node.type, []));
|
|
77
|
+
const result = { From: {}, RemovedWith: {} };
|
|
78
|
+
for (const from of node.from) {
|
|
79
|
+
result.From[this.eventTypeOf(from.eventType)] = {
|
|
80
|
+
Key: from.key ?? eventSourceId,
|
|
81
|
+
Properties: this.properties(from.eventType, properties.filter(name => name !== node.keyProperty), from.properties),
|
|
82
|
+
UpdateOnly: from.updateOnly
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
for (const removal of node.removedWith) {
|
|
86
|
+
result.RemovedWith[this.eventTypeOf(removal.eventType)] = { Key: removal.key ?? eventSourceId, Detach: removal.detach };
|
|
87
|
+
}
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
edge(edge) {
|
|
91
|
+
const properties = Object.keys(this._schemaWriter.propertiesOf(edge.type, edge.excludedProperties));
|
|
92
|
+
const result = { From: {}, RemovedWith: {} };
|
|
93
|
+
for (const from of edge.from) {
|
|
94
|
+
result.From[this.eventTypeOf(from.eventType)] = {
|
|
95
|
+
SourceKey: from.sourceKey ?? eventSourceId,
|
|
96
|
+
TargetKey: from.targetKey ?? eventSourceId,
|
|
97
|
+
Identity: this.identity(edge, from.eventType, from.identity),
|
|
98
|
+
Properties: this.properties(from.eventType, properties.filter(name => name !== edge.identifyingProperty), from.properties)
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
for (const removal of edge.removedWith) {
|
|
102
|
+
result.RemovedWith[this.eventTypeOf(removal.eventType)] = {
|
|
103
|
+
SourceKey: removal.sourceKey ?? eventSourceId,
|
|
104
|
+
TargetKey: removal.targetKey ?? eventSourceId,
|
|
105
|
+
Identity: this.identity(edge, removal.eventType, removal.identity)
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return result;
|
|
109
|
+
}
|
|
110
|
+
// The kernel keys the event mappings of a graph by the string form of the event type: id+generation.
|
|
111
|
+
eventTypeOf(eventType) {
|
|
112
|
+
const contract = toContractEventType(eventType);
|
|
113
|
+
return `${contract.Id}+${contract.Generation}`;
|
|
114
|
+
}
|
|
115
|
+
identity(edge, eventType, identity) {
|
|
116
|
+
if (edge.identifyingProperty === undefined)
|
|
117
|
+
return '';
|
|
118
|
+
const resolved = identity ?? this.eventPropertyNamed(eventType, edge.identifyingProperty);
|
|
119
|
+
if (resolved === undefined)
|
|
120
|
+
throw new UnknownGraphEventProperty(edge.type, eventType, edge.identifyingProperty);
|
|
121
|
+
return resolved;
|
|
122
|
+
}
|
|
123
|
+
properties(eventType, candidates, explicit) {
|
|
124
|
+
const result = {};
|
|
125
|
+
for (const name of candidates) {
|
|
126
|
+
const expression = explicit[name] ?? this.eventPropertyNamed(eventType, name);
|
|
127
|
+
if (expression !== undefined)
|
|
128
|
+
result[name] = expression;
|
|
129
|
+
}
|
|
130
|
+
for (const [name, expression] of Object.entries(explicit)) {
|
|
131
|
+
if (!Object.hasOwn(result, name))
|
|
132
|
+
result[name] = expression;
|
|
133
|
+
}
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
// A graph property is mapped from the event property of the same name, unless that one is an object.
|
|
137
|
+
eventPropertyNamed(eventType, graphPropertyName) {
|
|
138
|
+
const schema = getEventTypeJsonSchemaFor(eventType).properties ?? {};
|
|
139
|
+
if (!TypeIntrospector.getMembers(eventType).has(graphPropertyName) && !Object.hasOwn(schema, graphPropertyName))
|
|
140
|
+
return undefined;
|
|
141
|
+
const property = schema[graphPropertyName];
|
|
142
|
+
return property !== undefined && (property.type === 'object' || property.items?.type === 'object') ? undefined : graphPropertyName;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=GraphDefinitionBuilder.js.map
|
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F,kBAAkB,CAAC,SAAmB,EAAE,iBAAyB;QACrE,MAAM,MAAM,GAAG,yBAAyB,CAAC,SAAS,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC;QACrE,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC;YAAE,OAAO,SAAS,CAAC;QAClI,MAAM,QAAQ,GAA2B,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACnE,OAAO,QAAQ,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,KAAK,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC;IACvI,CAAC;CACJ"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Constructor, PropertyAccessor } from '@cratis/fundamentals';
|
|
2
|
+
import type { GraphEdgeModel } from './GraphEdgeModel.js';
|
|
3
|
+
import type { IGraphEdgeBuilder } from './IGraphEdgeBuilder.js';
|
|
4
|
+
import type { IGraphEdgeFromBuilder } from './IGraphEdgeFromBuilder.js';
|
|
5
|
+
import type { IGraphEdgeRemovedWithBuilder } from './IGraphEdgeRemovedWithBuilder.js';
|
|
6
|
+
/**
|
|
7
|
+
* Implements {@link IGraphEdgeBuilder}.
|
|
8
|
+
* @template TEdge - The type of edge.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphEdgeBuilder<TEdge> implements IGraphEdgeBuilder<TEdge> {
|
|
11
|
+
private readonly _edge;
|
|
12
|
+
private readonly _source;
|
|
13
|
+
private readonly _target;
|
|
14
|
+
private readonly _from;
|
|
15
|
+
private readonly _removedWith;
|
|
16
|
+
private _type?;
|
|
17
|
+
private _identifyingProperty?;
|
|
18
|
+
/**
|
|
19
|
+
* Creates a new {@link GraphEdgeBuilder}.
|
|
20
|
+
* @param _edge - The type of the edge.
|
|
21
|
+
* @param _source - The type of the node the edge starts at.
|
|
22
|
+
* @param _target - The type of the node the edge ends at.
|
|
23
|
+
*/
|
|
24
|
+
constructor(_edge: Constructor<TEdge>, _source: Function, _target: Function);
|
|
25
|
+
/** @inheritdoc */
|
|
26
|
+
named(type: string): IGraphEdgeBuilder<TEdge>;
|
|
27
|
+
/** @inheritdoc */
|
|
28
|
+
identifiedBy(identityAccessor: PropertyAccessor<TEdge>): IGraphEdgeBuilder<TEdge>;
|
|
29
|
+
/** @inheritdoc */
|
|
30
|
+
from<TEvent>(eventType: Constructor<TEvent>, configure: (builder: IGraphEdgeFromBuilder<TEdge, TEvent>) => void): IGraphEdgeBuilder<TEdge>;
|
|
31
|
+
/** @inheritdoc */
|
|
32
|
+
removedWith<TEvent>(eventType: Constructor<TEvent>, configure: (builder: IGraphEdgeRemovedWithBuilder<TEvent>) => void): IGraphEdgeBuilder<TEdge>;
|
|
33
|
+
/**
|
|
34
|
+
* Builds the {@link GraphEdgeModel}.
|
|
35
|
+
* @returns The model.
|
|
36
|
+
* @throws {EdgeMustHaveOneSourceAndOneTarget} When the end nodes are not types.
|
|
37
|
+
* @throws {EdgeCanHaveOnlyOneIdentifyingKey} When the type has more than one member with the graphKey decorator.
|
|
38
|
+
*/
|
|
39
|
+
build(): GraphEdgeModel;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=GraphEdgeBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeBuilder.d.ts","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAS1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;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,IAAI,cAAc,CAsBtB;CACJ"}
|
|
@@ -0,0 +1,94 @@
|
|
|
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 { TypeIntrospector } from '../../types/index.js';
|
|
4
|
+
import { EdgeCanHaveOnlyOneIdentifyingKey } from './EdgeCanHaveOnlyOneIdentifyingKey.js';
|
|
5
|
+
import { EdgeMustHaveOneSourceAndOneTarget } from './EdgeMustHaveOneSourceAndOneTarget.js';
|
|
6
|
+
import { getEdgeMetadata } from './edge.js';
|
|
7
|
+
import { getEdgeSourceMetadata } from './edgeSource.js';
|
|
8
|
+
import { getEdgeTargetMetadata } from './edgeTarget.js';
|
|
9
|
+
import { GraphEdgeFromBuilder } from './GraphEdgeFromBuilder.js';
|
|
10
|
+
import { GraphEdgeRemovedWithBuilder } from './GraphEdgeRemovedWithBuilder.js';
|
|
11
|
+
import { isGraphKey } from './graphKey.js';
|
|
12
|
+
import { propertyPathOf } from './propertyPathOf.js';
|
|
13
|
+
/**
|
|
14
|
+
* Implements {@link IGraphEdgeBuilder}.
|
|
15
|
+
* @template TEdge - The type of edge.
|
|
16
|
+
*/
|
|
17
|
+
export class GraphEdgeBuilder {
|
|
18
|
+
_edge;
|
|
19
|
+
_source;
|
|
20
|
+
_target;
|
|
21
|
+
_from = [];
|
|
22
|
+
_removedWith = [];
|
|
23
|
+
_type;
|
|
24
|
+
_identifyingProperty;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new {@link GraphEdgeBuilder}.
|
|
27
|
+
* @param _edge - The type of the edge.
|
|
28
|
+
* @param _source - The type of the node the edge starts at.
|
|
29
|
+
* @param _target - The type of the node the edge ends at.
|
|
30
|
+
*/
|
|
31
|
+
constructor(_edge, _source, _target) {
|
|
32
|
+
this._edge = _edge;
|
|
33
|
+
this._source = _source;
|
|
34
|
+
this._target = _target;
|
|
35
|
+
}
|
|
36
|
+
/** @inheritdoc */
|
|
37
|
+
named(type) {
|
|
38
|
+
this._type = type;
|
|
39
|
+
return this;
|
|
40
|
+
}
|
|
41
|
+
/** @inheritdoc */
|
|
42
|
+
identifiedBy(identityAccessor) {
|
|
43
|
+
this._identifyingProperty = propertyPathOf(identityAccessor);
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
/** @inheritdoc */
|
|
47
|
+
from(eventType, configure) {
|
|
48
|
+
const builder = new GraphEdgeFromBuilder();
|
|
49
|
+
configure(builder);
|
|
50
|
+
this._from.push({
|
|
51
|
+
eventType,
|
|
52
|
+
sourceKey: builder.sourceKey,
|
|
53
|
+
targetKey: builder.targetKey,
|
|
54
|
+
identity: builder.identity,
|
|
55
|
+
properties: builder.properties
|
|
56
|
+
});
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
/** @inheritdoc */
|
|
60
|
+
removedWith(eventType, configure) {
|
|
61
|
+
const builder = new GraphEdgeRemovedWithBuilder();
|
|
62
|
+
configure(builder);
|
|
63
|
+
this._removedWith.push({ eventType, sourceKey: builder.sourceKey, targetKey: builder.targetKey, identity: builder.identity });
|
|
64
|
+
return this;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Builds the {@link GraphEdgeModel}.
|
|
68
|
+
* @returns The model.
|
|
69
|
+
* @throws {EdgeMustHaveOneSourceAndOneTarget} When the end nodes are not types.
|
|
70
|
+
* @throws {EdgeCanHaveOnlyOneIdentifyingKey} When the type has more than one member with the graphKey decorator.
|
|
71
|
+
*/
|
|
72
|
+
build() {
|
|
73
|
+
if (typeof this._source !== 'function' || typeof this._target !== 'function') {
|
|
74
|
+
throw new EdgeMustHaveOneSourceAndOneTarget(this._edge);
|
|
75
|
+
}
|
|
76
|
+
const members = TypeIntrospector.getTrackedProperties(this._edge);
|
|
77
|
+
const keys = members.filter(member => isGraphKey(this._edge.prototype, member));
|
|
78
|
+
if (keys.length > 1)
|
|
79
|
+
throw new EdgeCanHaveOnlyOneIdentifyingKey(this._edge);
|
|
80
|
+
return {
|
|
81
|
+
type: this._edge,
|
|
82
|
+
edgeType: this._type ?? getEdgeMetadata(this._edge)?.type ?? this._edge.name,
|
|
83
|
+
sourceNode: this._source,
|
|
84
|
+
targetNode: this._target,
|
|
85
|
+
identifyingProperty: this._identifyingProperty ?? keys[0],
|
|
86
|
+
// The members that hold the keys of the end nodes are not properties of the edge.
|
|
87
|
+
excludedProperties: members.filter(member => getEdgeSourceMetadata(this._edge.prototype, member) !== undefined ||
|
|
88
|
+
getEdgeTargetMetadata(this._edge.prototype, member) !== undefined),
|
|
89
|
+
from: this._from,
|
|
90
|
+
removedWith: this._removedWith
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=GraphEdgeBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphEdgeBuilder.js","sourceRoot":"","sources":["../../../projections/graphs/GraphEdgeBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAGrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAaJ,KAAK;IACL,OAAO;IACP,OAAO;I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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"}
|