@cratis/chronicle 6.60.0 → 6.62.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/connection/ChronicleConnection.ts +7 -1
- package/connection/ChronicleServices.ts +2 -0
- package/dist/connection/ChronicleConnection.d.ts +1 -0
- package/dist/connection/ChronicleConnection.d.ts.map +1 -1
- package/dist/connection/ChronicleConnection.js +6 -2
- package/dist/connection/ChronicleConnection.js.map +1 -1
- package/dist/connection/ChronicleServices.d.ts +2 -1
- package/dist/connection/ChronicleServices.d.ts.map +1 -1
- package/dist/eventSequences/EventForEventSourceId.d.ts +21 -1
- package/dist/eventSequences/EventForEventSourceId.d.ts.map +1 -1
- package/dist/eventSequences/EventSequence.d.ts +9 -0
- package/dist/eventSequences/EventSequence.d.ts.map +1 -1
- package/dist/eventSequences/EventSequence.js +18 -0
- package/dist/eventSequences/EventSequence.js.map +1 -1
- package/dist/eventSequences/IEventSequence.d.ts +30 -0
- package/dist/eventSequences/IEventSequence.d.ts.map +1 -1
- package/dist/imports/EventImport.d.ts +29 -0
- package/dist/imports/EventImport.d.ts.map +1 -0
- package/dist/imports/EventImport.js +248 -0
- package/dist/imports/EventImport.js.map +1 -0
- package/dist/imports/EventImportSettings.d.ts +32 -0
- package/dist/imports/EventImportSettings.d.ts.map +1 -0
- package/dist/imports/EventImportSettings.js +4 -0
- package/dist/imports/EventImportSettings.js.map +1 -0
- package/dist/imports/IEventImport.d.ts +50 -0
- package/dist/imports/IEventImport.d.ts.map +1 -0
- package/dist/imports/IEventImport.js +4 -0
- package/dist/imports/IEventImport.js.map +1 -0
- package/dist/imports/ImportChunkRefused.d.ts +12 -0
- package/dist/imports/ImportChunkRefused.d.ts.map +1 -0
- package/dist/imports/ImportChunkRefused.js +19 -0
- package/dist/imports/ImportChunkRefused.js.map +1 -0
- package/dist/imports/ImportCouldNotBegin.d.ts +10 -0
- package/dist/imports/ImportCouldNotBegin.d.ts.map +1 -0
- package/dist/imports/ImportCouldNotBegin.js +16 -0
- package/dist/imports/ImportCouldNotBegin.js.map +1 -0
- package/dist/imports/ImportOptions.d.ts +26 -0
- package/dist/imports/ImportOptions.d.ts.map +1 -0
- package/dist/imports/ImportOptions.js +4 -0
- package/dist/imports/ImportOptions.js.map +1 -0
- package/dist/imports/ImportProgress.d.ts +20 -0
- package/dist/imports/ImportProgress.d.ts.map +1 -0
- package/dist/imports/ImportProgress.js +4 -0
- package/dist/imports/ImportProgress.js.map +1 -0
- package/dist/imports/ImportRejection.d.ts +10 -0
- package/dist/imports/ImportRejection.d.ts.map +1 -0
- package/dist/imports/ImportRejection.js +4 -0
- package/dist/imports/ImportRejection.js.map +1 -0
- package/dist/imports/ImportResult.d.ts +30 -0
- package/dist/imports/ImportResult.d.ts.map +1 -0
- package/dist/imports/ImportResult.js +4 -0
- package/dist/imports/ImportResult.js.map +1 -0
- package/dist/imports/ImportState.d.ts +18 -0
- package/dist/imports/ImportState.d.ts.map +1 -0
- package/dist/imports/ImportState.js +21 -0
- package/dist/imports/ImportState.js.map +1 -0
- package/dist/imports/ImportTarget.d.ts +16 -0
- package/dist/imports/ImportTarget.d.ts.map +1 -0
- package/dist/imports/ImportTarget.js +4 -0
- package/dist/imports/ImportTarget.js.map +1 -0
- package/dist/imports/ImportWasAbandoned.d.ts +11 -0
- package/dist/imports/ImportWasAbandoned.d.ts.map +1 -0
- package/dist/imports/ImportWasAbandoned.js +16 -0
- package/dist/imports/ImportWasAbandoned.js.map +1 -0
- package/dist/imports/ImportsNotSupported.d.ts +5 -0
- package/dist/imports/ImportsNotSupported.d.ts.map +1 -0
- package/dist/imports/ImportsNotSupported.js +10 -0
- package/dist/imports/ImportsNotSupported.js.map +1 -0
- package/dist/imports/OnInvalidEvent.d.ts +8 -0
- package/dist/imports/OnInvalidEvent.d.ts.map +1 -0
- package/dist/imports/OnInvalidEvent.js +11 -0
- package/dist/imports/OnInvalidEvent.js.map +1 -0
- package/dist/imports/abortable.d.ts +23 -0
- package/dist/imports/abortable.d.ts.map +1 -0
- package/dist/imports/abortable.js +60 -0
- package/dist/imports/abortable.js.map +1 -0
- package/dist/imports/beginEventImport.d.ts +16 -0
- package/dist/imports/beginEventImport.d.ts.map +1 -0
- package/dist/imports/beginEventImport.js +74 -0
- package/dist/imports/beginEventImport.js.map +1 -0
- package/dist/imports/for_EventImport/given/a_kernel_import_session.d.ts +144 -0
- package/dist/imports/for_EventImport/given/a_kernel_import_session.d.ts.map +1 -0
- package/dist/imports/for_EventImport/given/a_kernel_import_session.js +132 -0
- package/dist/imports/for_EventImport/given/a_kernel_import_session.js.map +1 -0
- package/dist/imports/importEvents.d.ts +13 -0
- package/dist/imports/importEvents.d.ts.map +1 -0
- package/dist/imports/importEvents.js +35 -0
- package/dist/imports/importEvents.js.map +1 -0
- package/dist/imports/index.d.ts +12 -0
- package/dist/imports/index.d.ts.map +1 -0
- package/dist/imports/index.js +9 -0
- package/dist/imports/index.js.map +1 -0
- package/dist/imports/isTransientImportFailure.d.ts +7 -0
- package/dist/imports/isTransientImportFailure.d.ts.map +1 -0
- package/dist/imports/isTransientImportFailure.js +13 -0
- package/dist/imports/isTransientImportFailure.js.map +1 -0
- package/dist/imports/sizeOfImportEvent.d.ts +9 -0
- package/dist/imports/sizeOfImportEvent.d.ts.map +1 -0
- package/dist/imports/sizeOfImportEvent.js +25 -0
- package/dist/imports/sizeOfImportEvent.js.map +1 -0
- package/dist/imports/toImportEvent.d.ts +14 -0
- package/dist/imports/toImportEvent.d.ts.map +1 -0
- package/dist/imports/toImportEvent.js +54 -0
- package/dist/imports/toImportEvent.js.map +1 -0
- package/dist/imports/toImportProgress.d.ts +9 -0
- package/dist/imports/toImportProgress.d.ts.map +1 -0
- package/dist/imports/toImportProgress.js +20 -0
- package/dist/imports/toImportProgress.js.map +1 -0
- package/dist/imports/toImportResult.d.ts +9 -0
- package/dist/imports/toImportResult.d.ts.map +1 -0
- package/dist/imports/toImportResult.js +33 -0
- package/dist/imports/toImportResult.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/observation/index.d.ts +2 -0
- package/dist/observation/index.d.ts.map +1 -1
- package/dist/observation/index.js +1 -0
- package/dist/observation/index.js.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 +4 -0
- 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/graphs/GraphDefinitionBuilder.d.ts.map +1 -1
- package/dist/projections/graphs/GraphDefinitionBuilder.js +7 -4
- package/dist/projections/graphs/GraphDefinitionBuilder.js.map +1 -1
- package/dist/projections/graphs/GraphMemberMappings.d.ts +1 -0
- package/dist/projections/graphs/GraphMemberMappings.d.ts.map +1 -1
- package/dist/projections/graphs/GraphMemberMappings.js +10 -5
- package/dist/projections/graphs/GraphMemberMappings.js.map +1 -1
- 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/index.d.ts +1 -0
- package/dist/projections/graphs/index.d.ts.map +1 -1
- package/dist/projections/graphs/index.js +1 -0
- package/dist/projections/graphs/index.js.map +1 -1
- package/dist/projections/index.d.ts +5 -0
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/index.js +3 -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/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +2 -1
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/testing/BatchPartitionOutcome.d.ts +7 -0
- package/dist/testing/BatchPartitionOutcome.d.ts.map +1 -0
- package/dist/testing/BatchPartitionOutcome.js +4 -0
- package/dist/testing/BatchPartitionOutcome.js.map +1 -0
- package/dist/testing/InProcessEventSequence.d.ts +4 -0
- package/dist/testing/InProcessEventSequence.d.ts.map +1 -1
- package/dist/testing/InProcessEventSequence.js +2 -0
- package/dist/testing/InProcessEventSequence.js.map +1 -1
- package/dist/testing/ReactorDeliveryResult.d.ts +2 -0
- package/dist/testing/ReactorDeliveryResult.d.ts.map +1 -1
- package/dist/testing/ReactorScenario.d.ts +46 -10
- package/dist/testing/ReactorScenario.d.ts.map +1 -1
- package/dist/testing/ReactorScenario.js +120 -29
- package/dist/testing/ReactorScenario.js.map +1 -1
- package/dist/testing/deliverToBatchMethods.d.ts +35 -0
- package/dist/testing/deliverToBatchMethods.d.ts.map +1 -0
- package/dist/testing/deliverToBatchMethods.js +55 -0
- package/dist/testing/deliverToBatchMethods.js.map +1 -0
- 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/eventSequences/EventForEventSourceId.ts +25 -1
- package/eventSequences/EventSequence.ts +28 -0
- package/eventSequences/IEventSequence.ts +33 -0
- package/imports/EventImport.ts +263 -0
- package/imports/EventImportSettings.ts +46 -0
- package/imports/IEventImport.ts +58 -0
- package/imports/ImportChunkRefused.ts +15 -0
- package/imports/ImportCouldNotBegin.ts +14 -0
- package/imports/ImportOptions.ts +36 -0
- package/imports/ImportProgress.ts +29 -0
- package/imports/ImportRejection.ts +14 -0
- package/imports/ImportResult.ts +43 -0
- package/imports/ImportState.ts +26 -0
- package/imports/ImportTarget.ts +23 -0
- package/imports/ImportWasAbandoned.ts +16 -0
- package/imports/ImportsNotSupported.ts +10 -0
- package/imports/OnInvalidEvent.ts +11 -0
- package/imports/abortable.ts +57 -0
- package/imports/beginEventImport.ts +85 -0
- package/imports/for_EventImport/given/a_kernel_import_session.ts +160 -0
- package/imports/for_EventImport/when_a_chunk_fails.spec.ts +65 -0
- package/imports/for_EventImport/when_abandoning.spec.ts +52 -0
- package/imports/for_EventImport/when_cancelling_with_an_abort_signal.spec.ts +59 -0
- package/imports/for_EventImport/when_completing.spec.ts +71 -0
- package/imports/for_EventImport/when_cutting_events_into_chunks.spec.ts +70 -0
- package/imports/for_EventImport/when_keeping_chunks_in_flight.spec.ts +49 -0
- package/imports/for_beginEventImport/when_reattaching.spec.ts +82 -0
- package/imports/for_beginEventImport/when_the_kernel_does_not_serve_imports.spec.ts +55 -0
- package/imports/for_importEvents/when_importing_in_one_call.spec.ts +99 -0
- package/imports/for_toImportEvent/when_converting_an_event.spec.ts +74 -0
- package/imports/importEvents.ts +44 -0
- package/imports/index.ts +14 -0
- package/imports/isTransientImportFailure.ts +15 -0
- package/imports/sizeOfImportEvent.ts +25 -0
- package/imports/toImportEvent.ts +60 -0
- package/imports/toImportProgress.ts +24 -0
- package/imports/toImportResult.ts +36 -0
- package/index.ts +3 -0
- package/observation/index.ts +2 -0
- package/package.json +7 -2
- package/projections/ChildrenOrderingNotSupportedByContracts.ts +18 -0
- package/projections/InvalidCausedByProperty.ts +14 -0
- package/projections/Projections.ts +4 -0
- 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/when_building_a_fluent_graph.spec.ts +1 -1
- package/projections/for_Graphs/when_building_a_model_bound_graph.spec.ts +5 -4
- package/projections/for_Graphs/when_declaring_an_invalid_graph.spec.ts +28 -0
- package/projections/for_Graphs/when_declaring_with_standard_decorators.standard.spec.ts +4 -4
- package/projections/for_Graphs/when_mapping_properties.spec.ts +1 -1
- 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/GraphDefinitionBuilder.ts +7 -4
- package/projections/graphs/GraphMemberMappings.ts +8 -5
- package/projections/graphs/SetOnceNotSupportedInGraph.ts +18 -0
- package/projections/graphs/index.ts +1 -0
- package/projections/index.ts +5 -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/reducers/Reducers.ts +2 -1
- package/testing/BatchPartitionOutcome.ts +10 -0
- package/testing/InProcessEventSequence.ts +4 -0
- package/testing/ReactorDeliveryResult.ts +2 -0
- package/testing/ReactorScenario.ts +147 -39
- package/testing/deliverToBatchMethods.ts +90 -0
- package/testing/for_ReactorScenario/when_the_reactor_has_a_batch_method.spec.ts +143 -9
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Projections.js","sourceRoot":"","sources":["../../projections/Projections.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAe,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,K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C,KAAK,CAAC;IAC1C,CAAC;IAEO,iBAAiB,CAAC,UAAgC,EAAE,UAAkB;QAC1E,OAAO,2BAA2B,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IACjH,CAAC;IAEO,yBAAyB,CAAC,IAAiB;QAC/C,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE,CAAC;YAC/B,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;YACxC,OAAO;gBACH,EAAE,EAAE,IAAI,YAAY,CAAC,UAAU,CAAC;gBAChC,eAAe,EAAE,wBAAwB,CAAC,IAAI,CAAC;gBAC/C,mBAAmB,EAAE,UAAU;aAClC,CAAC;QACN,CAAC;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The identity members of the identity that caused an event, as the kernel's `$causedBy` expression accepts them. */
|
|
2
|
+
export type CausedByProperty = 'subject' | 'name' | 'userName';
|
|
3
|
+
/**
|
|
4
|
+
* Validates a member of the identity that caused an event. The kernel matches the member case-sensitively.
|
|
5
|
+
* @param property - The identity member.
|
|
6
|
+
* @returns The validated member.
|
|
7
|
+
*/
|
|
8
|
+
export declare function causedByProperty(property: string): CausedByProperty;
|
|
9
|
+
/**
|
|
10
|
+
* Builds the `$causedBy` event value expression - the whole identity that caused the event, or one of its members.
|
|
11
|
+
* @param property - Optional identity member; omit it for the whole identity.
|
|
12
|
+
* @returns The `$causedBy` or `$causedBy(<member>)` expression.
|
|
13
|
+
*/
|
|
14
|
+
export declare function causedByExpression(property?: CausedByProperty): string;
|
|
15
|
+
//# sourceMappingURL=causedBy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"causedBy.d.ts","sourceRoot":"","sources":["../../projections/causedBy.ts"],"names":[],"mappings":"AAKA,sHAAsH;AACtH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAI/D;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAKnE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAEtE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
import { InvalidCausedByProperty } from './InvalidCausedByProperty.js';
|
|
4
|
+
const causedByProperties = ['subject', 'name', 'userName'];
|
|
5
|
+
/**
|
|
6
|
+
* Validates a member of the identity that caused an event. The kernel matches the member case-sensitively.
|
|
7
|
+
* @param property - The identity member.
|
|
8
|
+
* @returns The validated member.
|
|
9
|
+
*/
|
|
10
|
+
export function causedByProperty(property) {
|
|
11
|
+
if (!causedByProperties.includes(property)) {
|
|
12
|
+
throw new InvalidCausedByProperty(property);
|
|
13
|
+
}
|
|
14
|
+
return property;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Builds the `$causedBy` event value expression - the whole identity that caused the event, or one of its members.
|
|
18
|
+
* @param property - Optional identity member; omit it for the whole identity.
|
|
19
|
+
* @returns The `$causedBy` or `$causedBy(<member>)` expression.
|
|
20
|
+
*/
|
|
21
|
+
export function causedByExpression(property) {
|
|
22
|
+
return property === undefined ? '$causedBy' : `$causedBy(${causedByProperty(property)})`;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=causedBy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"causedBy.js","sourceRoot":"","sources":["../../projections/causedBy.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAKvE,MAAM,kBAAkB,GAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;AAE9E;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC7C,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,QAA4B,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAA2B;IAC1D,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,gBAAgB,CAAC,QAAQ,CAAC,GAAG,CAAC;AAC7F,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Where a new child goes in its collection. Mirrors the `ChildrenPlacement` contract enum. */
|
|
2
|
+
export declare enum ChildrenPlacement {
|
|
3
|
+
/** New children are added at the end of the collection (the default). */
|
|
4
|
+
Append = 0,
|
|
5
|
+
/** New children are added at the start of the collection. */
|
|
6
|
+
Prepend = 1,
|
|
7
|
+
/** New children are inserted at their sorted position. */
|
|
8
|
+
Sorted = 2
|
|
9
|
+
}
|
|
10
|
+
/** The direction children are sorted in. Mirrors the `SortDirection` contract enum. */
|
|
11
|
+
export declare enum SortDirection {
|
|
12
|
+
/** Smallest first; children without a value sort first. */
|
|
13
|
+
Ascending = 0,
|
|
14
|
+
/** Largest first; children without a value sort last. */
|
|
15
|
+
Descending = 1
|
|
16
|
+
}
|
|
17
|
+
/** Plain object shape matching the wire-level `ChildrenOrderingDefinition`. */
|
|
18
|
+
export interface ChildrenOrderingDefinitionLike {
|
|
19
|
+
/** Where new children go. */
|
|
20
|
+
Placement: ChildrenPlacement;
|
|
21
|
+
/** The property path on the child to sort by; empty unless {@link ChildrenPlacement.Sorted}. */
|
|
22
|
+
SortBy: string;
|
|
23
|
+
/** The sort direction; only meaningful for {@link ChildrenPlacement.Sorted}. */
|
|
24
|
+
Direction: SortDirection;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates the ordering that adds new children at the start of the collection.
|
|
28
|
+
* @returns The ordering definition.
|
|
29
|
+
*/
|
|
30
|
+
export declare function prependOrdering(): ChildrenOrderingDefinitionLike;
|
|
31
|
+
/**
|
|
32
|
+
* Creates the ordering that inserts new children at their sorted position.
|
|
33
|
+
* @param sortBy - The property path on the child to sort by.
|
|
34
|
+
* @param direction - The sort direction.
|
|
35
|
+
* @returns The ordering definition.
|
|
36
|
+
*/
|
|
37
|
+
export declare function sortedOrdering(sortBy: string, direction: SortDirection): ChildrenOrderingDefinitionLike;
|
|
38
|
+
//# sourceMappingURL=childrenOrdering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childrenOrdering.d.ts","sourceRoot":"","sources":["../../projections/childrenOrdering.ts"],"names":[],"mappings":"AAGA,+FAA+F;AAC/F,oBAAY,iBAAiB;IACzB,yEAAyE;IACzE,MAAM,IAAI;IAEV,6DAA6D;IAC7D,OAAO,IAAI;IAEX,0DAA0D;IAC1D,MAAM,IAAI;CACb;AAED,uFAAuF;AACvF,oBAAY,aAAa;IACrB,2DAA2D;IAC3D,SAAS,IAAI;IAEb,yDAAyD;IACzD,UAAU,IAAI;CACjB;AAED,+EAA+E;AAC/E,MAAM,WAAW,8BAA8B;IAC3C,6BAA6B;IAC7B,SAAS,EAAE,iBAAiB,CAAC;IAE7B,gGAAgG;IAChG,MAAM,EAAE,MAAM,CAAC;IAEf,gFAAgF;IAChF,SAAS,EAAE,aAAa,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,8BAA8B,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,8BAA8B,CAEvG"}
|
|
@@ -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
|
+
/** Where a new child goes in its collection. Mirrors the `ChildrenPlacement` contract enum. */
|
|
4
|
+
export var ChildrenPlacement;
|
|
5
|
+
(function (ChildrenPlacement) {
|
|
6
|
+
/** New children are added at the end of the collection (the default). */
|
|
7
|
+
ChildrenPlacement[ChildrenPlacement["Append"] = 0] = "Append";
|
|
8
|
+
/** New children are added at the start of the collection. */
|
|
9
|
+
ChildrenPlacement[ChildrenPlacement["Prepend"] = 1] = "Prepend";
|
|
10
|
+
/** New children are inserted at their sorted position. */
|
|
11
|
+
ChildrenPlacement[ChildrenPlacement["Sorted"] = 2] = "Sorted";
|
|
12
|
+
})(ChildrenPlacement || (ChildrenPlacement = {}));
|
|
13
|
+
/** The direction children are sorted in. Mirrors the `SortDirection` contract enum. */
|
|
14
|
+
export var SortDirection;
|
|
15
|
+
(function (SortDirection) {
|
|
16
|
+
/** Smallest first; children without a value sort first. */
|
|
17
|
+
SortDirection[SortDirection["Ascending"] = 0] = "Ascending";
|
|
18
|
+
/** Largest first; children without a value sort last. */
|
|
19
|
+
SortDirection[SortDirection["Descending"] = 1] = "Descending";
|
|
20
|
+
})(SortDirection || (SortDirection = {}));
|
|
21
|
+
/**
|
|
22
|
+
* Creates the ordering that adds new children at the start of the collection.
|
|
23
|
+
* @returns The ordering definition.
|
|
24
|
+
*/
|
|
25
|
+
export function prependOrdering() {
|
|
26
|
+
return { Placement: ChildrenPlacement.Prepend, SortBy: '', Direction: SortDirection.Ascending };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates the ordering that inserts new children at their sorted position.
|
|
30
|
+
* @param sortBy - The property path on the child to sort by.
|
|
31
|
+
* @param direction - The sort direction.
|
|
32
|
+
* @returns The ordering definition.
|
|
33
|
+
*/
|
|
34
|
+
export function sortedOrdering(sortBy, direction) {
|
|
35
|
+
return { Placement: ChildrenPlacement.Sorted, SortBy: sortBy, Direction: direction };
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=childrenOrdering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childrenOrdering.js","sourceRoot":"","sources":["../../projections/childrenOrdering.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,+FAA+F;AAC/F,MAAM,CAAN,IAAY,iBASX;AATD,WAAY,iBAAiB;IACzB,yEAAyE;IACzE,6DAAU,CAAA;IAEV,6DAA6D;IAC7D,+DAAW,CAAA;IAEX,0DAA0D;IAC1D,6DAAU,CAAA;AACd,CAAC,EATW,iBAAiB,KAAjB,iBAAiB,QAS5B;AAED,uFAAuF;AACvF,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACrB,2DAA2D;IAC3D,2DAAa,CAAA;IAEb,yDAAyD;IACzD,6DAAc,CAAA;AAClB,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB;AAcD;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC3B,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC;AACpG,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,SAAwB;IACnE,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ProjectionDefinition } from '@cratis/chronicle.contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Detects whether the installed contracts carry `ChildrenDefinition.Ordering` to the kernel. The generated codec drops
|
|
4
|
+
* fields it does not know, so an ordering the contracts cannot encode would be lost on the wire.
|
|
5
|
+
* @returns True when the contracts encode children ordering.
|
|
6
|
+
*/
|
|
7
|
+
export declare function contractsSupportChildrenOrdering(): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Throws when a projection orders any of its children collections, at any depth, and the contracts cannot carry it.
|
|
10
|
+
* @param definition - The compiled projection definition.
|
|
11
|
+
* @param supported - Whether the contracts support children ordering. Defaults to detecting it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ensureChildrenOrderingIsSupported(definition: ProjectionDefinition, supported?: boolean): void;
|
|
14
|
+
//# sourceMappingURL=childrenOrderingSupport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childrenOrderingSupport.d.ts","sourceRoot":"","sources":["../../projections/childrenOrderingSupport.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsB,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAK5F;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,OAAO,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,oBAAoB,EAAE,SAAS,GAAE,OAA4C,GAAG,IAAI,CAgBjJ"}
|
|
@@ -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 { ChildrenDefinition } from '@cratis/chronicle.contracts';
|
|
4
|
+
import { ChildrenOrderingNotSupportedByContracts } from './ChildrenOrderingNotSupportedByContracts.js';
|
|
5
|
+
/**
|
|
6
|
+
* Detects whether the installed contracts carry `ChildrenDefinition.Ordering` to the kernel. The generated codec drops
|
|
7
|
+
* fields it does not know, so an ordering the contracts cannot encode would be lost on the wire.
|
|
8
|
+
* @returns True when the contracts encode children ordering.
|
|
9
|
+
*/
|
|
10
|
+
export function contractsSupportChildrenOrdering() {
|
|
11
|
+
const probe = ChildrenDefinition.fromPartial({ Ordering: { Placement: 1, SortBy: '', Direction: 0 } });
|
|
12
|
+
return probe.Ordering !== undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Throws when a projection orders any of its children collections, at any depth, and the contracts cannot carry it.
|
|
16
|
+
* @param definition - The compiled projection definition.
|
|
17
|
+
* @param supported - Whether the contracts support children ordering. Defaults to detecting it.
|
|
18
|
+
*/
|
|
19
|
+
export function ensureChildrenOrderingIsSupported(definition, supported = contractsSupportChildrenOrdering()) {
|
|
20
|
+
if (supported)
|
|
21
|
+
return;
|
|
22
|
+
const projection = String(definition.Identifier ?? '<unknown>');
|
|
23
|
+
const visit = (owner, path) => {
|
|
24
|
+
for (const [property, child] of Object.entries(owner.Children ?? {})) {
|
|
25
|
+
const childPath = `${path}Children.${property}`;
|
|
26
|
+
if (child.Ordering !== undefined) {
|
|
27
|
+
throw new ChildrenOrderingNotSupportedByContracts(projection, childPath);
|
|
28
|
+
}
|
|
29
|
+
visit(child, `${childPath}.`);
|
|
30
|
+
}
|
|
31
|
+
for (const [property, nested] of Object.entries(owner.Nested ?? {})) {
|
|
32
|
+
visit(nested, `${path}Nested.${property}.`);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
visit(definition, '');
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=childrenOrderingSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childrenOrderingSupport.js","sourceRoot":"","sources":["../../projections/childrenOrderingSupport.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAE,kBAAkB,EAA6B,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAE,uCAAuC,EAAE,MAAM,8CAA8C,CAAC;AAIvG;;;;GAIG;AACH,MAAM,UAAU,gCAAgC;IAC5C,MAAM,KAAK,GAAG,kBAAkB,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAA0D,CAAC,CAAC;IAC/J,OAAQ,KAAgC,CAAC,QAAQ,KAAK,SAAS,CAAC;AACpE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,UAAgC,EAAE,SAAS,GAAY,gCAAgC,EAAE;IACvI,IAAI,SAAS;QAAE,OAAO;IACtB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,IAAI,WAAW,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,CAAC,KAAmB,EAAE,IAAY,EAAQ,EAAE;QACtD,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC,EAAE,CAAC;YACnE,MAAM,SAAS,GAAG,GAAG,IAAI,YAAY,QAAQ,EAAE,CAAC;YAChD,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC/B,MAAM,IAAI,uCAAuC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;YAC7E,CAAC;YACD,KAAK,CAAC,KAAK,EAAE,GAAG,SAAS,GAAG,CAAC,CAAC;QAClC,CAAC;QACD,KAAK,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC;YAClE,KAAK,CAAC,MAAM,EAAE,GAAG,IAAI,UAAU,QAAQ,GAAG,CAAC,CAAC;QAChD,CAAC;IACL,CAAC,CAAC;IACF,KAAK,CAAC,UAAqC,EAAE,EAAE,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropertyAccessor } from '@cratis/fundamentals';
|
|
2
2
|
import { IAllSetBuilder } from './IAllSetBuilder.js';
|
|
3
|
+
import { CausedByProperty } from '../causedBy.js';
|
|
3
4
|
/**
|
|
4
5
|
* Concrete implementation of {@link IAllSetBuilder} for fromEvery mappings.
|
|
5
6
|
* @template TReadModel - The read model type.
|
|
@@ -16,5 +17,7 @@ export declare class AllSetBuilder<TReadModel, TParentBuilder> implements IAllSe
|
|
|
16
17
|
toEventContextProperty(contextPropertyName: string): TParentBuilder;
|
|
17
18
|
/** @inheritdoc */
|
|
18
19
|
toEventSourceId(): TParentBuilder;
|
|
20
|
+
/** @inheritdoc */
|
|
21
|
+
toCausedBy(property?: CausedByProperty): TParentBuilder;
|
|
19
22
|
}
|
|
20
23
|
//# sourceMappingURL=AllSetBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllSetBuilder.d.ts","sourceRoot":"","sources":["../../../projections/declarative/AllSetBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AllSetBuilder.d.ts","sourceRoot":"","sources":["../../../projections/declarative/AllSetBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAsB,MAAM,gBAAgB,CAAC;AAGtE;;;;GAIG;AACH,qBAAa,aAAa,CAAC,UAAU,EAAE,cAAc,CAAE,YAAW,cAAc,CAAC,UAAU,EAAE,cAAc,CAAC;IAEpG,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAH5B,YACqB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,EAC5D,OAAO,EAAE,cAAc,EACxC;IAEJ,kBAAkB;IAClB,EAAE,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,cAAc,CAM1E;IAED,kBAAkB;IAClB,sBAAsB,CAAC,mBAAmB,EAAE,MAAM,GAAG,cAAc,CAGlE;IAED,kBAAkB;IAClB,eAAe,IAAI,cAAc,CAGhC;IAED,kBAAkB;IAClB,UAAU,CAAC,QAAQ,CAAC,EAAE,gBAAgB,GAAG,cAAc,CAGtD;CACJ"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
import { PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
4
|
+
import { causedByExpression } from '../causedBy.js';
|
|
4
5
|
import { eventContextPropertyExpression } from '../eventContextPropertyExpression.js';
|
|
5
6
|
/**
|
|
6
7
|
* Concrete implementation of {@link IAllSetBuilder} for fromEvery mappings.
|
|
@@ -34,5 +35,10 @@ export class AllSetBuilder {
|
|
|
34
35
|
this._setProperty(this._targetProperty, '$eventSourceId');
|
|
35
36
|
return this._parent;
|
|
36
37
|
}
|
|
38
|
+
/** @inheritdoc */
|
|
39
|
+
toCausedBy(property) {
|
|
40
|
+
this._setProperty(this._targetProperty, causedByExpression(property));
|
|
41
|
+
return this._parent;
|
|
42
|
+
}
|
|
37
43
|
}
|
|
38
44
|
//# sourceMappingURL=AllSetBuilder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllSetBuilder.js","sourceRoot":"","sources":["../../../projections/declarative/AllSetBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAoB,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF;;;;GAIG;AACH,MAAM,OAAO,aAAa;IAED,eAAe;IACf,YAAY;IACZ,OAAO;IAH5B,YACqB,eAAuB,EACvB,YAA4D,EAC5D,OAAuB;+BAFvB,eAAe;4BACf,YAAY;uBACZ,OAAO;IACzB,CAAC;IAEJ,kBAAkB;IAClB,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,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACrC,yBAAyB,CAAC,KAAmB,CAAC,CAAC;QAC/C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,kBAAkB;IAClB,sBAAsB,CAAC,mBAA2B;QAC9C,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,8BAA8B,CAAC,mBAAmB,CAAC,CAAC,CAAC;QAC7F,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,kBAAkB;IAClB,eAAe;QACX,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,kBAAkB;IAClB,UAAU,CAAC,QAA2B;QAClC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;CACJ"}
|
|
@@ -11,6 +11,7 @@ import { INestedBuilder } from './INestedBuilder.js';
|
|
|
11
11
|
export declare class ChildrenBuilder<TParentReadModel, TChildReadModel> extends ProjectionBuilderCore<TChildReadModel, IChildrenBuilder<TParentReadModel, TChildReadModel>> implements IChildrenBuilder<TParentReadModel, TChildReadModel> {
|
|
12
12
|
private _identifiedBy;
|
|
13
13
|
private _fromEventPropertyPath;
|
|
14
|
+
private _ordering;
|
|
14
15
|
/** @inheritdoc */
|
|
15
16
|
identifiedBy(propertyAccessor: PropertyAccessor<TChildReadModel>): IChildrenBuilder<TParentReadModel, TChildReadModel>;
|
|
16
17
|
/** @inheritdoc */
|
|
@@ -20,11 +21,19 @@ export declare class ChildrenBuilder<TParentReadModel, TChildReadModel> extends
|
|
|
20
21
|
/** @inheritdoc */
|
|
21
22
|
nested<TNestedModel>(targetPropertyAccessor: PropertyAccessor<TChildReadModel>, builderCallback: (builder: INestedBuilder<TChildReadModel, TNestedModel>) => void): IChildrenBuilder<TParentReadModel, TChildReadModel>;
|
|
22
23
|
/** @inheritdoc */
|
|
24
|
+
prepend(): IChildrenBuilder<TParentReadModel, TChildReadModel>;
|
|
25
|
+
/** @inheritdoc */
|
|
26
|
+
orderBy(propertyAccessor: PropertyAccessor<TChildReadModel>): IChildrenBuilder<TParentReadModel, TChildReadModel>;
|
|
27
|
+
/** @inheritdoc */
|
|
28
|
+
orderByDescending(propertyAccessor: PropertyAccessor<TChildReadModel>): IChildrenBuilder<TParentReadModel, TChildReadModel>;
|
|
29
|
+
/** @inheritdoc */
|
|
23
30
|
protected defaultJoinOn(): string | undefined;
|
|
24
31
|
/**
|
|
25
32
|
* Builds the {@link ChildrenDefinitionLike} representing this children collection.
|
|
26
33
|
* @returns The accumulated children definition.
|
|
27
34
|
*/
|
|
28
35
|
buildDefinition(): ChildrenDefinitionLike;
|
|
36
|
+
private withOrdering;
|
|
37
|
+
private childPropertyPath;
|
|
29
38
|
}
|
|
30
39
|
//# sourceMappingURL=ChildrenBuilder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildrenBuilder.d.ts","sourceRoot":"","sources":["../../../projections/declarative/ChildrenBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChildrenBuilder.d.ts","sourceRoot":"","sources":["../../../projections/declarative/ChildrenBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;AAG1F,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO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gB,EAAE,eAAe,CAAC,CAEhH;IAED,kBAAkB;IAClB,iBAAiB,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,eAAe,CAAC,GAAG,gBAAgB,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAE1H;IAED,kBAAkB;IAClB,SAAS,CAAC,aAAa,IAAI,MAAM,GAAG,SAAS,CAE5C;IAED;;;OAGG;IACH,eAAe,IAAI,sBAAsB,CAiBxC;IAED,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,iBAAiB;CAK5B"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
import { PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
4
|
+
import { prependOrdering, SortDirection, sortedOrdering } from '../childrenOrdering.js';
|
|
5
|
+
import { ChildrenOrderingAlreadyDefined } from './ChildrenOrderingAlreadyDefined.js';
|
|
4
6
|
import { ProjectionBuilderCore } from './ProjectionBuilderCore.js';
|
|
5
7
|
import { NestedBuilder } from './NestedBuilder.js';
|
|
6
8
|
/**
|
|
@@ -12,6 +14,7 @@ import { NestedBuilder } from './NestedBuilder.js';
|
|
|
12
14
|
export class ChildrenBuilder extends ProjectionBuilderCore {
|
|
13
15
|
_identifiedBy;
|
|
14
16
|
_fromEventPropertyPath;
|
|
17
|
+
_ordering;
|
|
15
18
|
/** @inheritdoc */
|
|
16
19
|
identifiedBy(propertyAccessor) {
|
|
17
20
|
const handler = new PropertyPathResolverProxyHandler();
|
|
@@ -49,6 +52,18 @@ export class ChildrenBuilder extends ProjectionBuilderCore {
|
|
|
49
52
|
return this;
|
|
50
53
|
}
|
|
51
54
|
/** @inheritdoc */
|
|
55
|
+
prepend() {
|
|
56
|
+
return this.withOrdering(prependOrdering());
|
|
57
|
+
}
|
|
58
|
+
/** @inheritdoc */
|
|
59
|
+
orderBy(propertyAccessor) {
|
|
60
|
+
return this.withOrdering(sortedOrdering(this.childPropertyPath(propertyAccessor), SortDirection.Ascending));
|
|
61
|
+
}
|
|
62
|
+
/** @inheritdoc */
|
|
63
|
+
orderByDescending(propertyAccessor) {
|
|
64
|
+
return this.withOrdering(sortedOrdering(this.childPropertyPath(propertyAccessor), SortDirection.Descending));
|
|
65
|
+
}
|
|
66
|
+
/** @inheritdoc */
|
|
52
67
|
defaultJoinOn() {
|
|
53
68
|
return this._identifiedBy;
|
|
54
69
|
}
|
|
@@ -70,8 +85,21 @@ export class ChildrenBuilder extends ProjectionBuilderCore {
|
|
|
70
85
|
RemovedWith: this._removedWith,
|
|
71
86
|
RemovedWithJoin: this._removedWithJoin,
|
|
72
87
|
AutoMap: this._autoMap,
|
|
73
|
-
Nested: this._nested
|
|
88
|
+
Nested: this._nested,
|
|
89
|
+
...(this._ordering === undefined ? {} : { Ordering: this._ordering })
|
|
74
90
|
};
|
|
75
91
|
}
|
|
92
|
+
withOrdering(ordering) {
|
|
93
|
+
if (this._ordering !== undefined) {
|
|
94
|
+
throw new ChildrenOrderingAlreadyDefined();
|
|
95
|
+
}
|
|
96
|
+
this._ordering = ordering;
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
childPropertyPath(propertyAccessor) {
|
|
100
|
+
const handler = new PropertyPathResolverProxyHandler();
|
|
101
|
+
propertyAccessor(new Proxy({}, handler));
|
|
102
|
+
return handler.path;
|
|
103
|
+
}
|
|
76
104
|
}
|
|
77
105
|
//# sourceMappingURL=ChildrenBuilder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildrenBuilder.js","sourceRoot":"","sources":["../../../projections/declarative/ChildrenBuilder.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAoB,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAA0B,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAG3F,OAAO,EAAE,aAAa,EAAE,M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AgB,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,OAAO,CAAoB,CAAC,CAAC;QAC5D,OAAO,OAAO,CAAC,IAAI,CAAC;IACxB,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChildrenOrderingAlreadyDefined.d.ts","sourceRoot":"","sources":["../../../projections/declarative/ChildrenOrderingAlreadyDefined.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,qBAAa,8BAA+B,SAAQ,KAAK;IACrD,yBAAyB;IACzB,cAGC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
/** Error thrown when a children collection is given more than one ordering. */
|
|
4
|
+
export class ChildrenOrderingAlreadyDefined extends Error {
|
|
5
|
+
/** Creates the error. */
|
|
6
|
+
constructor() {
|
|
7
|
+
super('The children collection already has an ordering. Use only one of prepend(), orderBy() or orderByDescending().');
|
|
8
|
+
this.name = 'ChildrenOrderingAlreadyDefined';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ChildrenOrderingAlreadyDefined.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChildrenOrderingAlreadyDefined.js","sourceRoot":"","sources":["../../../projections/declarative/ChildrenOrderingAlreadyDefined.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,+EAA+E;AAC/E,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACrD,yBAAyB;IACzB;QACI,KAAK,CAAC,+GAA+G,CAAC,CAAC;QACvH,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;IACjD,CAAC;CACJ"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PropertyAccessor } from '@cratis/fundamentals';
|
|
2
|
+
import type { EventContext } from '../../events/EventContext.js';
|
|
3
|
+
import { CausedByProperty } from '../causedBy.js';
|
|
4
|
+
/**
|
|
5
|
+
* Where the key of a dictionary entry comes from when a projection maps into a dictionary-typed read model property.
|
|
6
|
+
* Pass a plain accessor on the event for the common case; use the factory methods for keys from the event content,
|
|
7
|
+
* the event context or the identity that caused the event.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DictionaryKey {
|
|
10
|
+
readonly expression: string;
|
|
11
|
+
private constructor();
|
|
12
|
+
/**
|
|
13
|
+
* The key is read from a property of the event content. Nested paths are supported; the kernel requires the
|
|
14
|
+
* property to exist on the event (case-sensitively) and an event without a value for it leaves the dictionary as it is.
|
|
15
|
+
* @param eventPropertyAccessor - Accessor for the event property holding the key.
|
|
16
|
+
* @returns The dictionary key.
|
|
17
|
+
*/
|
|
18
|
+
static fromEventContent<TEvent>(eventPropertyAccessor: PropertyAccessor<TEvent>): DictionaryKey;
|
|
19
|
+
/**
|
|
20
|
+
* The key is read from the event context, for instance `eventSourceId` or `causedBy.subject`.
|
|
21
|
+
* @param contextProperty - The event context property name, or an accessor on the {@link EventContext}.
|
|
22
|
+
* @returns The dictionary key.
|
|
23
|
+
*/
|
|
24
|
+
static fromEventContext(contextProperty: string | PropertyAccessor<EventContext>): DictionaryKey;
|
|
25
|
+
/**
|
|
26
|
+
* The key is a member of the identity that caused the event.
|
|
27
|
+
* @param property - The identity member: `subject`, `name` or `userName`.
|
|
28
|
+
* @returns The dictionary key.
|
|
29
|
+
*/
|
|
30
|
+
static causedBy(property: CausedByProperty): DictionaryKey;
|
|
31
|
+
}
|
|
32
|
+
/** A dictionary key: an accessor on the event (the key is read from the event content) or a {@link DictionaryKey}. */
|
|
33
|
+
export type DictionaryKeySource<TEvent> = PropertyAccessor<TEvent> | DictionaryKey;
|
|
34
|
+
/**
|
|
35
|
+
* Resolves a dictionary key source to its {@link DictionaryKey}.
|
|
36
|
+
* @param key - The key source.
|
|
37
|
+
* @returns The dictionary key.
|
|
38
|
+
*/
|
|
39
|
+
export declare function toDictionaryKey<TEvent>(key: DictionaryKeySource<TEvent>): DictionaryKey;
|
|
40
|
+
/**
|
|
41
|
+
* Builds the target property path of a dictionary entry: `<dictionary>.<key expression>`, for example
|
|
42
|
+
* `slots.$eventContent.category`.
|
|
43
|
+
* @param dictionaryProperty - The dictionary-typed read model property.
|
|
44
|
+
* @param key - Where the key of the entry comes from.
|
|
45
|
+
* @returns The dynamic property path the kernel resolves per event.
|
|
46
|
+
*/
|
|
47
|
+
export declare function dictionaryEntryPath<TEvent>(dictionaryProperty: string, key: DictionaryKeySource<TEvent>): string;
|
|
48
|
+
//# sourceMappingURL=DictionaryKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DictionaryKey.d.ts","sourceRoot":"","sources":["../../../projections/declarative/DictionaryKey.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAoB,MAAM,gBAAgB,CAAC;AAKpE;;;;GAIG;AACH,qBAAa,aAAa;IACF,QAAQ,CAAC,UAAU,EAAE,MAAM;IAA/C,OAAO,eAA4C;IAEnD;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,aAAa,CAQ9F;IAED;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,gBAAgB,CAAC,YAAY,CAAC,GAAG,aAAa,CAe/F;IAED;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,GAAG,aAAa,CAEzD;CACJ;AAED,sHAAsH;AACtH,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC,GAAG,aAAa,CAAC;AAEnF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,aAAa,CAEvF;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,GAAG,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,MAAM,CAEhH"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 { PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
4
|
+
import { causedByProperty } from '../causedBy.js';
|
|
5
|
+
import { eventContextPropertyExpression } from '../eventContextPropertyExpression.js';
|
|
6
|
+
import { InvalidEventContextPropertyError } from '../InvalidEventContextPropertyError.js';
|
|
7
|
+
import { InvalidDictionaryKey } from './InvalidDictionaryKey.js';
|
|
8
|
+
/**
|
|
9
|
+
* Where the key of a dictionary entry comes from when a projection maps into a dictionary-typed read model property.
|
|
10
|
+
* Pass a plain accessor on the event for the common case; use the factory methods for keys from the event content,
|
|
11
|
+
* the event context or the identity that caused the event.
|
|
12
|
+
*/
|
|
13
|
+
export class DictionaryKey {
|
|
14
|
+
expression;
|
|
15
|
+
constructor(expression) {
|
|
16
|
+
this.expression = expression;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The key is read from a property of the event content. Nested paths are supported; the kernel requires the
|
|
20
|
+
* property to exist on the event (case-sensitively) and an event without a value for it leaves the dictionary as it is.
|
|
21
|
+
* @param eventPropertyAccessor - Accessor for the event property holding the key.
|
|
22
|
+
* @returns The dictionary key.
|
|
23
|
+
*/
|
|
24
|
+
static fromEventContent(eventPropertyAccessor) {
|
|
25
|
+
const handler = new PropertyPathResolverProxyHandler();
|
|
26
|
+
eventPropertyAccessor(new Proxy({}, handler));
|
|
27
|
+
const path = handler.path;
|
|
28
|
+
if (!/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*$/.test(path) || path.split('.').some(segment => segment.startsWith('$'))) {
|
|
29
|
+
throw new InvalidDictionaryKey(path);
|
|
30
|
+
}
|
|
31
|
+
return new DictionaryKey(`$eventContent.${path}`);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The key is read from the event context, for instance `eventSourceId` or `causedBy.subject`.
|
|
35
|
+
* @param contextProperty - The event context property name, or an accessor on the {@link EventContext}.
|
|
36
|
+
* @returns The dictionary key.
|
|
37
|
+
*/
|
|
38
|
+
static fromEventContext(contextProperty) {
|
|
39
|
+
let path;
|
|
40
|
+
if (typeof contextProperty === 'function') {
|
|
41
|
+
const handler = new PropertyPathResolverProxyHandler();
|
|
42
|
+
contextProperty(new Proxy({}, handler));
|
|
43
|
+
path = handler.path;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
path = contextProperty;
|
|
47
|
+
}
|
|
48
|
+
if (path.endsWith('()')) {
|
|
49
|
+
throw new InvalidEventContextPropertyError(path);
|
|
50
|
+
}
|
|
51
|
+
eventContextPropertyExpression(path);
|
|
52
|
+
const camelCased = path.split('.').map(segment => segment.charAt(0).toLowerCase() + segment.slice(1)).join('.');
|
|
53
|
+
return new DictionaryKey(`$eventContext.${camelCased}`);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The key is a member of the identity that caused the event.
|
|
57
|
+
* @param property - The identity member: `subject`, `name` or `userName`.
|
|
58
|
+
* @returns The dictionary key.
|
|
59
|
+
*/
|
|
60
|
+
static causedBy(property) {
|
|
61
|
+
return new DictionaryKey(`$causedBy.${causedByProperty(property)}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Resolves a dictionary key source to its {@link DictionaryKey}.
|
|
66
|
+
* @param key - The key source.
|
|
67
|
+
* @returns The dictionary key.
|
|
68
|
+
*/
|
|
69
|
+
export function toDictionaryKey(key) {
|
|
70
|
+
return key instanceof DictionaryKey ? key : DictionaryKey.fromEventContent(key);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Builds the target property path of a dictionary entry: `<dictionary>.<key expression>`, for example
|
|
74
|
+
* `slots.$eventContent.category`.
|
|
75
|
+
* @param dictionaryProperty - The dictionary-typed read model property.
|
|
76
|
+
* @param key - Where the key of the entry comes from.
|
|
77
|
+
* @returns The dynamic property path the kernel resolves per event.
|
|
78
|
+
*/
|
|
79
|
+
export function dictionaryEntryPath(dictionaryProperty, key) {
|
|
80
|
+
return `${dictionaryProperty}.${toDictionaryKey(key).expression}`;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=DictionaryKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DictionaryKey.js","sourceRoot":"","sources":["../../../projections/declarative/DictionaryKey.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,qGAAqG;AAErG,OAAO,EAAoB,gCAAgC,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAAoB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,OAAO,aAAa;IACO,UAAU;IAAvC,YAA6B,UAAkB;0BAAlB,UAAU;IAAW,CAAC;IAEnD;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAS,qBAA+C;QAC3E,MAAM,OAAO,GAAG,IAAI,gCAAgC,EAAE,CAAC;QACvD,qBAAqB,CAAC,IAAI,KAAK,CAAC,EAAE,EAAE,OAAO,CAAW,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,2CAA2C,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KA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AC;CACJ;AAKD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAS,GAAgC;IACpE,OAAO,GAAG,YAAY,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAS,kBAA0B,EAAE,GAAgC;IACpG,OAAO,GAAG,kBAAkB,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;AACtE,CAAC"}
|
|
@@ -7,6 +7,8 @@ export declare class FromAllBuilder<TReadModel> implements IFromAllBuilder<TRead
|
|
|
7
7
|
/** @inheritdoc */
|
|
8
8
|
set(readModelPropertyAccessor: PropertyAccessor<TReadModel>): IAllSetBuilder<TReadModel, IFromAllBuilder<TReadModel>>;
|
|
9
9
|
/** @inheritdoc */
|
|
10
|
+
setOnce(readModelPropertyAccessor: PropertyAccessor<TReadModel>): IAllSetBuilder<TReadModel, IFromAllBuilder<TReadModel>>;
|
|
11
|
+
/** @inheritdoc */
|
|
10
12
|
count(readModelPropertyAccessor: PropertyAccessor<TReadModel>, contextPropertyName?: string): IFromAllBuilder<TReadModel>;
|
|
11
13
|
/** @inheritdoc */
|
|
12
14
|
increment(readModelPropertyAccessor: PropertyAccessor<TReadModel>, contextPropertyName?: string): IFromAllBuilder<TReadModel>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FromAllBuilder.d.ts","sourceRoot":"","sources":["../../../projections/declarative/FromAllBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"FromAllBuilder.d.ts","sourceRoot":"","sources":["../../../projections/declarative/FromAllBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAoC,MAAM,sBAAsB,CAAC;AAG1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,gGAAgG;AAChG,qBAAa,cAAc,CAAC,UAAU,CAAE,YAAW,eAAe,CAAC,UAAU,CAAC;IAC1E,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAEjD,kBAAkB;IAClB,GAAG,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC,CAMpH;IAED,kBAAkB;IAClB,OAAO,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,cAAc,CAAC,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC,CAMxH;IAED,kBAAkB;IAClB,KAAK,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,UAAU,CAAC,CAExH;IAED,kBAAkB;IAClB,SAAS,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,UAAU,CAAC,CAE5H;IAED,kBAAkB;IAClB,SAAS,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,UAAU,CAAC,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC,UAAU,CAAC,CAE5H;IAED,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,cAAc;CAKzB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
import { PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
4
|
+
import { setOnceExpression } from '../propertyExpressions.js';
|
|
4
5
|
import { AllSetBuilder } from './AllSetBuilder.js';
|
|
5
6
|
/** Accumulates all-event mappings without restricting the event subscription to known types. */
|
|
6
7
|
export class FromAllBuilder {
|
|
@@ -10,6 +11,10 @@ export class FromAllBuilder {
|
|
|
10
11
|
return new AllSetBuilder(this.targetProperty(readModelPropertyAccessor), (property, expression) => { this.properties[property] = expression; }, this);
|
|
11
12
|
}
|
|
12
13
|
/** @inheritdoc */
|
|
14
|
+
setOnce(readModelPropertyAccessor) {
|
|
15
|
+
return new AllSetBuilder(this.targetProperty(readModelPropertyAccessor), (property, expression) => { this.properties[property] = setOnceExpression(expression); }, this);
|
|
16
|
+
}
|
|
17
|
+
/** @inheritdoc */
|
|
13
18
|
count(readModelPropertyAccessor, contextPropertyName) {
|
|
14
19
|
return this.operation(readModelPropertyAccessor, '$count', contextPropertyName);
|
|
15
20
|
}
|