@cratis/chronicle 6.3.1 → 6.4.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 +14 -14
- package/ChronicleOptions.ts +3 -3
- package/EventStore.ts +46 -43
- package/IChronicleClient.ts +4 -4
- package/IEventStore.ts +20 -20
- package/README.md +13 -2
- package/artifacts/DefaultClientArtifactsProvider.ts +3 -3
- package/artifacts/index.ts +2 -2
- package/artifacts/validateArtifactSchemas.spec.ts +61 -0
- package/artifacts/validateArtifactSchemas.ts +39 -0
- package/auditing/Causation.ts +1 -1
- package/auditing/CausationManager.ts +3 -3
- package/auditing/ICausationManager.ts +2 -2
- package/auditing/index.ts +5 -5
- package/compliance/ComplianceMetadata.ts +1 -1
- package/compliance/ComplianceMetadataResolver.ts +2 -2
- package/compliance/PIIManager.spec.ts +2 -2
- package/compliance/PIIManager.ts +2 -2
- package/compliance/index.ts +8 -8
- package/compliance/pii.spec.ts +2 -2
- package/compliance/pii.ts +11 -10
- package/compliance/subject.spec.ts +1 -1
- package/compliance/subject.ts +7 -6
- package/confidentiality/SecurityMetadata.ts +1 -1
- package/confidentiality/SecurityMetadataResolver.ts +2 -2
- package/confidentiality/encrypted.spec.ts +3 -3
- package/confidentiality/encrypted.ts +12 -11
- package/confidentiality/index.ts +7 -7
- package/connection/ChronicleConnection.ts +11 -11
- package/connection/ChronicleConnectionString.spec.ts +5 -5
- package/connection/ChronicleConnectionString.ts +2 -2
- package/connection/ChronicleServerAddressResolver.spec.ts +3 -3
- package/connection/ChronicleServerAddressResolver.ts +2 -2
- package/connection/ChronicleServices.ts +3 -3
- package/connection/ChronicleSrvResolver.spec.ts +2 -2
- package/connection/ChronicleSrvResolver.ts +2 -2
- package/connection/CompatibilityPreflight.ts +1 -1
- package/connection/ConnectionLifecycle.spec.ts +1 -1
- package/connection/ILoadBalancerStrategy.ts +1 -1
- package/connection/KernelKeepAlive.spec.ts +1 -1
- package/connection/LeastConnectionsLoadBalancerStrategy.spec.ts +2 -2
- package/connection/LeastConnectionsLoadBalancerStrategy.ts +3 -3
- package/connection/LoadBalancerStrategyFactory.ts +5 -5
- package/connection/RandomLoadBalancerStrategy.spec.ts +2 -2
- package/connection/RandomLoadBalancerStrategy.ts +2 -2
- package/connection/RoundRobinLoadBalancerStrategy.spec.ts +2 -2
- package/connection/RoundRobinLoadBalancerStrategy.ts +2 -2
- package/connection/TokenProvider.spec.ts +2 -2
- package/connection/TokenProvider.ts +1 -1
- package/connection/callResults.spec.ts +1 -1
- package/connection/for_ChronicleConnection/when_checking_compatibility/before_append.spec.ts +4 -4
- package/connection/for_CompatibilityPreflight/when_verifying/with_concurrent_calls.spec.ts +1 -1
- package/connection/formatServerAddress.ts +1 -1
- package/connection/index.ts +6 -6
- package/correlation/CorrelationIdManager.ts +3 -3
- package/correlation/ICorrelationIdAccessor.ts +1 -1
- package/correlation/ICorrelationIdSetter.ts +1 -1
- package/correlation/index.ts +5 -5
- package/dist/ChronicleClient.d.ts +5 -5
- package/dist/ChronicleClient.d.ts.map +1 -1
- package/dist/ChronicleClient.js +11 -11
- package/dist/ChronicleClient.js.map +1 -1
- package/dist/ChronicleOptions.d.ts +2 -2
- package/dist/ChronicleOptions.d.ts.map +1 -1
- package/dist/ChronicleOptions.js +3 -3
- package/dist/ChronicleOptions.js.map +1 -1
- package/dist/EventStore.d.ts +23 -23
- package/dist/EventStore.d.ts.map +1 -1
- package/dist/EventStore.js +24 -22
- package/dist/EventStore.js.map +1 -1
- package/dist/EventStoreName.d.ts.map +1 -1
- package/dist/EventStoreName.js.map +1 -1
- package/dist/EventStoreNamespaceName.d.ts.map +1 -1
- package/dist/EventStoreNamespaceName.js.map +1 -1
- package/dist/IChronicleClient.d.ts +4 -4
- package/dist/IChronicleClient.d.ts.map +1 -1
- package/dist/IEventStore.d.ts +20 -20
- package/dist/IEventStore.d.ts.map +1 -1
- package/dist/Metrics.d.ts.map +1 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.d.ts +2 -2
- package/dist/artifacts/DefaultClientArtifactsProvider.d.ts.map +1 -1
- package/dist/artifacts/DefaultClientArtifactsProvider.js +2 -2
- package/dist/artifacts/DefaultClientArtifactsProvider.js.map +1 -1
- package/dist/artifacts/index.d.ts +2 -2
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/index.js +1 -1
- package/dist/artifacts/index.js.map +1 -1
- package/dist/artifacts/validateArtifactSchemas.d.ts +4 -0
- package/dist/artifacts/validateArtifactSchemas.d.ts.map +1 -0
- package/dist/artifacts/validateArtifactSchemas.js +38 -0
- package/dist/artifacts/validateArtifactSchemas.js.map +1 -0
- package/dist/auditing/Causation.d.ts +1 -1
- package/dist/auditing/Causation.d.ts.map +1 -1
- package/dist/auditing/Causation.js +1 -1
- package/dist/auditing/Causation.js.map +1 -1
- package/dist/auditing/CausationManager.d.ts +3 -3
- package/dist/auditing/CausationManager.d.ts.map +1 -1
- package/dist/auditing/CausationManager.js +2 -2
- package/dist/auditing/CausationManager.js.map +1 -1
- package/dist/auditing/CausationType.d.ts.map +1 -1
- package/dist/auditing/CausationType.js.map +1 -1
- package/dist/auditing/ICausationManager.d.ts +2 -2
- package/dist/auditing/ICausationManager.d.ts.map +1 -1
- package/dist/auditing/index.d.ts +5 -5
- package/dist/auditing/index.d.ts.map +1 -1
- package/dist/auditing/index.js +4 -4
- package/dist/auditing/index.js.map +1 -1
- package/dist/compliance/ComplianceContracts.d.ts +5 -5
- package/dist/compliance/ComplianceContracts.d.ts.map +1 -1
- package/dist/compliance/ComplianceContracts.js.map +1 -1
- package/dist/compliance/ComplianceMetadata.d.ts +1 -1
- package/dist/compliance/ComplianceMetadata.d.ts.map +1 -1
- package/dist/compliance/ComplianceMetadataResolver.d.ts +1 -1
- package/dist/compliance/ComplianceMetadataResolver.d.ts.map +1 -1
- package/dist/compliance/ComplianceMetadataResolver.js +1 -1
- package/dist/compliance/ComplianceMetadataResolver.js.map +1 -1
- package/dist/compliance/ComplianceMetadataType.d.ts.map +1 -1
- package/dist/compliance/ComplianceMetadataType.js.map +1 -1
- package/dist/compliance/PIIManager.d.ts +2 -2
- package/dist/compliance/PIIManager.d.ts.map +1 -1
- package/dist/compliance/PIIManager.js.map +1 -1
- package/dist/compliance/PIINotSupportedOnEventSourceId.d.ts.map +1 -1
- package/dist/compliance/index.d.ts +8 -8
- package/dist/compliance/index.d.ts.map +1 -1
- package/dist/compliance/index.js +6 -6
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/pii.d.ts +3 -2
- package/dist/compliance/pii.d.ts.map +1 -1
- package/dist/compliance/pii.js +9 -8
- package/dist/compliance/pii.js.map +1 -1
- package/dist/compliance/subject.d.ts +2 -1
- package/dist/compliance/subject.d.ts.map +1 -1
- package/dist/compliance/subject.js +6 -5
- package/dist/compliance/subject.js.map +1 -1
- package/dist/confidentiality/EncryptedNotSupportedOnEventSourceId.d.ts.map +1 -1
- package/dist/confidentiality/PIIAndEncryptedCombinedNotSupported.d.ts.map +1 -1
- package/dist/confidentiality/SecurityMetadata.d.ts +1 -1
- package/dist/confidentiality/SecurityMetadata.d.ts.map +1 -1
- package/dist/confidentiality/SecurityMetadataResolver.d.ts +1 -1
- package/dist/confidentiality/SecurityMetadataResolver.d.ts.map +1 -1
- package/dist/confidentiality/SecurityMetadataResolver.js +1 -1
- package/dist/confidentiality/SecurityMetadataResolver.js.map +1 -1
- package/dist/confidentiality/SecurityMetadataType.d.ts.map +1 -1
- package/dist/confidentiality/SecurityMetadataType.js.map +1 -1
- package/dist/confidentiality/encrypted.d.ts +4 -3
- package/dist/confidentiality/encrypted.d.ts.map +1 -1
- package/dist/confidentiality/encrypted.js +10 -9
- package/dist/confidentiality/encrypted.js.map +1 -1
- package/dist/confidentiality/index.d.ts +7 -7
- package/dist/confidentiality/index.d.ts.map +1 -1
- package/dist/confidentiality/index.js +6 -6
- package/dist/confidentiality/index.js.map +1 -1
- package/dist/connection/ChronicleConnection.d.ts +5 -5
- package/dist/connection/ChronicleConnection.d.ts.map +1 -1
- package/dist/connection/ChronicleConnection.js +9 -9
- package/dist/connection/ChronicleConnection.js.map +1 -1
- package/dist/connection/ChronicleConnectionString.d.ts +1 -1
- package/dist/connection/ChronicleConnectionString.d.ts.map +1 -1
- package/dist/connection/ChronicleConnectionString.js +2 -2
- package/dist/connection/ChronicleConnectionString.js.map +1 -1
- package/dist/connection/ChronicleServerAddressResolver.d.ts +2 -2
- package/dist/connection/ChronicleServerAddressResolver.d.ts.map +1 -1
- package/dist/connection/ChronicleServerAddressResolver.js +1 -1
- package/dist/connection/ChronicleServerAddressResolver.js.map +1 -1
- package/dist/connection/ChronicleServices.d.ts +3 -3
- package/dist/connection/ChronicleServices.d.ts.map +1 -1
- package/dist/connection/ChronicleSrvResolutionError.d.ts.map +1 -1
- package/dist/connection/ChronicleSrvResolver.d.ts +1 -1
- package/dist/connection/ChronicleSrvResolver.d.ts.map +1 -1
- package/dist/connection/ChronicleSrvResolver.js +1 -1
- package/dist/connection/ChronicleSrvResolver.js.map +1 -1
- package/dist/connection/CompatibilityPreflight.d.ts.map +1 -1
- package/dist/connection/CompatibilityPreflight.js +1 -1
- package/dist/connection/CompatibilityPreflight.js.map +1 -1
- package/dist/connection/ConnectionLifecycle.d.ts.map +1 -1
- package/dist/connection/ILoadBalancerStrategy.d.ts +1 -1
- package/dist/connection/ILoadBalancerStrategy.d.ts.map +1 -1
- package/dist/connection/IncompatibleChronicleServer.d.ts.map +1 -1
- package/dist/connection/KernelKeepAlive.d.ts.map +1 -1
- package/dist/connection/KernelKeepAlive.js.map +1 -1
- package/dist/connection/LeastConnectionsLoadBalancerStrategy.d.ts +2 -2
- package/dist/connection/LeastConnectionsLoadBalancerStrategy.d.ts.map +1 -1
- package/dist/connection/LeastConnectionsLoadBalancerStrategy.js +1 -1
- package/dist/connection/LeastConnectionsLoadBalancerStrategy.js.map +1 -1
- package/dist/connection/LoadBalancerStrategyFactory.d.ts +2 -2
- package/dist/connection/LoadBalancerStrategyFactory.d.ts.map +1 -1
- package/dist/connection/LoadBalancerStrategyFactory.js +4 -4
- package/dist/connection/LoadBalancerStrategyFactory.js.map +1 -1
- package/dist/connection/RandomLoadBalancerStrategy.d.ts +2 -2
- package/dist/connection/RandomLoadBalancerStrategy.d.ts.map +1 -1
- package/dist/connection/RoundRobinLoadBalancerStrategy.d.ts +2 -2
- package/dist/connection/RoundRobinLoadBalancerStrategy.d.ts.map +1 -1
- package/dist/connection/TokenProvider.d.ts +1 -1
- package/dist/connection/TokenProvider.d.ts.map +1 -1
- package/dist/connection/TokenProvider.js +1 -1
- package/dist/connection/TokenProvider.js.map +1 -1
- package/dist/connection/callResults.d.ts.map +1 -1
- package/dist/connection/formatServerAddress.d.ts +1 -1
- package/dist/connection/formatServerAddress.d.ts.map +1 -1
- package/dist/connection/index.d.ts +6 -6
- package/dist/connection/index.d.ts.map +1 -1
- package/dist/connection/index.js +4 -4
- package/dist/connection/index.js.map +1 -1
- package/dist/correlation/CorrelationId.d.ts.map +1 -1
- package/dist/correlation/CorrelationId.js.map +1 -1
- package/dist/correlation/CorrelationIdManager.d.ts +3 -3
- package/dist/correlation/CorrelationIdManager.d.ts.map +1 -1
- package/dist/correlation/CorrelationIdManager.js +1 -1
- package/dist/correlation/CorrelationIdManager.js.map +1 -1
- package/dist/correlation/ICorrelationIdAccessor.d.ts +1 -1
- package/dist/correlation/ICorrelationIdAccessor.d.ts.map +1 -1
- package/dist/correlation/ICorrelationIdSetter.d.ts +1 -1
- package/dist/correlation/ICorrelationIdSetter.d.ts.map +1 -1
- package/dist/correlation/index.d.ts +5 -5
- package/dist/correlation/index.d.ts.map +1 -1
- package/dist/correlation/index.js +3 -3
- package/dist/correlation/index.js.map +1 -1
- package/dist/eventSequences/AppendOperationsBroadcaster.d.ts.map +1 -1
- package/dist/eventSequences/AppendOptions.d.ts +2 -2
- package/dist/eventSequences/AppendOptions.d.ts.map +1 -1
- package/dist/eventSequences/AppendResult.d.ts +5 -5
- package/dist/eventSequences/AppendResult.d.ts.map +1 -1
- package/dist/eventSequences/AppendedEventWithResult.d.ts +2 -2
- package/dist/eventSequences/AppendedEventWithResult.d.ts.map +1 -1
- package/dist/eventSequences/CompleteStreamResult.d.ts +2 -2
- package/dist/eventSequences/CompleteStreamResult.d.ts.map +1 -1
- package/dist/eventSequences/ConcurrencyScope.d.ts +1 -1
- package/dist/eventSequences/ConcurrencyScope.d.ts.map +1 -1
- package/dist/eventSequences/ConcurrencyViolation.d.ts +1 -1
- package/dist/eventSequences/ConcurrencyViolation.d.ts.map +1 -1
- package/dist/eventSequences/EventForEventSourceId.d.ts +1 -1
- package/dist/eventSequences/EventForEventSourceId.d.ts.map +1 -1
- package/dist/eventSequences/EventLog.d.ts +4 -4
- package/dist/eventSequences/EventLog.d.ts.map +1 -1
- package/dist/eventSequences/EventLog.js +2 -2
- package/dist/eventSequences/EventLog.js.map +1 -1
- package/dist/eventSequences/EventSequence.d.ts +13 -13
- package/dist/eventSequences/EventSequence.d.ts.map +1 -1
- package/dist/eventSequences/EventSequence.js +30 -20
- package/dist/eventSequences/EventSequence.js.map +1 -1
- package/dist/eventSequences/EventSequenceId.d.ts.map +1 -1
- package/dist/eventSequences/EventSequenceId.js.map +1 -1
- package/dist/eventSequences/EventSequenceNumber.d.ts.map +1 -1
- package/dist/eventSequences/EventSequenceNumber.js.map +1 -1
- package/dist/eventSequences/IEventLog.d.ts +1 -1
- package/dist/eventSequences/IEventLog.d.ts.map +1 -1
- package/dist/eventSequences/IEventSequence.d.ts +9 -9
- package/dist/eventSequences/IEventSequence.d.ts.map +1 -1
- package/dist/eventSequences/ITransactionalEventSequence.d.ts +1 -1
- package/dist/eventSequences/ITransactionalEventSequence.d.ts.map +1 -1
- package/dist/eventSequences/TransactionalEventSequence.d.ts +4 -4
- package/dist/eventSequences/TransactionalEventSequence.d.ts.map +1 -1
- package/dist/eventSequences/TransactionalEventSequence.js.map +1 -1
- package/dist/eventSequences/WaitForCompletionResult.d.ts +1 -1
- package/dist/eventSequences/WaitForCompletionResult.d.ts.map +1 -1
- package/dist/eventSequences/index.d.ts +19 -19
- package/dist/eventSequences/index.d.ts.map +1 -1
- package/dist/eventSequences/index.js +6 -6
- package/dist/eventSequences/index.js.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.d.ts +4 -4
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.js +2 -2
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.js.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionDefinition.d.ts +2 -2
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionDefinition.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionDefinition.js.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionId.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptionId.js.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.d.ts +7 -7
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.js +4 -4
- package/dist/eventStoreSubscriptions/EventStoreSubscriptions.js.map +1 -1
- package/dist/eventStoreSubscriptions/IEventStoreSubscriptionBuilder.d.ts +2 -2
- package/dist/eventStoreSubscriptions/IEventStoreSubscriptionBuilder.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/IEventStoreSubscriptions.d.ts +4 -4
- package/dist/eventStoreSubscriptions/IEventStoreSubscriptions.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/contracts.d.ts +5 -5
- package/dist/eventStoreSubscriptions/contracts.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/contracts.js.map +1 -1
- package/dist/eventStoreSubscriptions/index.d.ts +6 -6
- package/dist/eventStoreSubscriptions/index.d.ts.map +1 -1
- package/dist/eventStoreSubscriptions/index.js +4 -4
- package/dist/eventStoreSubscriptions/index.js.map +1 -1
- package/dist/events/AppendedEvent.d.ts +2 -2
- package/dist/events/AppendedEvent.d.ts.map +1 -1
- package/dist/events/EventContext.d.ts +4 -4
- package/dist/events/EventContext.d.ts.map +1 -1
- package/dist/events/EventType.d.ts +2 -2
- package/dist/events/EventType.d.ts.map +1 -1
- package/dist/events/EventType.js +2 -2
- package/dist/events/EventType.js.map +1 -1
- package/dist/events/EventTypeGeneration.d.ts.map +1 -1
- package/dist/events/EventTypeGeneration.js.map +1 -1
- package/dist/events/EventTypeId.d.ts.map +1 -1
- package/dist/events/EventTypeId.js.map +1 -1
- package/dist/events/EventTypes.d.ts +4 -4
- package/dist/events/EventTypes.d.ts.map +1 -1
- package/dist/events/EventTypes.js +5 -5
- package/dist/events/EventTypes.js.map +1 -1
- package/dist/events/IEventTypes.d.ts +1 -1
- package/dist/events/IEventTypes.d.ts.map +1 -1
- package/dist/events/Tag.d.ts.map +1 -1
- package/dist/events/Tag.js.map +1 -1
- package/dist/events/constraints/ConstraintBuilder.d.ts +3 -3
- package/dist/events/constraints/ConstraintBuilder.d.ts.map +1 -1
- package/dist/events/constraints/ConstraintBuilder.js +2 -2
- package/dist/events/constraints/ConstraintBuilder.js.map +1 -1
- package/dist/events/constraints/ConstraintId.d.ts.map +1 -1
- package/dist/events/constraints/ConstraintId.js.map +1 -1
- package/dist/events/constraints/Constraints.d.ts +4 -4
- package/dist/events/constraints/Constraints.d.ts.map +1 -1
- package/dist/events/constraints/Constraints.js +2 -2
- package/dist/events/constraints/Constraints.js.map +1 -1
- package/dist/events/constraints/IConstraint.d.ts +1 -1
- package/dist/events/constraints/IConstraint.d.ts.map +1 -1
- package/dist/events/constraints/IConstraintBuilder.d.ts +1 -1
- package/dist/events/constraints/IConstraintBuilder.d.ts.map +1 -1
- package/dist/events/constraints/IConstraints.d.ts +1 -1
- package/dist/events/constraints/IConstraints.d.ts.map +1 -1
- package/dist/events/constraints/UniqueConstraintBuilder.d.ts +1 -1
- package/dist/events/constraints/UniqueConstraintBuilder.d.ts.map +1 -1
- package/dist/events/constraints/UniqueConstraintBuilder.js +1 -1
- package/dist/events/constraints/UniqueConstraintBuilder.js.map +1 -1
- package/dist/events/constraints/constraint.d.ts +1 -1
- package/dist/events/constraints/constraint.d.ts.map +1 -1
- package/dist/events/constraints/constraint.js +2 -2
- package/dist/events/constraints/constraint.js.map +1 -1
- package/dist/events/constraints/index.d.ts +12 -12
- package/dist/events/constraints/index.d.ts.map +1 -1
- package/dist/events/constraints/index.js +5 -5
- package/dist/events/constraints/index.js.map +1 -1
- package/dist/events/eventTypeDecorator.d.ts +10 -9
- package/dist/events/eventTypeDecorator.d.ts.map +1 -1
- package/dist/events/eventTypeDecorator.js +27 -10
- package/dist/events/eventTypeDecorator.js.map +1 -1
- package/dist/events/filterEventsByTagDecorator.d.ts +1 -1
- package/dist/events/filterEventsByTagDecorator.d.ts.map +1 -1
- package/dist/events/filterEventsByTagDecorator.js +2 -2
- package/dist/events/filterEventsByTagDecorator.js.map +1 -1
- package/dist/events/index.d.ts +17 -16
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +12 -11
- package/dist/events/index.js.map +1 -1
- package/dist/events/mergeTags.d.ts +1 -1
- package/dist/events/mergeTags.d.ts.map +1 -1
- package/dist/events/migrations/EventMigrationBuilder.d.ts +2 -2
- package/dist/events/migrations/EventMigrationBuilder.d.ts.map +1 -1
- package/dist/events/migrations/EventMigrationBuilder.js +1 -1
- package/dist/events/migrations/EventMigrationBuilder.js.map +1 -1
- package/dist/events/migrations/EventMigrationPropertyBuilder.d.ts +1 -1
- package/dist/events/migrations/EventMigrationPropertyBuilder.d.ts.map +1 -1
- package/dist/events/migrations/EventTypeMigrators.d.ts +2 -2
- package/dist/events/migrations/EventTypeMigrators.d.ts.map +1 -1
- package/dist/events/migrations/EventTypeMigrators.js +2 -2
- package/dist/events/migrations/EventTypeMigrators.js.map +1 -1
- package/dist/events/migrations/IEventMigrationBuilder.d.ts +1 -1
- package/dist/events/migrations/IEventMigrationBuilder.d.ts.map +1 -1
- package/dist/events/migrations/IEventTypeMigration.d.ts +1 -1
- package/dist/events/migrations/IEventTypeMigration.d.ts.map +1 -1
- package/dist/events/migrations/InvalidMigrationGenerationGap.d.ts.map +1 -1
- package/dist/events/migrations/eventTypeMigration.d.ts +1 -1
- package/dist/events/migrations/eventTypeMigration.d.ts.map +1 -1
- package/dist/events/migrations/eventTypeMigration.js +3 -3
- package/dist/events/migrations/eventTypeMigration.js.map +1 -1
- package/dist/events/migrations/index.d.ts +10 -10
- package/dist/events/migrations/index.d.ts.map +1 -1
- package/dist/events/migrations/index.js +5 -5
- package/dist/events/migrations/index.js.map +1 -1
- package/dist/events/tagDecorator.d.ts +1 -1
- package/dist/events/tagDecorator.d.ts.map +1 -1
- package/dist/events/tagDecorator.js +2 -2
- package/dist/events/tagDecorator.js.map +1 -1
- package/dist/events/toClientEventContext.d.ts +2 -2
- package/dist/events/toClientEventContext.d.ts.map +1 -1
- package/dist/events/toClientEventContext.js +6 -6
- package/dist/events/toClientEventContext.js.map +1 -1
- package/dist/externalServices/ExternalServiceBuilder.d.ts +2 -2
- package/dist/externalServices/ExternalServiceBuilder.d.ts.map +1 -1
- package/dist/externalServices/ExternalServiceBuilder.js +1 -1
- package/dist/externalServices/ExternalServiceBuilder.js.map +1 -1
- package/dist/externalServices/ExternalServices.d.ts +3 -3
- package/dist/externalServices/ExternalServices.d.ts.map +1 -1
- package/dist/externalServices/ExternalServices.js +1 -1
- package/dist/externalServices/ExternalServices.js.map +1 -1
- package/dist/externalServices/ExternalServicesContracts.d.ts +3 -3
- package/dist/externalServices/ExternalServicesContracts.d.ts.map +1 -1
- package/dist/externalServices/ExternalServicesContracts.js.map +1 -1
- package/dist/externalServices/IExternalServices.d.ts +1 -1
- package/dist/externalServices/IExternalServices.d.ts.map +1 -1
- package/dist/externalServices/index.d.ts +4 -4
- package/dist/externalServices/index.d.ts.map +1 -1
- package/dist/externalServices/index.js +2 -2
- package/dist/externalServices/index.js.map +1 -1
- package/dist/identities/IdentityManager.d.ts +2 -2
- package/dist/identities/IdentityManager.d.ts.map +1 -1
- package/dist/identities/IdentityManager.js.map +1 -1
- package/dist/identities/index.d.ts +2 -2
- package/dist/identities/index.d.ts.map +1 -1
- package/dist/identities/index.js +1 -1
- package/dist/identities/index.js.map +1 -1
- package/dist/identity/IIdentityProvider.d.ts +1 -1
- package/dist/identity/IIdentityProvider.d.ts.map +1 -1
- package/dist/identity/Identity.d.ts.map +1 -1
- package/dist/identity/Identity.js.map +1 -1
- package/dist/identity/IdentityProvider.d.ts +2 -2
- package/dist/identity/IdentityProvider.d.ts.map +1 -1
- package/dist/identity/IdentityProvider.js +1 -1
- package/dist/identity/IdentityProvider.js.map +1 -1
- package/dist/identity/index.d.ts +4 -4
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +3 -3
- package/dist/identity/index.js.map +1 -1
- package/dist/index.d.ts +56 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -54
- package/dist/index.js.map +1 -1
- package/dist/jobs/IJobs.d.ts +1 -1
- package/dist/jobs/IJobs.d.ts.map +1 -1
- package/dist/jobs/JobId.d.ts.map +1 -1
- package/dist/jobs/JobId.js.map +1 -1
- package/dist/jobs/Jobs.d.ts +3 -3
- package/dist/jobs/Jobs.d.ts.map +1 -1
- package/dist/jobs/Jobs.js +3 -3
- package/dist/jobs/Jobs.js.map +1 -1
- package/dist/jobs/index.d.ts +3 -3
- package/dist/jobs/index.d.ts.map +1 -1
- package/dist/jobs/index.js +2 -2
- package/dist/jobs/index.js.map +1 -1
- package/dist/observation/FailedPartition.d.ts +1 -1
- package/dist/observation/FailedPartition.d.ts.map +1 -1
- package/dist/observation/FailedPartitionAttempt.d.ts +1 -1
- package/dist/observation/FailedPartitionAttempt.d.ts.map +1 -1
- package/dist/observation/FailedPartitions.d.ts +3 -3
- package/dist/observation/FailedPartitions.d.ts.map +1 -1
- package/dist/observation/FailedPartitions.js +1 -1
- package/dist/observation/FailedPartitions.js.map +1 -1
- package/dist/observation/IFailedPartitions.d.ts +1 -1
- package/dist/observation/IFailedPartitions.d.ts.map +1 -1
- package/dist/observation/ObserverId.d.ts.map +1 -1
- package/dist/observation/ObserverId.js.map +1 -1
- package/dist/observation/index.d.ts +9 -9
- package/dist/observation/index.d.ts.map +1 -1
- package/dist/observation/index.js +4 -4
- package/dist/observation/index.js.map +1 -1
- package/dist/observation/toClientFailedPartition.d.ts +1 -1
- package/dist/observation/toClientFailedPartition.d.ts.map +1 -1
- package/dist/observation/toClientFailedPartition.js +2 -2
- package/dist/observation/toClientFailedPartition.js.map +1 -1
- package/dist/observation/toObserverRunningState.d.ts +1 -1
- package/dist/observation/toObserverRunningState.d.ts.map +1 -1
- package/dist/observation/toObserverRunningState.js +1 -1
- package/dist/observation/toObserverRunningState.js.map +1 -1
- package/dist/projections/GlobalHandlerPropertyNotOnVariant.d.ts.map +1 -1
- package/dist/projections/IProjections.d.ts +5 -5
- package/dist/projections/IProjections.d.ts.map +1 -1
- package/dist/projections/ProjectionId.d.ts.map +1 -1
- package/dist/projections/ProjectionId.js.map +1 -1
- package/dist/projections/ProjectionState.d.ts +2 -2
- package/dist/projections/ProjectionState.d.ts.map +1 -1
- package/dist/projections/Projections.d.ts +8 -8
- package/dist/projections/Projections.d.ts.map +1 -1
- package/dist/projections/Projections.js +31 -31
- package/dist/projections/Projections.js.map +1 -1
- package/dist/projections/UnableToQueryProjection.d.ts.map +1 -1
- package/dist/projections/VariantMustDeclareEntersOnEvent.d.ts.map +1 -1
- package/dist/projections/VariantReclassifier.d.ts +1 -1
- package/dist/projections/VariantReclassifier.d.ts.map +1 -1
- package/dist/projections/VariantReclassifier.js +2 -2
- package/dist/projections/VariantReclassifier.js.map +1 -1
- package/dist/projections/declarative/AddBuilder.d.ts +1 -1
- package/dist/projections/declarative/AddBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/AddBuilder.js.map +1 -1
- package/dist/projections/declarative/AddChildBuilder.d.ts +1 -1
- package/dist/projections/declarative/AddChildBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/AllSetBuilder.d.ts +1 -1
- package/dist/projections/declarative/AllSetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/AllSetBuilder.js.map +1 -1
- package/dist/projections/declarative/ChildrenBuilder.d.ts +3 -3
- package/dist/projections/declarative/ChildrenBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/ChildrenBuilder.js +2 -2
- package/dist/projections/declarative/ChildrenBuilder.js.map +1 -1
- package/dist/projections/declarative/CompositeKeyBuilder.d.ts +1 -1
- package/dist/projections/declarative/CompositeKeyBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromBuilder.d.ts +7 -7
- package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromBuilder.js +5 -5
- package/dist/projections/declarative/FromBuilder.js.map +1 -1
- package/dist/projections/declarative/FromEveryBuilder.d.ts +2 -2
- package/dist/projections/declarative/FromEveryBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/FromEveryBuilder.js +1 -1
- package/dist/projections/declarative/FromEveryBuilder.js.map +1 -1
- package/dist/projections/declarative/IChildrenBuilder.d.ts +1 -1
- package/dist/projections/declarative/IChildrenBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IFromBuilder.d.ts +1 -1
- package/dist/projections/declarative/IFromBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IFromEveryBuilder.d.ts +1 -1
- package/dist/projections/declarative/IFromEveryBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IJoinBuilder.d.ts +1 -1
- package/dist/projections/declarative/IJoinBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/INestedBuilder.d.ts +1 -1
- package/dist/projections/declarative/INestedBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IProjectionBuilder.d.ts +7 -7
- package/dist/projections/declarative/IProjectionBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/IProjectionBuilderFor.d.ts +1 -1
- package/dist/projections/declarative/IProjectionBuilderFor.d.ts.map +1 -1
- package/dist/projections/declarative/IProjectionFor.d.ts +1 -1
- package/dist/projections/declarative/IProjectionFor.d.ts.map +1 -1
- package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts +5 -5
- package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/JoinBuilder.d.ts +7 -7
- package/dist/projections/declarative/JoinBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/JoinBuilder.js +5 -5
- package/dist/projections/declarative/JoinBuilder.js.map +1 -1
- package/dist/projections/declarative/NestedBuilder.d.ts +3 -3
- package/dist/projections/declarative/NestedBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/NestedBuilder.js +2 -2
- package/dist/projections/declarative/NestedBuilder.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts +5 -5
- package/dist/projections/declarative/ProjectionBuilderCore.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderCore.js +6 -6
- package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts +4 -4
- package/dist/projections/declarative/ProjectionBuilderFor.d.ts.map +1 -1
- package/dist/projections/declarative/ProjectionBuilderFor.js +4 -4
- package/dist/projections/declarative/ProjectionBuilderFor.js.map +1 -1
- package/dist/projections/declarative/RemovedWithBuilder.d.ts +1 -1
- package/dist/projections/declarative/RemovedWithBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/RemovedWithJoinBuilder.d.ts +1 -1
- package/dist/projections/declarative/RemovedWithJoinBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/SetBuilder.d.ts +1 -1
- package/dist/projections/declarative/SetBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/SetBuilder.js.map +1 -1
- package/dist/projections/declarative/SubtractBuilder.d.ts +1 -1
- package/dist/projections/declarative/SubtractBuilder.d.ts.map +1 -1
- package/dist/projections/declarative/SubtractBuilder.js.map +1 -1
- package/dist/projections/declarative/index.d.ts +32 -32
- package/dist/projections/declarative/index.d.ts.map +1 -1
- package/dist/projections/declarative/index.js +13 -13
- package/dist/projections/declarative/index.js.map +1 -1
- package/dist/projections/declarative/projection.d.ts +1 -1
- package/dist/projections/declarative/projection.d.ts.map +1 -1
- package/dist/projections/declarative/projection.js +2 -2
- package/dist/projections/declarative/projection.js.map +1 -1
- package/dist/projections/index.d.ts +10 -10
- package/dist/projections/index.d.ts.map +1 -1
- package/dist/projections/index.js +7 -7
- package/dist/projections/index.js.map +1 -1
- package/dist/projections/modelBound/FromEventMetadata.d.ts +1 -1
- package/dist/projections/modelBound/FromEventMetadata.d.ts.map +1 -1
- package/dist/projections/modelBound/addFrom.d.ts +2 -1
- package/dist/projections/modelBound/addFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/addFrom.js +5 -4
- package/dist/projections/modelBound/addFrom.js.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenAndNestedBuilder.js +16 -16
- package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -1
- package/dist/projections/modelBound/childrenFrom.d.ts +2 -1
- package/dist/projections/modelBound/childrenFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/childrenFrom.js +5 -4
- package/dist/projections/modelBound/childrenFrom.js.map +1 -1
- package/dist/projections/modelBound/clearWith.d.ts +2 -1
- package/dist/projections/modelBound/clearWith.d.ts.map +1 -1
- package/dist/projections/modelBound/clearWith.js +5 -4
- package/dist/projections/modelBound/clearWith.js.map +1 -1
- package/dist/projections/modelBound/count.d.ts +2 -1
- package/dist/projections/modelBound/count.d.ts.map +1 -1
- package/dist/projections/modelBound/count.js +5 -4
- package/dist/projections/modelBound/count.js.map +1 -1
- package/dist/projections/modelBound/decrement.d.ts +2 -1
- package/dist/projections/modelBound/decrement.d.ts.map +1 -1
- package/dist/projections/modelBound/decrement.js +5 -4
- package/dist/projections/modelBound/decrement.js.map +1 -1
- package/dist/projections/modelBound/eventSequence.js +1 -1
- package/dist/projections/modelBound/eventSequence.js.map +1 -1
- package/dist/projections/modelBound/fromAll.d.ts +2 -1
- package/dist/projections/modelBound/fromAll.d.ts.map +1 -1
- package/dist/projections/modelBound/fromAll.js +5 -4
- package/dist/projections/modelBound/fromAll.js.map +1 -1
- package/dist/projections/modelBound/fromEvent.d.ts +2 -2
- package/dist/projections/modelBound/fromEvent.d.ts.map +1 -1
- package/dist/projections/modelBound/fromEvery.d.ts +2 -1
- package/dist/projections/modelBound/fromEvery.d.ts.map +1 -1
- package/dist/projections/modelBound/fromEvery.js +5 -4
- package/dist/projections/modelBound/fromEvery.js.map +1 -1
- package/dist/projections/modelBound/globalFor.js +1 -1
- package/dist/projections/modelBound/globalFor.js.map +1 -1
- package/dist/projections/modelBound/increment.d.ts +2 -1
- package/dist/projections/modelBound/increment.d.ts.map +1 -1
- package/dist/projections/modelBound/increment.js +5 -4
- package/dist/projections/modelBound/increment.js.map +1 -1
- package/dist/projections/modelBound/index.d.ts +44 -44
- package/dist/projections/modelBound/index.d.ts.map +1 -1
- package/dist/projections/modelBound/index.js +24 -24
- package/dist/projections/modelBound/index.js.map +1 -1
- package/dist/projections/modelBound/join.d.ts +2 -1
- package/dist/projections/modelBound/join.d.ts.map +1 -1
- package/dist/projections/modelBound/join.js +5 -4
- package/dist/projections/modelBound/join.js.map +1 -1
- package/dist/projections/modelBound/nested.d.ts +1 -6
- package/dist/projections/modelBound/nested.d.ts.map +1 -1
- package/dist/projections/modelBound/nested.js +7 -3
- package/dist/projections/modelBound/nested.js.map +1 -1
- package/dist/projections/modelBound/noAutoMap.d.ts +4 -11
- package/dist/projections/modelBound/noAutoMap.d.ts.map +1 -1
- package/dist/projections/modelBound/noAutoMap.js +7 -3
- package/dist/projections/modelBound/noAutoMap.js.map +1 -1
- package/dist/projections/modelBound/removedWith.d.ts +2 -1
- package/dist/projections/modelBound/removedWith.d.ts.map +1 -1
- package/dist/projections/modelBound/removedWith.js +5 -4
- package/dist/projections/modelBound/removedWith.js.map +1 -1
- package/dist/projections/modelBound/removedWithJoin.d.ts +2 -1
- package/dist/projections/modelBound/removedWithJoin.d.ts.map +1 -1
- package/dist/projections/modelBound/removedWithJoin.js +5 -4
- package/dist/projections/modelBound/removedWithJoin.js.map +1 -1
- package/dist/projections/modelBound/setFrom.d.ts +2 -1
- package/dist/projections/modelBound/setFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/setFrom.js +5 -4
- package/dist/projections/modelBound/setFrom.js.map +1 -1
- package/dist/projections/modelBound/setFromContext.d.ts +4 -3
- package/dist/projections/modelBound/setFromContext.d.ts.map +1 -1
- package/dist/projections/modelBound/setFromContext.js +5 -4
- package/dist/projections/modelBound/setFromContext.js.map +1 -1
- package/dist/projections/modelBound/setValue.d.ts +2 -1
- package/dist/projections/modelBound/setValue.d.ts.map +1 -1
- package/dist/projections/modelBound/setValue.js +5 -4
- package/dist/projections/modelBound/setValue.js.map +1 -1
- package/dist/projections/modelBound/subtractFrom.d.ts +2 -1
- package/dist/projections/modelBound/subtractFrom.d.ts.map +1 -1
- package/dist/projections/modelBound/subtractFrom.js +5 -4
- package/dist/projections/modelBound/subtractFrom.js.map +1 -1
- package/dist/reactors/ReactorId.d.ts.map +1 -1
- package/dist/reactors/ReactorId.js.map +1 -1
- package/dist/reactors/ReactorSideEffects.d.ts +1 -1
- package/dist/reactors/ReactorSideEffects.d.ts.map +1 -1
- package/dist/reactors/ReactorSideEffects.js +1 -1
- package/dist/reactors/ReactorSideEffects.js.map +1 -1
- package/dist/reactors/Reactors.d.ts +5 -5
- package/dist/reactors/Reactors.d.ts.map +1 -1
- package/dist/reactors/Reactors.js +8 -8
- package/dist/reactors/Reactors.js.map +1 -1
- package/dist/reactors/index.d.ts +5 -5
- package/dist/reactors/index.d.ts.map +1 -1
- package/dist/reactors/index.js +3 -3
- package/dist/reactors/index.js.map +1 -1
- package/dist/reactors/reactor.d.ts +1 -1
- package/dist/reactors/reactor.d.ts.map +1 -1
- package/dist/reactors/reactor.js +2 -2
- package/dist/reactors/reactor.js.map +1 -1
- package/dist/readModels/IReadModels.d.ts +3 -3
- package/dist/readModels/IReadModels.d.ts.map +1 -1
- package/dist/readModels/MaterializedReadModels.d.ts +2 -2
- package/dist/readModels/MaterializedReadModels.d.ts.map +1 -1
- package/dist/readModels/MaterializedReadModels.js +3 -3
- package/dist/readModels/MaterializedReadModels.js.map +1 -1
- package/dist/readModels/ReadModelId.d.ts.map +1 -1
- package/dist/readModels/ReadModelId.js.map +1 -1
- package/dist/readModels/ReadModelSubjectResolver.d.ts.map +1 -1
- package/dist/readModels/ReadModelSubjectResolver.js +1 -1
- package/dist/readModels/ReadModelSubjectResolver.js.map +1 -1
- package/dist/readModels/ReadModels.d.ts +6 -6
- package/dist/readModels/ReadModels.d.ts.map +1 -1
- package/dist/readModels/ReadModels.js +12 -12
- package/dist/readModels/ReadModels.js.map +1 -1
- package/dist/readModels/index.d.ts +10 -10
- package/dist/readModels/index.d.ts.map +1 -1
- package/dist/readModels/index.js +5 -5
- package/dist/readModels/index.js.map +1 -1
- package/dist/readModels/readModel.d.ts +4 -3
- package/dist/readModels/readModel.d.ts.map +1 -1
- package/dist/readModels/readModel.js +25 -8
- package/dist/readModels/readModel.js.map +1 -1
- package/dist/reducers/ReducerId.d.ts.map +1 -1
- package/dist/reducers/ReducerId.js.map +1 -1
- package/dist/reducers/Reducers.d.ts +4 -4
- package/dist/reducers/Reducers.d.ts.map +1 -1
- package/dist/reducers/Reducers.js +10 -10
- package/dist/reducers/Reducers.js.map +1 -1
- package/dist/reducers/index.d.ts +5 -5
- package/dist/reducers/index.d.ts.map +1 -1
- package/dist/reducers/index.js +3 -3
- package/dist/reducers/index.js.map +1 -1
- package/dist/reducers/reducer.d.ts +1 -1
- package/dist/reducers/reducer.d.ts.map +1 -1
- package/dist/reducers/reducer.js +2 -2
- package/dist/reducers/reducer.js.map +1 -1
- package/dist/schemas/JsonSchemaGenerator.d.ts +7 -2
- package/dist/schemas/JsonSchemaGenerator.d.ts.map +1 -1
- package/dist/schemas/JsonSchemaGenerator.js +45 -35
- package/dist/schemas/JsonSchemaGenerator.js.map +1 -1
- package/dist/schemas/createDeferredSchema.d.ts +7 -0
- package/dist/schemas/createDeferredSchema.d.ts.map +1 -0
- package/dist/schemas/createDeferredSchema.js +19 -0
- package/dist/schemas/createDeferredSchema.js.map +1 -0
- package/dist/schemas/index.d.ts +4 -3
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/jsonSchemaProperty.d.ts +2 -1
- package/dist/schemas/jsonSchemaProperty.d.ts.map +1 -1
- package/dist/schemas/jsonSchemaProperty.js +4 -3
- package/dist/schemas/jsonSchemaProperty.js.map +1 -1
- package/dist/seeding/EventSeeding.d.ts +6 -6
- package/dist/seeding/EventSeeding.d.ts.map +1 -1
- package/dist/seeding/EventSeeding.js +4 -4
- package/dist/seeding/EventSeeding.js.map +1 -1
- package/dist/seeding/ICanSeedEvents.d.ts +1 -1
- package/dist/seeding/ICanSeedEvents.d.ts.map +1 -1
- package/dist/seeding/IEventSeeding.d.ts +1 -1
- package/dist/seeding/IEventSeeding.d.ts.map +1 -1
- package/dist/seeding/IEventSeedingBuilder.d.ts +2 -2
- package/dist/seeding/IEventSeedingBuilder.d.ts.map +1 -1
- package/dist/seeding/index.d.ts +7 -7
- package/dist/seeding/index.d.ts.map +1 -1
- package/dist/seeding/index.js +2 -2
- package/dist/seeding/index.js.map +1 -1
- package/dist/seeding/seeder.js +1 -1
- package/dist/seeding/seeder.js.map +1 -1
- package/dist/sinks/WellKnownSinks.d.ts +4 -4
- package/dist/sinks/WellKnownSinks.d.ts.map +1 -1
- package/dist/sinks/index.d.ts +1 -1
- package/dist/sinks/index.d.ts.map +1 -1
- package/dist/sinks/index.js +1 -1
- package/dist/sinks/index.js.map +1 -1
- package/dist/transactions/IUnitOfWork.d.ts +5 -5
- package/dist/transactions/IUnitOfWork.d.ts.map +1 -1
- package/dist/transactions/IUnitOfWorkManager.d.ts +1 -1
- package/dist/transactions/IUnitOfWorkManager.d.ts.map +1 -1
- package/dist/transactions/NoUnitOfWorkHasBeenStarted.d.ts.map +1 -1
- package/dist/transactions/UnitOfWork.d.ts +7 -7
- package/dist/transactions/UnitOfWork.d.ts.map +1 -1
- package/dist/transactions/UnitOfWork.js +1 -1
- package/dist/transactions/UnitOfWork.js.map +1 -1
- package/dist/transactions/UnitOfWorkManager.d.ts +3 -3
- package/dist/transactions/UnitOfWorkManager.d.ts.map +1 -1
- package/dist/transactions/UnitOfWorkManager.js +2 -2
- package/dist/transactions/UnitOfWorkManager.js.map +1 -1
- package/dist/transactions/index.d.ts +5 -5
- package/dist/transactions/index.d.ts.map +1 -1
- package/dist/transactions/index.js +3 -3
- package/dist/transactions/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/TypeDiscoverer.d.ts +1 -1
- package/dist/types/TypeDiscoverer.d.ts.map +1 -1
- package/dist/types/TypeDiscoverer.js.map +1 -1
- package/dist/types/TypeIntrospector.d.ts.map +1 -1
- package/dist/types/TypeIntrospector.js +9 -3
- package/dist/types/TypeIntrospector.js.map +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -3
- package/dist/types/index.js.map +1 -1
- package/dist/types/propertyDecoratorMetadata.d.ts +17 -0
- package/dist/types/propertyDecoratorMetadata.d.ts.map +1 -0
- package/dist/types/propertyDecoratorMetadata.js +76 -0
- package/dist/types/propertyDecoratorMetadata.js.map +1 -0
- package/dist/types/standardDecoratorMetadata.d.ts +9 -0
- package/dist/types/standardDecoratorMetadata.d.ts.map +1 -0
- package/dist/types/standardDecoratorMetadata.js +20 -0
- package/dist/types/standardDecoratorMetadata.js.map +1 -0
- package/dist/webhooks/IWebhook.d.ts +1 -1
- package/dist/webhooks/IWebhook.d.ts.map +1 -1
- package/dist/webhooks/IWebhookDefinitionBuilder.d.ts +1 -1
- package/dist/webhooks/IWebhookDefinitionBuilder.d.ts.map +1 -1
- package/dist/webhooks/IWebhooks.d.ts +3 -3
- package/dist/webhooks/IWebhooks.d.ts.map +1 -1
- package/dist/webhooks/WebhookDefinitionBuilder.d.ts +5 -5
- package/dist/webhooks/WebhookDefinitionBuilder.d.ts.map +1 -1
- package/dist/webhooks/WebhookDefinitionBuilder.js +2 -2
- package/dist/webhooks/WebhookDefinitionBuilder.js.map +1 -1
- package/dist/webhooks/WebhookId.d.ts.map +1 -1
- package/dist/webhooks/WebhookId.js.map +1 -1
- package/dist/webhooks/WebhookTargetUrl.d.ts.map +1 -1
- package/dist/webhooks/WebhookTargetUrl.js.map +1 -1
- package/dist/webhooks/Webhooks.d.ts +7 -7
- package/dist/webhooks/Webhooks.d.ts.map +1 -1
- package/dist/webhooks/Webhooks.js +6 -6
- package/dist/webhooks/Webhooks.js.map +1 -1
- package/dist/webhooks/index.d.ts +9 -9
- package/dist/webhooks/index.d.ts.map +1 -1
- package/dist/webhooks/index.js +5 -5
- package/dist/webhooks/index.js.map +1 -1
- package/dist/webhooks/webhook.d.ts +2 -2
- package/dist/webhooks/webhook.d.ts.map +1 -1
- package/dist/webhooks/webhook.js +3 -3
- package/dist/webhooks/webhook.js.map +1 -1
- package/eventSequences/AppendOptions.ts +2 -2
- package/eventSequences/AppendResult.ts +5 -5
- package/eventSequences/AppendedEventWithResult.ts +2 -2
- package/eventSequences/CompleteStreamResult.ts +2 -2
- package/eventSequences/ConcurrencyScope.ts +1 -1
- package/eventSequences/ConcurrencyViolation.ts +1 -1
- package/eventSequences/EventForEventSourceId.ts +1 -1
- package/eventSequences/EventLog.ts +5 -5
- package/eventSequences/EventSequence.spec.ts +47 -8
- package/eventSequences/EventSequence.ts +52 -42
- package/eventSequences/IEventLog.ts +1 -1
- package/eventSequences/IEventSequence.ts +9 -9
- package/eventSequences/ITransactionalEventSequence.ts +1 -1
- package/eventSequences/TransactionalEventSequence.ts +4 -4
- package/eventSequences/WaitForCompletionResult.ts +1 -1
- package/eventSequences/for_EventSequence/when_appending/with_metadata.spec.ts +4 -4
- package/eventSequences/for_EventSequence/when_reading/with_route_filters.spec.ts +4 -4
- package/eventSequences/index.ts +19 -19
- package/eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts +4 -4
- package/eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts +2 -2
- package/eventStoreSubscriptions/EventStoreSubscriptions.spec.ts +3 -3
- package/eventStoreSubscriptions/EventStoreSubscriptions.ts +8 -8
- package/eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts +2 -2
- package/eventStoreSubscriptions/IEventStoreSubscriptions.ts +4 -4
- package/eventStoreSubscriptions/index.ts +6 -6
- package/events/AppendedEvent.ts +2 -2
- package/events/EventContext.ts +4 -4
- package/events/EventType.ts +2 -2
- package/events/EventTypes.ts +10 -10
- package/events/IEventTypes.ts +1 -1
- package/events/classDecorators.standard.spec.ts +77 -0
- package/events/constraints/ConstraintBuilder.ts +4 -4
- package/events/constraints/Constraints.ts +7 -7
- package/events/constraints/IConstraint.ts +1 -1
- package/events/constraints/IConstraintBuilder.ts +1 -1
- package/events/constraints/IConstraints.ts +1 -1
- package/events/constraints/UniqueConstraintBuilder.ts +2 -2
- package/events/constraints/constraint.ts +2 -2
- package/events/constraints/for_Constraints/when_registering_unique_property_constraints.spec.ts +8 -8
- package/events/constraints/index.ts +12 -12
- package/events/eventTypeDecorator.ts +36 -18
- package/events/filterEventsByTagDecorator.ts +2 -2
- package/events/for_EventContext/when_receiving/with_kernel_metadata.spec.ts +11 -11
- package/events/index.ts +18 -16
- package/events/mergeTags.spec.ts +2 -2
- package/events/mergeTags.ts +1 -1
- package/events/migrations/EventMigrationBuilder.ts +2 -2
- package/events/migrations/EventMigrationPropertyBuilder.ts +1 -1
- package/events/migrations/EventTypeMigrators.ts +4 -4
- package/events/migrations/IEventMigrationBuilder.ts +1 -1
- package/events/migrations/IEventTypeMigration.ts +1 -1
- package/events/migrations/eventTypeMigration.ts +4 -4
- package/events/migrations/index.ts +10 -10
- package/events/tagDecorator.spec.ts +2 -2
- package/events/tagDecorator.ts +2 -2
- package/events/toClientEventContext.ts +8 -8
- package/externalServices/ExternalServiceBuilder.ts +2 -2
- package/externalServices/ExternalServices.ts +4 -4
- package/externalServices/IExternalServices.ts +1 -1
- package/externalServices/index.ts +4 -4
- package/for_ChronicleClient/when_reconnecting/and_the_server_becomes_incompatible.spec.ts +3 -3
- package/identities/IdentityManager.ts +2 -2
- package/identities/index.ts +2 -2
- package/identity/IIdentityProvider.ts +1 -1
- package/identity/IdentityProvider.ts +2 -2
- package/identity/index.ts +4 -4
- package/index.ts +56 -56
- package/jobs/IJobs.ts +1 -1
- package/jobs/Jobs.ts +5 -5
- package/jobs/index.ts +3 -3
- package/observation/FailedPartition.ts +1 -1
- package/observation/FailedPartitionAttempt.ts +1 -1
- package/observation/FailedPartitions.spec.ts +2 -2
- package/observation/FailedPartitions.ts +4 -4
- package/observation/IFailedPartitions.ts +1 -1
- package/observation/index.ts +9 -9
- package/observation/notifyReplayLifecycle.spec.ts +1 -1
- package/observation/notifyReplayLifecycle.ts +2 -2
- package/observation/toClientFailedPartition.ts +3 -3
- package/observation/toObserverRunningState.ts +1 -1
- package/package.json +7 -3
- package/projections/IProjections.ts +5 -5
- package/projections/ProjectionState.ts +2 -2
- package/projections/Projections.childrenAndNested.spec.ts +10 -10
- package/projections/Projections.declarativeVariants.spec.ts +8 -8
- package/projections/Projections.modelBoundCompleteness.spec.ts +11 -11
- package/projections/Projections.operationalSurface.spec.ts +12 -12
- package/projections/Projections.spec.ts +11 -11
- package/projections/Projections.ts +38 -38
- package/projections/Projections.variants.spec.ts +12 -12
- package/projections/VariantReclassifier.ts +3 -3
- package/projections/declarative/AddBuilder.ts +1 -1
- package/projections/declarative/AddChildBuilder.ts +1 -1
- package/projections/declarative/AllSetBuilder.ts +1 -1
- package/projections/declarative/ChildrenBuilder.spec.ts +2 -2
- package/projections/declarative/ChildrenBuilder.ts +4 -4
- package/projections/declarative/CompositeKeyBuilder.spec.ts +2 -2
- package/projections/declarative/CompositeKeyBuilder.ts +1 -1
- package/projections/declarative/FromBuilder.ts +11 -11
- package/projections/declarative/FromEveryBuilder.ts +3 -3
- package/projections/declarative/IChildrenBuilder.ts +1 -1
- package/projections/declarative/IFromBuilder.ts +1 -1
- package/projections/declarative/IFromEveryBuilder.ts +1 -1
- package/projections/declarative/IJoinBuilder.ts +1 -1
- package/projections/declarative/INestedBuilder.ts +1 -1
- package/projections/declarative/IProjectionBuilder.ts +7 -7
- package/projections/declarative/IProjectionBuilderFor.ts +1 -1
- package/projections/declarative/IProjectionFor.ts +1 -1
- package/projections/declarative/IReadModelPropertiesBuilder.ts +5 -5
- package/projections/declarative/JoinBuilder.ts +11 -11
- package/projections/declarative/NestedBuilder.ts +4 -4
- package/projections/declarative/ProjectionBuilderCore.ts +12 -12
- package/projections/declarative/ProjectionBuilderFor.spec.ts +2 -2
- package/projections/declarative/ProjectionBuilderFor.ts +7 -7
- package/projections/declarative/RemovedWithBuilder.ts +1 -1
- package/projections/declarative/RemovedWithJoinBuilder.ts +1 -1
- package/projections/declarative/SetBuilder.ts +1 -1
- package/projections/declarative/SubtractBuilder.ts +1 -1
- package/projections/declarative/index.ts +32 -32
- package/projections/declarative/projection.ts +2 -2
- package/projections/index.ts +10 -10
- package/projections/modelBound/FromEventMetadata.ts +1 -1
- package/projections/modelBound/addFrom.ts +6 -5
- package/projections/modelBound/childrenAndNestedBuilder.ts +16 -16
- package/projections/modelBound/childrenFrom.ts +6 -5
- package/projections/modelBound/clearWith.ts +6 -5
- package/projections/modelBound/count.ts +6 -5
- package/projections/modelBound/decorators.standard.spec.ts +71 -0
- package/projections/modelBound/decrement.ts +6 -5
- package/projections/modelBound/eventSequence.ts +1 -1
- package/projections/modelBound/fromAll.ts +6 -5
- package/projections/modelBound/fromEvent.ts +2 -2
- package/projections/modelBound/fromEvery.ts +6 -5
- package/projections/modelBound/globalFor.ts +1 -1
- package/projections/modelBound/increment.ts +6 -5
- package/projections/modelBound/index.ts +44 -44
- package/projections/modelBound/join.ts +6 -5
- package/projections/modelBound/nested.ts +10 -3
- package/projections/modelBound/noAutoMap.ts +12 -3
- package/projections/modelBound/removedWith.ts +6 -5
- package/projections/modelBound/removedWithJoin.ts +6 -5
- package/projections/modelBound/setFrom.ts +6 -5
- package/projections/modelBound/setFromContext.ts +9 -8
- package/projections/modelBound/setValue.ts +6 -5
- package/projections/modelBound/subtractFrom.ts +6 -5
- package/reactors/ReactorSideEffects.spec.ts +4 -4
- package/reactors/ReactorSideEffects.ts +3 -3
- package/reactors/Reactors.ts +13 -13
- package/reactors/index.ts +5 -5
- package/reactors/reactor.ts +2 -2
- package/readModels/IReadModels.ts +3 -3
- package/readModels/MaterializedReadModels.spec.ts +5 -5
- package/readModels/MaterializedReadModels.ts +5 -5
- package/readModels/ReadModelSubjectResolver.spec.ts +2 -2
- package/readModels/ReadModelSubjectResolver.ts +1 -1
- package/readModels/ReadModels.spec.ts +6 -6
- package/readModels/ReadModels.ts +18 -18
- package/readModels/index.ts +10 -10
- package/readModels/readModel.ts +27 -9
- package/readModels/standardFallbacks.standard.spec.ts +39 -0
- package/reducers/Reducers.spec.ts +9 -9
- package/reducers/Reducers.ts +14 -14
- package/reducers/index.ts +5 -5
- package/reducers/reducer.spec.ts +1 -1
- package/reducers/reducer.ts +2 -2
- package/schemas/JsonSchemaGenerator.confidentiality.spec.ts +8 -6
- package/schemas/JsonSchemaGenerator.spec.ts +32 -5
- package/schemas/JsonSchemaGenerator.ts +52 -37
- package/schemas/createDeferredSchema.ts +21 -0
- package/schemas/decorators.expected.fixture.ts +24 -0
- package/schemas/decorators.legacy.spec.ts +62 -0
- package/schemas/decorators.standard.spec.ts +235 -0
- package/schemas/index.ts +4 -3
- package/schemas/jsonSchemaProperty.ts +5 -4
- package/schemas/legacyDesignMetadata.spec.ts +39 -0
- package/seeding/EventSeeding.ts +10 -10
- package/seeding/ICanSeedEvents.ts +1 -1
- package/seeding/IEventSeeding.ts +1 -1
- package/seeding/IEventSeedingBuilder.ts +2 -2
- package/seeding/index.ts +7 -7
- package/seeding/seeder.ts +1 -1
- package/sinks/index.ts +1 -1
- package/transactions/IUnitOfWork.ts +5 -5
- package/transactions/IUnitOfWorkManager.ts +1 -1
- package/transactions/UnitOfWork.spec.ts +6 -6
- package/transactions/UnitOfWork.ts +8 -8
- package/transactions/UnitOfWorkManager.ts +5 -5
- package/transactions/index.ts +5 -5
- package/types/TypeDiscoverer.ts +1 -1
- package/types/TypeIntrospector.ts +8 -3
- package/types/index.ts +5 -3
- package/types/propertyDecoratorMetadata.ts +80 -0
- package/types/standardDecoratorMetadata.spec.ts +31 -0
- package/types/standardDecoratorMetadata.ts +26 -0
- package/vitest.config.ts +17 -0
- package/webhooks/IWebhook.ts +1 -1
- package/webhooks/IWebhookDefinitionBuilder.ts +1 -1
- package/webhooks/IWebhooks.ts +3 -3
- package/webhooks/WebhookDefinitionBuilder.ts +6 -6
- package/webhooks/Webhooks.ts +12 -12
- package/webhooks/index.ts +9 -9
- package/webhooks/webhook.ts +3 -3
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor } from '@cratis/fundamentals';
|
|
5
|
-
import { ICompositeKeyBuilder } from './ICompositeKeyBuilder';
|
|
6
|
-
import { IAddBuilder } from './IAddBuilder';
|
|
7
|
-
import { IAddChildBuilder } from './IAddChildBuilder';
|
|
8
|
-
import { ISetBuilder } from './ISetBuilder';
|
|
9
|
-
import { ISubtractBuilder } from './ISubtractBuilder';
|
|
5
|
+
import { ICompositeKeyBuilder } from './ICompositeKeyBuilder.js';
|
|
6
|
+
import { IAddBuilder } from './IAddBuilder.js';
|
|
7
|
+
import { IAddChildBuilder } from './IAddChildBuilder.js';
|
|
8
|
+
import { ISetBuilder } from './ISetBuilder.js';
|
|
9
|
+
import { ISubtractBuilder } from './ISubtractBuilder.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Defines the common read model property mapping operations shared by from and join builders.
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
5
|
-
import { AddBuilder } from './AddBuilder';
|
|
6
|
-
import { AddChildBuilder, ChildAdditionEntry } from './AddChildBuilder';
|
|
7
|
-
import { CompositeKeyBuilder } from './CompositeKeyBuilder';
|
|
8
|
-
import { IAddBuilder } from './IAddBuilder';
|
|
9
|
-
import { IAddChildBuilder } from './IAddChildBuilder';
|
|
10
|
-
import { ICompositeKeyBuilder } from './ICompositeKeyBuilder';
|
|
11
|
-
import { IJoinBuilder } from './IJoinBuilder';
|
|
12
|
-
import { ISetBuilder } from './ISetBuilder';
|
|
13
|
-
import { ISubtractBuilder } from './ISubtractBuilder';
|
|
14
|
-
import { SetBuilder } from './SetBuilder';
|
|
15
|
-
import { SubtractBuilder } from './SubtractBuilder';
|
|
5
|
+
import { AddBuilder } from './AddBuilder.js';
|
|
6
|
+
import { AddChildBuilder, ChildAdditionEntry } from './AddChildBuilder.js';
|
|
7
|
+
import { CompositeKeyBuilder } from './CompositeKeyBuilder.js';
|
|
8
|
+
import { IAddBuilder } from './IAddBuilder.js';
|
|
9
|
+
import { IAddChildBuilder } from './IAddChildBuilder.js';
|
|
10
|
+
import { ICompositeKeyBuilder } from './ICompositeKeyBuilder.js';
|
|
11
|
+
import { IJoinBuilder } from './IJoinBuilder.js';
|
|
12
|
+
import { ISetBuilder } from './ISetBuilder.js';
|
|
13
|
+
import { ISubtractBuilder } from './ISubtractBuilder.js';
|
|
14
|
+
import { SetBuilder } from './SetBuilder.js';
|
|
15
|
+
import { SubtractBuilder } from './SubtractBuilder.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Accumulated property mapping for a join clause.
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
5
|
-
import { ChildrenDefinitionLike, ProjectionBuilderCore } from './ProjectionBuilderCore';
|
|
6
|
-
import { IChildrenBuilder } from './IChildrenBuilder';
|
|
7
|
-
import { INestedBuilder } from './INestedBuilder';
|
|
8
|
-
import { ChildrenBuilder } from './ChildrenBuilder';
|
|
5
|
+
import { ChildrenDefinitionLike, ProjectionBuilderCore } from './ProjectionBuilderCore.js';
|
|
6
|
+
import { IChildrenBuilder } from './IChildrenBuilder.js';
|
|
7
|
+
import { INestedBuilder } from './INestedBuilder.js';
|
|
8
|
+
import { ChildrenBuilder } from './ChildrenBuilder.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Concrete implementation of {@link INestedBuilder}, building the `ChildrenDefinition` for a
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { AutoMap } from '@cratis/chronicle.contracts';
|
|
5
|
-
import { getEventTypeFor } from '../../events/eventTypeDecorator';
|
|
6
|
-
import { FromBuilder } from './FromBuilder';
|
|
7
|
-
import { IFromBuilder } from './IFromBuilder';
|
|
8
|
-
import { IFromEveryBuilder } from './IFromEveryBuilder';
|
|
9
|
-
import { IJoinBuilder } from './IJoinBuilder';
|
|
10
|
-
import { IRemovedWithBuilder } from './IRemovedWithBuilder';
|
|
11
|
-
import { IRemovedWithJoinBuilder } from './IRemovedWithJoinBuilder';
|
|
12
|
-
import { JoinBuilder } from './JoinBuilder';
|
|
13
|
-
import { FromEveryBuilder } from './FromEveryBuilder';
|
|
14
|
-
import { RemovedWithBuilder } from './RemovedWithBuilder';
|
|
15
|
-
import { RemovedWithJoinBuilder } from './RemovedWithJoinBuilder';
|
|
16
|
-
import { ChildAdditionEntry } from './AddChildBuilder';
|
|
5
|
+
import { getEventTypeFor } from '../../events/eventTypeDecorator.js';
|
|
6
|
+
import { FromBuilder } from './FromBuilder.js';
|
|
7
|
+
import { IFromBuilder } from './IFromBuilder.js';
|
|
8
|
+
import { IFromEveryBuilder } from './IFromEveryBuilder.js';
|
|
9
|
+
import { IJoinBuilder } from './IJoinBuilder.js';
|
|
10
|
+
import { IRemovedWithBuilder } from './IRemovedWithBuilder.js';
|
|
11
|
+
import { IRemovedWithJoinBuilder } from './IRemovedWithJoinBuilder.js';
|
|
12
|
+
import { JoinBuilder } from './JoinBuilder.js';
|
|
13
|
+
import { FromEveryBuilder } from './FromEveryBuilder.js';
|
|
14
|
+
import { RemovedWithBuilder } from './RemovedWithBuilder.js';
|
|
15
|
+
import { RemovedWithJoinBuilder } from './RemovedWithJoinBuilder.js';
|
|
16
|
+
import { ChildAdditionEntry } from './AddChildBuilder.js';
|
|
17
17
|
|
|
18
18
|
/** The contract-level event type identifier shape used across projection definitions. */
|
|
19
19
|
export type ContractEventType = { Id: string; Generation: number; Tombstone: boolean };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
5
|
import { describe, expect, it } from 'vitest';
|
|
6
|
-
import { eventType } from '../../events/eventTypeDecorator';
|
|
7
|
-
import { ProjectionBuilderFor } from './ProjectionBuilderFor';
|
|
6
|
+
import { eventType } from '../../events/eventTypeDecorator.js';
|
|
7
|
+
import { ProjectionBuilderFor } from './ProjectionBuilderFor.js';
|
|
8
8
|
|
|
9
9
|
// Decorators are applied as plain function calls (rather than `@decorator` syntax) so these
|
|
10
10
|
// fixtures don't depend on the test runner's decorator-syntax support.
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
import { AutoMap } from '@cratis/chronicle.contracts';
|
|
5
5
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
6
|
-
import { EventSequenceId } from '../../eventSequences/EventSequenceId';
|
|
7
|
-
import { ChildrenBuilder } from './ChildrenBuilder';
|
|
8
|
-
import { IChildrenBuilder } from './IChildrenBuilder';
|
|
9
|
-
import { INestedBuilder } from './INestedBuilder';
|
|
10
|
-
import { IProjectionBuilderFor } from './IProjectionBuilderFor';
|
|
11
|
-
import { NestedBuilder } from './NestedBuilder';
|
|
12
|
-
import { ContractEventType, ProjectionBuilderCore } from './ProjectionBuilderCore';
|
|
6
|
+
import { EventSequenceId } from '../../eventSequences/EventSequenceId.js';
|
|
7
|
+
import { ChildrenBuilder } from './ChildrenBuilder.js';
|
|
8
|
+
import { IChildrenBuilder } from './IChildrenBuilder.js';
|
|
9
|
+
import { INestedBuilder } from './INestedBuilder.js';
|
|
10
|
+
import { IProjectionBuilderFor } from './IProjectionBuilderFor.js';
|
|
11
|
+
import { NestedBuilder } from './NestedBuilder.js';
|
|
12
|
+
import { ContractEventType, ProjectionBuilderCore } from './ProjectionBuilderCore.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Concrete implementation of {@link IProjectionBuilderFor} that accumulates projection
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
5
|
-
import { IRemovedWithBuilder } from './IRemovedWithBuilder';
|
|
5
|
+
import { IRemovedWithBuilder } from './IRemovedWithBuilder.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Accumulated removal configuration for a removedWith clause.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
5
|
-
import { IRemovedWithJoinBuilder } from './IRemovedWithJoinBuilder';
|
|
5
|
+
import { IRemovedWithJoinBuilder } from './IRemovedWithJoinBuilder.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Accumulated removal configuration for a removedWithJoin clause.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
5
|
-
import { ISetBuilder } from './ISetBuilder';
|
|
5
|
+
import { ISetBuilder } from './ISetBuilder.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Concrete implementation of {@link ISetBuilder} that records the property mapping
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import { PropertyAccessor, PropertyPathResolverProxyHandler } from '@cratis/fundamentals';
|
|
5
|
-
import { ISubtractBuilder } from './ISubtractBuilder';
|
|
5
|
+
import { ISubtractBuilder } from './ISubtractBuilder.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Concrete implementation of {@link ISubtractBuilder} that records a subtract expression
|
|
@@ -1,35 +1,35 @@
|
|
|
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
|
|
|
4
|
-
export { projection, getProjectionMetadata, isProjection } from './projection';
|
|
5
|
-
export type { ProjectionMetadata } from './projection';
|
|
6
|
-
export { ProjectionBuilderFor } from './ProjectionBuilderFor';
|
|
7
|
-
export { ProjectionBuilderCore } from './ProjectionBuilderCore';
|
|
8
|
-
export { ChildrenBuilder } from './ChildrenBuilder';
|
|
9
|
-
export { NestedBuilder } from './NestedBuilder';
|
|
10
|
-
export { AddChildBuilder } from './AddChildBuilder';
|
|
11
|
-
export type { ChildAdditionEntry } from './AddChildBuilder';
|
|
12
|
-
export { CompositeKeyBuilder } from './CompositeKeyBuilder';
|
|
13
|
-
export { FromBuilder } from './FromBuilder';
|
|
14
|
-
export { JoinBuilder } from './JoinBuilder';
|
|
15
|
-
export { SetBuilder } from './SetBuilder';
|
|
16
|
-
export { AddBuilder } from './AddBuilder';
|
|
17
|
-
export { SubtractBuilder } from './SubtractBuilder';
|
|
18
|
-
export { RemovedWithBuilder } from './RemovedWithBuilder';
|
|
19
|
-
export type { IProjectionFor } from './IProjectionFor';
|
|
20
|
-
export type { IProjectionBuilderFor } from './IProjectionBuilderFor';
|
|
21
|
-
export type { IProjectionBuilder } from './IProjectionBuilder';
|
|
22
|
-
export type { IFromBuilder } from './IFromBuilder';
|
|
23
|
-
export type { IJoinBuilder } from './IJoinBuilder';
|
|
24
|
-
export type { IFromEveryBuilder } from './IFromEveryBuilder';
|
|
25
|
-
export type { IReadModelPropertiesBuilder } from './IReadModelPropertiesBuilder';
|
|
26
|
-
export type { ICompositeKeyBuilder } from './ICompositeKeyBuilder';
|
|
27
|
-
export type { ISetBuilder } from './ISetBuilder';
|
|
28
|
-
export type { IAllSetBuilder } from './IAllSetBuilder';
|
|
29
|
-
export type { IAddBuilder } from './IAddBuilder';
|
|
30
|
-
export type { ISubtractBuilder } from './ISubtractBuilder';
|
|
31
|
-
export type { IAddChildBuilder } from './IAddChildBuilder';
|
|
32
|
-
export type { IChildrenBuilder } from './IChildrenBuilder';
|
|
33
|
-
export type { INestedBuilder } from './INestedBuilder';
|
|
34
|
-
export type { IRemovedWithBuilder } from './IRemovedWithBuilder';
|
|
35
|
-
export type { IRemovedWithJoinBuilder } from './IRemovedWithJoinBuilder';
|
|
4
|
+
export { projection, getProjectionMetadata, isProjection } from './projection.js';
|
|
5
|
+
export type { ProjectionMetadata } from './projection.js';
|
|
6
|
+
export { ProjectionBuilderFor } from './ProjectionBuilderFor.js';
|
|
7
|
+
export { ProjectionBuilderCore } from './ProjectionBuilderCore.js';
|
|
8
|
+
export { ChildrenBuilder } from './ChildrenBuilder.js';
|
|
9
|
+
export { NestedBuilder } from './NestedBuilder.js';
|
|
10
|
+
export { AddChildBuilder } from './AddChildBuilder.js';
|
|
11
|
+
export type { ChildAdditionEntry } from './AddChildBuilder.js';
|
|
12
|
+
export { CompositeKeyBuilder } from './CompositeKeyBuilder.js';
|
|
13
|
+
export { FromBuilder } from './FromBuilder.js';
|
|
14
|
+
export { JoinBuilder } from './JoinBuilder.js';
|
|
15
|
+
export { SetBuilder } from './SetBuilder.js';
|
|
16
|
+
export { AddBuilder } from './AddBuilder.js';
|
|
17
|
+
export { SubtractBuilder } from './SubtractBuilder.js';
|
|
18
|
+
export { RemovedWithBuilder } from './RemovedWithBuilder.js';
|
|
19
|
+
export type { IProjectionFor } from './IProjectionFor.js';
|
|
20
|
+
export type { IProjectionBuilderFor } from './IProjectionBuilderFor.js';
|
|
21
|
+
export type { IProjectionBuilder } from './IProjectionBuilder.js';
|
|
22
|
+
export type { IFromBuilder } from './IFromBuilder.js';
|
|
23
|
+
export type { IJoinBuilder } from './IJoinBuilder.js';
|
|
24
|
+
export type { IFromEveryBuilder } from './IFromEveryBuilder.js';
|
|
25
|
+
export type { IReadModelPropertiesBuilder } from './IReadModelPropertiesBuilder.js';
|
|
26
|
+
export type { ICompositeKeyBuilder } from './ICompositeKeyBuilder.js';
|
|
27
|
+
export type { ISetBuilder } from './ISetBuilder.js';
|
|
28
|
+
export type { IAllSetBuilder } from './IAllSetBuilder.js';
|
|
29
|
+
export type { IAddBuilder } from './IAddBuilder.js';
|
|
30
|
+
export type { ISubtractBuilder } from './ISubtractBuilder.js';
|
|
31
|
+
export type { IAddChildBuilder } from './IAddChildBuilder.js';
|
|
32
|
+
export type { IChildrenBuilder } from './IChildrenBuilder.js';
|
|
33
|
+
export type { INestedBuilder } from './INestedBuilder.js';
|
|
34
|
+
export type { IRemovedWithBuilder } from './IRemovedWithBuilder.js';
|
|
35
|
+
export type { IRemovedWithJoinBuilder } from './IRemovedWithJoinBuilder.js';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
5
|
import { Constructor } from '@cratis/fundamentals';
|
|
6
|
-
import { ProjectionId } from '../ProjectionId';
|
|
7
|
-
import { DecoratorType, TypeDiscoverer } from '../../types';
|
|
6
|
+
import { ProjectionId } from '../ProjectionId.js';
|
|
7
|
+
import { DecoratorType, TypeDiscoverer } from '../../types/index.js';
|
|
8
8
|
|
|
9
9
|
/** Metadata key used to store declarative projection information on a class. */
|
|
10
10
|
const PROJECTION_METADATA_KEY = 'chronicle:projection';
|
package/projections/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
|
|
|
4
|
-
export { ProjectionId } from './ProjectionId';
|
|
5
|
-
export type { IProjections } from './IProjections';
|
|
6
|
-
export { Projections } from './Projections';
|
|
7
|
-
export type { ProjectionState } from './ProjectionState';
|
|
8
|
-
export type { ProjectionQueryResult } from './ProjectionQueryResult';
|
|
9
|
-
export { UnableToQueryProjection } from './UnableToQueryProjection';
|
|
10
|
-
export { VariantMustDeclareEntersOnEvent } from './VariantMustDeclareEntersOnEvent';
|
|
11
|
-
export { GlobalHandlerPropertyNotOnVariant } from './GlobalHandlerPropertyNotOnVariant';
|
|
12
|
-
export * from './declarative';
|
|
13
|
-
export * from './modelBound';
|
|
4
|
+
export { ProjectionId } from './ProjectionId.js';
|
|
5
|
+
export type { IProjections } from './IProjections.js';
|
|
6
|
+
export { Projections } from './Projections.js';
|
|
7
|
+
export type { ProjectionState } from './ProjectionState.js';
|
|
8
|
+
export type { ProjectionQueryResult } from './ProjectionQueryResult.js';
|
|
9
|
+
export { UnableToQueryProjection } from './UnableToQueryProjection.js';
|
|
10
|
+
export { VariantMustDeclareEntersOnEvent } from './VariantMustDeclareEntersOnEvent.js';
|
|
11
|
+
export { GlobalHandlerPropertyNotOnVariant } from './GlobalHandlerPropertyNotOnVariant.js';
|
|
12
|
+
export * from './declarative/index.js';
|
|
13
|
+
export * from './modelBound/index.js';
|
|
@@ -1,7 +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
|
|
|
4
|
-
import { FromEventOptions } from './FromEventOptions';
|
|
4
|
+
import { FromEventOptions } from './FromEventOptions.js';
|
|
5
5
|
|
|
6
6
|
/** Metadata stored by the fromEvent decorator on a class. */
|
|
7
7
|
export interface FromEventMetadata extends FromEventOptions {
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { TypeIntrospector } from '../../types';
|
|
5
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
6
|
+
import { ChroniclePropertyDecorator, decorateProperty, getPropertyMetadata } from '../../types/propertyDecoratorMetadata.js';
|
|
6
7
|
|
|
7
8
|
/** Metadata stored by the addFrom property decorator. */
|
|
8
9
|
export interface AddFromMetadata {
|
|
@@ -20,14 +21,14 @@ const METADATA_KEY = 'chronicle:projection:addFrom';
|
|
|
20
21
|
* @param eventPropertyName - Optional event property name. Defaults to the property name.
|
|
21
22
|
* @returns A property decorator.
|
|
22
23
|
*/
|
|
23
|
-
export function addFrom(eventType: Function, eventPropertyName?: string):
|
|
24
|
-
return (target: object, propertyKey: string | symbol) => {
|
|
24
|
+
export function addFrom(eventType: Function, eventPropertyName?: string): ChroniclePropertyDecorator {
|
|
25
|
+
return decorateProperty((target: object, propertyKey: string | symbol) => {
|
|
25
26
|
const key = propertyKey.toString();
|
|
26
27
|
TypeIntrospector.trackProperty((target as { constructor: Function }).constructor, key);
|
|
27
28
|
const existing: AddFromMetadata[] = Reflect.getMetadata(METADATA_KEY, target, key) ?? [];
|
|
28
29
|
const metadata: AddFromMetadata = { eventType, eventPropertyName };
|
|
29
30
|
Reflect.defineMetadata(METADATA_KEY, [...existing, metadata], target, key);
|
|
30
|
-
};
|
|
31
|
+
});
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -37,5 +38,5 @@ export function addFrom(eventType: Function, eventPropertyName?: string): Proper
|
|
|
37
38
|
* @returns An array of addFrom metadata entries.
|
|
38
39
|
*/
|
|
39
40
|
export function getAddFromMetadata(target: object, propertyKey: string): AddFromMetadata[] {
|
|
40
|
-
return
|
|
41
|
+
return getPropertyMetadata<AddFromMetadata[]>(METADATA_KEY, target, propertyKey) ?? [];
|
|
41
42
|
}
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
5
|
import { AutoMap } from '@cratis/chronicle.contracts';
|
|
6
6
|
import { Constructor, Fields } from '@cratis/fundamentals';
|
|
7
|
-
import { TypeIntrospector } from '../../types';
|
|
8
|
-
import { getEventTypeFor } from '../../events/eventTypeDecorator';
|
|
9
|
-
import { getAddFromMetadata } from './addFrom';
|
|
10
|
-
import { ChildrenFromMetadata, getChildrenFromMetadata } from './childrenFrom';
|
|
11
|
-
import { getClearWithClassMetadata, getClearWithPropertyMetadata } from './clearWith';
|
|
12
|
-
import { getCountMetadata } from './count';
|
|
13
|
-
import { getDecrementMetadata } from './decrement';
|
|
14
|
-
import { getFromEventMetadata } from './fromEvent';
|
|
15
|
-
import { getIncrementMetadata } from './increment';
|
|
16
|
-
import { isNested } from './nested';
|
|
17
|
-
import { getRemovedWithClassMetadata, getRemovedWithPropertyMetadata } from './removedWith';
|
|
18
|
-
import { getRemovedWithJoinClassMetadata, getRemovedWithJoinPropertyMetadata } from './removedWithJoin';
|
|
19
|
-
import { getSetFromMetadata } from './setFrom';
|
|
20
|
-
import { getSetFromContextMetadata } from './setFromContext';
|
|
21
|
-
import { getSetValueMetadata } from './setValue';
|
|
22
|
-
import { getSubtractFromMetadata } from './subtractFrom';
|
|
7
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
8
|
+
import { getEventTypeFor } from '../../events/eventTypeDecorator.js';
|
|
9
|
+
import { getAddFromMetadata } from './addFrom.js';
|
|
10
|
+
import { ChildrenFromMetadata, getChildrenFromMetadata } from './childrenFrom.js';
|
|
11
|
+
import { getClearWithClassMetadata, getClearWithPropertyMetadata } from './clearWith.js';
|
|
12
|
+
import { getCountMetadata } from './count.js';
|
|
13
|
+
import { getDecrementMetadata } from './decrement.js';
|
|
14
|
+
import { getFromEventMetadata } from './fromEvent.js';
|
|
15
|
+
import { getIncrementMetadata } from './increment.js';
|
|
16
|
+
import { isNested } from './nested.js';
|
|
17
|
+
import { getRemovedWithClassMetadata, getRemovedWithPropertyMetadata } from './removedWith.js';
|
|
18
|
+
import { getRemovedWithJoinClassMetadata, getRemovedWithJoinPropertyMetadata } from './removedWithJoin.js';
|
|
19
|
+
import { getSetFromMetadata } from './setFrom.js';
|
|
20
|
+
import { getSetFromContextMetadata } from './setFromContext.js';
|
|
21
|
+
import { getSetValueMetadata } from './setValue.js';
|
|
22
|
+
import { getSubtractFromMetadata } from './subtractFrom.js';
|
|
23
23
|
|
|
24
24
|
/** The contract-level event type identifier shape used across projection definitions. */
|
|
25
25
|
export type ContractEventType = { Id: string; Generation: number; Tombstone: boolean };
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { TypeIntrospector } from '../../types';
|
|
5
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
6
|
+
import { ChroniclePropertyDecorator, decorateProperty, getPropertyMetadata } from '../../types/propertyDecoratorMetadata.js';
|
|
6
7
|
|
|
7
8
|
/** Metadata stored by the childrenFrom property decorator. */
|
|
8
9
|
export interface ChildrenFromMetadata {
|
|
@@ -31,14 +32,14 @@ export function childrenFrom(
|
|
|
31
32
|
key?: string,
|
|
32
33
|
identifiedBy?: string,
|
|
33
34
|
parentKey?: string
|
|
34
|
-
):
|
|
35
|
-
return (target: object, propertyKey: string | symbol) => {
|
|
35
|
+
): ChroniclePropertyDecorator {
|
|
36
|
+
return decorateProperty((target: object, propertyKey: string | symbol) => {
|
|
36
37
|
const propKey = propertyKey.toString();
|
|
37
38
|
TypeIntrospector.trackProperty((target as { constructor: Function }).constructor, propKey);
|
|
38
39
|
const existing: ChildrenFromMetadata[] = Reflect.getMetadata(METADATA_KEY, target, propKey) ?? [];
|
|
39
40
|
const metadata: ChildrenFromMetadata = { eventType, key, identifiedBy, parentKey };
|
|
40
41
|
Reflect.defineMetadata(METADATA_KEY, [...existing, metadata], target, propKey);
|
|
41
|
-
};
|
|
42
|
+
});
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
/**
|
|
@@ -48,5 +49,5 @@ export function childrenFrom(
|
|
|
48
49
|
* @returns An array of childrenFrom metadata entries.
|
|
49
50
|
*/
|
|
50
51
|
export function getChildrenFromMetadata(target: object, propertyKey: string): ChildrenFromMetadata[] {
|
|
51
|
-
return
|
|
52
|
+
return getPropertyMetadata<ChildrenFromMetadata[]>(METADATA_KEY, target, propertyKey) ?? [];
|
|
52
53
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { TypeIntrospector } from '../../types';
|
|
5
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
6
|
+
import { ChronicleClassOrPropertyDecorator, decorateClassOrProperty, getPropertyMetadata } from '../../types/propertyDecoratorMetadata.js';
|
|
6
7
|
|
|
7
8
|
/** Metadata stored by the clearWith class or property decorator. */
|
|
8
9
|
export interface ClearWithMetadata {
|
|
@@ -20,8 +21,8 @@ const PROPERTY_METADATA_KEY = 'chronicle:projection:clearWith:property';
|
|
|
20
21
|
* @param eventType - The event constructor.
|
|
21
22
|
* @returns A class and property decorator.
|
|
22
23
|
*/
|
|
23
|
-
export function clearWith(eventType: Function):
|
|
24
|
-
return (target: object, propertyKey?: string | symbol) => {
|
|
24
|
+
export function clearWith(eventType: Function): ChronicleClassOrPropertyDecorator {
|
|
25
|
+
return decorateClassOrProperty((target: object, propertyKey?: string | symbol) => {
|
|
25
26
|
if (propertyKey !== undefined) {
|
|
26
27
|
const key = propertyKey.toString();
|
|
27
28
|
TypeIntrospector.trackProperty((target as { constructor: Function }).constructor, key);
|
|
@@ -31,7 +32,7 @@ export function clearWith(eventType: Function): ClassDecorator & PropertyDecorat
|
|
|
31
32
|
const existing: ClearWithMetadata[] = Reflect.getMetadata(CLASS_METADATA_KEY, target) ?? [];
|
|
32
33
|
Reflect.defineMetadata(CLASS_METADATA_KEY, [...existing, { eventType }], target);
|
|
33
34
|
}
|
|
34
|
-
};
|
|
35
|
+
});
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -50,5 +51,5 @@ export function getClearWithClassMetadata(target: Function): ClearWithMetadata[]
|
|
|
50
51
|
* @returns An array of clearWith metadata entries.
|
|
51
52
|
*/
|
|
52
53
|
export function getClearWithPropertyMetadata(target: object, propertyKey: string): ClearWithMetadata[] {
|
|
53
|
-
return
|
|
54
|
+
return getPropertyMetadata<ClearWithMetadata[]>(PROPERTY_METADATA_KEY, target, propertyKey) ?? [];
|
|
54
55
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { TypeIntrospector } from '../../types';
|
|
5
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
6
|
+
import { ChroniclePropertyDecorator, decorateProperty, getPropertyMetadata } from '../../types/propertyDecoratorMetadata.js';
|
|
6
7
|
|
|
7
8
|
/** Metadata stored by the count property decorator. */
|
|
8
9
|
export interface CountMetadata {
|
|
@@ -20,14 +21,14 @@ const METADATA_KEY = 'chronicle:projection:count';
|
|
|
20
21
|
* @param constantKey - Optional constant key value.
|
|
21
22
|
* @returns A property decorator.
|
|
22
23
|
*/
|
|
23
|
-
export function count(eventType: Function, constantKey?: string):
|
|
24
|
-
return (target: object, propertyKey: string | symbol) => {
|
|
24
|
+
export function count(eventType: Function, constantKey?: string): ChroniclePropertyDecorator {
|
|
25
|
+
return decorateProperty((target: object, propertyKey: string | symbol) => {
|
|
25
26
|
const key = propertyKey.toString();
|
|
26
27
|
TypeIntrospector.trackProperty((target as { constructor: Function }).constructor, key);
|
|
27
28
|
const existing: CountMetadata[] = Reflect.getMetadata(METADATA_KEY, target, key) ?? [];
|
|
28
29
|
const metadata: CountMetadata = { eventType, constantKey };
|
|
29
30
|
Reflect.defineMetadata(METADATA_KEY, [...existing, metadata], target, key);
|
|
30
|
-
};
|
|
31
|
+
});
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -37,5 +38,5 @@ export function count(eventType: Function, constantKey?: string): PropertyDecora
|
|
|
37
38
|
* @returns An array of count metadata entries.
|
|
38
39
|
*/
|
|
39
40
|
export function getCountMetadata(target: object, propertyKey: string): CountMetadata[] {
|
|
40
|
-
return
|
|
41
|
+
return getPropertyMetadata<CountMetadata[]>(METADATA_KEY, target, propertyKey) ?? [];
|
|
41
42
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
import { describe, expect, it } from 'vitest';
|
|
5
|
+
import { addFrom, getAddFromMetadata } from './addFrom.js';
|
|
6
|
+
import { childrenFrom, getChildrenFromMetadata } from './childrenFrom.js';
|
|
7
|
+
import { clearWith, getClearWithPropertyMetadata } from './clearWith.js';
|
|
8
|
+
import { count, getCountMetadata } from './count.js';
|
|
9
|
+
import { decrement, getDecrementMetadata } from './decrement.js';
|
|
10
|
+
import { fromAll, getFromAllMetadata } from './fromAll.js';
|
|
11
|
+
import { fromEvery, getFromEveryMetadata } from './fromEvery.js';
|
|
12
|
+
import { increment, getIncrementMetadata } from './increment.js';
|
|
13
|
+
import { join, getJoinMetadata } from './join.js';
|
|
14
|
+
import { isNested, nested } from './nested.js';
|
|
15
|
+
import { isNoAutoMap, isPropertyNoAutoMap, noAutoMap } from './noAutoMap.js';
|
|
16
|
+
import { getRemovedWithPropertyMetadata, removedWith } from './removedWith.js';
|
|
17
|
+
import { getRemovedWithJoinPropertyMetadata, removedWithJoin } from './removedWithJoin.js';
|
|
18
|
+
import { getSetFromContextMetadata, setFromContext } from './setFromContext.js';
|
|
19
|
+
import { getSetFromMetadata, setFrom } from './setFrom.js';
|
|
20
|
+
import { getSetValueMetadata, setValue } from './setValue.js';
|
|
21
|
+
import { getSubtractFromMetadata, subtractFrom } from './subtractFrom.js';
|
|
22
|
+
import { getTrackedJsonSchemaProperties, jsonSchemaProperty } from '../../schemas/jsonSchemaProperty.js';
|
|
23
|
+
|
|
24
|
+
class Changed {}
|
|
25
|
+
|
|
26
|
+
@noAutoMap
|
|
27
|
+
class Mappings {
|
|
28
|
+
@addFrom(Changed) added!: number;
|
|
29
|
+
@childrenFrom(Changed) children!: object[];
|
|
30
|
+
@clearWith(Changed) cleared!: string;
|
|
31
|
+
@count(Changed) counted!: number;
|
|
32
|
+
@decrement(Changed) decremented!: number;
|
|
33
|
+
@fromAll() all!: string;
|
|
34
|
+
@fromEvery() every!: string;
|
|
35
|
+
@increment(Changed) incremented!: number;
|
|
36
|
+
@join(Changed) joined!: string;
|
|
37
|
+
@nested nestedValue!: object;
|
|
38
|
+
@noAutoMap excluded!: string;
|
|
39
|
+
@removedWith(Changed) removed!: string;
|
|
40
|
+
@removedWithJoin(Changed) removedJoin!: string;
|
|
41
|
+
@setFromContext(Changed) contextValue!: string;
|
|
42
|
+
@setFrom(Changed) set!: string;
|
|
43
|
+
@setValue(Changed, 'fixed') constant!: string;
|
|
44
|
+
@subtractFrom(Changed) subtracted!: number;
|
|
45
|
+
@jsonSchemaProperty() tracked!: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
describe('standard model-bound decorators', () => {
|
|
49
|
+
it('stores class and property annotations without constructing an instance', () => {
|
|
50
|
+
const target = Mappings.prototype;
|
|
51
|
+
expect(isNoAutoMap(Mappings)).toBe(true);
|
|
52
|
+
expect(isPropertyNoAutoMap(target, 'excluded')).toBe(true);
|
|
53
|
+
expect(isNested(target, 'nestedValue')).toBe(true);
|
|
54
|
+
expect(getAddFromMetadata(target, 'added')).toHaveLength(1);
|
|
55
|
+
expect(getChildrenFromMetadata(target, 'children')).toHaveLength(1);
|
|
56
|
+
expect(getClearWithPropertyMetadata(target, 'cleared')).toHaveLength(1);
|
|
57
|
+
expect(getCountMetadata(target, 'counted')).toHaveLength(1);
|
|
58
|
+
expect(getDecrementMetadata(target, 'decremented')).toHaveLength(1);
|
|
59
|
+
expect(getFromAllMetadata(target, 'all')).toEqual({ property: undefined, contextProperty: undefined });
|
|
60
|
+
expect(getFromEveryMetadata(target, 'every')).toEqual({ property: undefined, contextProperty: undefined });
|
|
61
|
+
expect(getIncrementMetadata(target, 'incremented')).toHaveLength(1);
|
|
62
|
+
expect(getJoinMetadata(target, 'joined')).toHaveLength(1);
|
|
63
|
+
expect(getRemovedWithPropertyMetadata(target, 'removed')).toHaveLength(1);
|
|
64
|
+
expect(getRemovedWithJoinPropertyMetadata(target, 'removedJoin')).toHaveLength(1);
|
|
65
|
+
expect(getSetFromContextMetadata(target, 'contextValue')).toHaveLength(1);
|
|
66
|
+
expect(getSetFromMetadata(target, 'set')).toHaveLength(1);
|
|
67
|
+
expect(getSetValueMetadata(target, 'constant')).toEqual([{ eventType: Changed, value: 'fixed' }]);
|
|
68
|
+
expect(getSubtractFromMetadata(target, 'subtracted')).toHaveLength(1);
|
|
69
|
+
expect(getTrackedJsonSchemaProperties(Mappings)).toContain('tracked');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { TypeIntrospector } from '../../types';
|
|
5
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
6
|
+
import { ChroniclePropertyDecorator, decorateProperty, getPropertyMetadata } from '../../types/propertyDecoratorMetadata.js';
|
|
6
7
|
|
|
7
8
|
/** Metadata stored by the decrement property decorator. */
|
|
8
9
|
export interface DecrementMetadata {
|
|
@@ -20,14 +21,14 @@ const METADATA_KEY = 'chronicle:projection:decrement';
|
|
|
20
21
|
* @param constantKey - Optional constant key value.
|
|
21
22
|
* @returns A property decorator.
|
|
22
23
|
*/
|
|
23
|
-
export function decrement(eventType: Function, constantKey?: string):
|
|
24
|
-
return (target: object, propertyKey: string | symbol) => {
|
|
24
|
+
export function decrement(eventType: Function, constantKey?: string): ChroniclePropertyDecorator {
|
|
25
|
+
return decorateProperty((target: object, propertyKey: string | symbol) => {
|
|
25
26
|
const key = propertyKey.toString();
|
|
26
27
|
TypeIntrospector.trackProperty((target as { constructor: Function }).constructor, key);
|
|
27
28
|
const existing: DecrementMetadata[] = Reflect.getMetadata(METADATA_KEY, target, key) ?? [];
|
|
28
29
|
const metadata: DecrementMetadata = { eventType, constantKey };
|
|
29
30
|
Reflect.defineMetadata(METADATA_KEY, [...existing, metadata], target, key);
|
|
30
|
-
};
|
|
31
|
+
});
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
/**
|
|
@@ -37,5 +38,5 @@ export function decrement(eventType: Function, constantKey?: string): PropertyDe
|
|
|
37
38
|
* @returns An array of decrement metadata entries.
|
|
38
39
|
*/
|
|
39
40
|
export function getDecrementMetadata(target: object, propertyKey: string): DecrementMetadata[] {
|
|
40
|
-
return
|
|
41
|
+
return getPropertyMetadata<DecrementMetadata[]>(METADATA_KEY, target, propertyKey) ?? [];
|
|
41
42
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { EventSequenceId } from '../../eventSequences/EventSequenceId';
|
|
5
|
+
import { EventSequenceId } from '../../eventSequences/EventSequenceId.js';
|
|
6
6
|
|
|
7
7
|
const METADATA_KEY = 'chronicle:projection:eventSequence';
|
|
8
8
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
3
|
|
|
4
4
|
import 'reflect-metadata';
|
|
5
|
-
import { TypeIntrospector } from '../../types';
|
|
5
|
+
import { TypeIntrospector } from '../../types/index.js';
|
|
6
|
+
import { ChroniclePropertyDecorator, decorateProperty, getPropertyMetadata } from '../../types/propertyDecoratorMetadata.js';
|
|
6
7
|
|
|
7
8
|
/** Metadata stored by the fromAll property decorator. */
|
|
8
9
|
export interface FromAllMetadata {
|
|
@@ -23,12 +24,12 @@ const METADATA_KEY = 'chronicle:projection:fromAll';
|
|
|
23
24
|
* @param contextProperty - Optional event context property name.
|
|
24
25
|
* @returns A property decorator.
|
|
25
26
|
*/
|
|
26
|
-
export function fromAll(property?: string, contextProperty?: string):
|
|
27
|
-
return (target: object, propertyKey: string | symbol) => {
|
|
27
|
+
export function fromAll(property?: string, contextProperty?: string): ChroniclePropertyDecorator {
|
|
28
|
+
return decorateProperty((target: object, propertyKey: string | symbol) => {
|
|
28
29
|
TypeIntrospector.trackProperty((target as { constructor: Function }).constructor, propertyKey.toString());
|
|
29
30
|
const metadata: FromAllMetadata = { property, contextProperty };
|
|
30
31
|
Reflect.defineMetadata(METADATA_KEY, metadata, target, propertyKey.toString());
|
|
31
|
-
};
|
|
32
|
+
});
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
/**
|
|
@@ -38,5 +39,5 @@ export function fromAll(property?: string, contextProperty?: string): PropertyDe
|
|
|
38
39
|
* @returns The fromAll metadata, or undefined if not decorated.
|
|
39
40
|
*/
|
|
40
41
|
export function getFromAllMetadata(target: object, propertyKey: string): FromAllMetadata | undefined {
|
|
41
|
-
return
|
|
42
|
+
return getPropertyMetadata<FromAllMetadata>(METADATA_KEY, target, propertyKey);
|
|
42
43
|
}
|