@cratis/chronicle 6.17.0 → 6.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/projections/declarative/AddChildBuilder.d.ts +13 -2
  2. package/dist/projections/declarative/AddChildBuilder.d.ts.map +1 -1
  3. package/dist/projections/declarative/AddChildBuilder.js +27 -1
  4. package/dist/projections/declarative/AddChildBuilder.js.map +1 -1
  5. package/dist/projections/declarative/FromBuilder.d.ts +4 -0
  6. package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
  7. package/dist/projections/declarative/FromBuilder.js +1 -2
  8. package/dist/projections/declarative/FromBuilder.js.map +1 -1
  9. package/dist/projections/declarative/IAddChildBuilder.d.ts +12 -0
  10. package/dist/projections/declarative/IAddChildBuilder.d.ts.map +1 -1
  11. package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts +16 -1
  12. package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts.map +1 -1
  13. package/dist/projections/declarative/JoinBuilder.d.ts +4 -0
  14. package/dist/projections/declarative/JoinBuilder.d.ts.map +1 -1
  15. package/dist/projections/declarative/JoinBuilder.js +1 -2
  16. package/dist/projections/declarative/JoinBuilder.js.map +1 -1
  17. package/dist/projections/declarative/ProjectionBuilderCore.js +1 -1
  18. package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -1
  19. package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -1
  20. package/dist/projections/modelBound/childrenAndNestedBuilder.js +41 -10
  21. package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -1
  22. package/dist/testing/IReadModelProcessor.d.ts +7 -0
  23. package/dist/testing/IReadModelProcessor.d.ts.map +1 -0
  24. package/dist/testing/IReadModelProcessor.js +4 -0
  25. package/dist/testing/IReadModelProcessor.js.map +1 -0
  26. package/dist/testing/ReadModelScenario.d.ts +6 -8
  27. package/dist/testing/ReadModelScenario.d.ts.map +1 -1
  28. package/dist/testing/ReadModelScenario.js +50 -50
  29. package/dist/testing/ReadModelScenario.js.map +1 -1
  30. package/dist/testing/ReadModelState.d.ts +6 -0
  31. package/dist/testing/ReadModelState.d.ts.map +1 -0
  32. package/dist/testing/ReadModelState.js +4 -0
  33. package/dist/testing/ReadModelState.js.map +1 -0
  34. package/dist/testing/ReducerReadModelProcessor.d.ts +13 -0
  35. package/dist/testing/ReducerReadModelProcessor.d.ts.map +1 -0
  36. package/dist/testing/ReducerReadModelProcessor.js +38 -0
  37. package/dist/testing/ReducerReadModelProcessor.js.map +1 -0
  38. package/dist/testing/ScenarioEvent.d.ts +8 -0
  39. package/dist/testing/ScenarioEvent.d.ts.map +1 -0
  40. package/dist/testing/ScenarioEvent.js +4 -0
  41. package/dist/testing/ScenarioEvent.js.map +1 -0
  42. package/dist/testing/index.d.ts +1 -0
  43. package/dist/testing/index.d.ts.map +1 -1
  44. package/dist/testing/index.js +1 -0
  45. package/dist/testing/index.js.map +1 -1
  46. package/dist/testing/projections/ProjectionCapabilities.d.ts +3 -0
  47. package/dist/testing/projections/ProjectionCapabilities.d.ts.map +1 -1
  48. package/dist/testing/projections/ProjectionCapabilities.js +117 -43
  49. package/dist/testing/projections/ProjectionCapabilities.js.map +1 -1
  50. package/dist/testing/projections/ProjectionExpressionEvaluator.d.ts +9 -0
  51. package/dist/testing/projections/ProjectionExpressionEvaluator.d.ts.map +1 -0
  52. package/dist/testing/projections/ProjectionExpressionEvaluator.js +68 -0
  53. package/dist/testing/projections/ProjectionExpressionEvaluator.js.map +1 -0
  54. package/dist/testing/projections/ProjectionReadModelProcessor.d.ts +30 -0
  55. package/dist/testing/projections/ProjectionReadModelProcessor.d.ts.map +1 -0
  56. package/dist/testing/projections/ProjectionReadModelProcessor.js +142 -0
  57. package/dist/testing/projections/ProjectionReadModelProcessor.js.map +1 -0
  58. package/dist/testing/projections/ProjectionValueConverter.d.ts +13 -0
  59. package/dist/testing/projections/ProjectionValueConverter.d.ts.map +1 -0
  60. package/dist/testing/projections/ProjectionValueConverter.js +122 -0
  61. package/dist/testing/projections/ProjectionValueConverter.js.map +1 -0
  62. package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.d.ts +0 -2
  63. package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.d.ts.map +1 -1
  64. package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.js +0 -4
  65. package/dist/testing/projections/for_ProjectionCapabilities/given/Changed.js.map +1 -1
  66. package/dist/tsconfig.tsbuildinfo +1 -1
  67. package/package.json +2 -2
  68. package/projections/ProjectionDefinitionCompiler.registration.spec.ts +4 -2
  69. package/projections/Projections.childrenAndNested.spec.ts +250 -1
  70. package/projections/declarative/AddChildBuilder.ts +33 -2
  71. package/projections/declarative/FromBuilder.ts +9 -1
  72. package/projections/declarative/IAddChildBuilder.ts +14 -0
  73. package/projections/declarative/IReadModelPropertiesBuilder.ts +18 -1
  74. package/projections/declarative/JoinBuilder.ts +9 -1
  75. package/projections/declarative/ProjectionBuilderCore.ts +1 -1
  76. package/projections/declarative/addChildCompatibility.standard.spec.ts +80 -0
  77. package/projections/eventContextExpressions.spec.ts +20 -0
  78. package/projections/modelBound/childrenAndNestedBuilder.ts +45 -11
  79. package/testing/IReadModelProcessor.ts +10 -0
  80. package/testing/ReadModelScenario.spec.ts +156 -10
  81. package/testing/ReadModelScenario.ts +57 -57
  82. package/testing/ReadModelState.ts +5 -0
  83. package/testing/ReducerReadModelProcessor.ts +39 -0
  84. package/testing/ScenarioEvent.ts +7 -0
  85. package/testing/index.ts +1 -0
  86. package/testing/projections/ProjectionCapabilities.ts +100 -39
  87. package/testing/projections/ProjectionExpressionEvaluator.ts +57 -0
  88. package/testing/projections/ProjectionReadModelProcessor.fixtures.spec.ts +135 -0
  89. package/testing/projections/ProjectionReadModelProcessor.ts +147 -0
  90. package/testing/projections/ProjectionValueConverter.spec.ts +81 -0
  91. package/testing/projections/ProjectionValueConverter.ts +113 -0
  92. package/testing/projections/for_ProjectionCapabilities/given/Changed.ts +1 -3
  93. package/testing/projections/for_ProjectionCapabilities/when_rejecting_unsupported_operations.spec.ts +81 -1
  94. package/testing/projections/for_ProjectionCapabilities/when_validating_numeric_schemas.spec.ts +40 -12
  95. package/testing/projections/for_ProjectionCapabilities/when_validating_schema_boundaries.spec.ts +76 -29
  96. package/testing/projections/for_ProjectionCapabilities/when_validating_supported_operations.spec.ts +8 -35
@@ -1 +1 @@
1
- {"version":"7.0.2","root":["../ChronicleClient.ts","../ChronicleOptions.ts","../EventStore.ts","../EventStoreName.ts","../EventStoreNamespaceName.ts","../IChronicleClient.ts","../IEventStore.ts","../Metrics.ts","../Tracing.ts","../index.ts","../artifacts/ActivatedArtifact.ts","../artifacts/ArtifactActivationContext.ts","../artifacts/ArtifactCompletionFailed.ts","../artifacts/ArtifactDelivery.ts","../artifacts/ArtifactInvocationContext.ts","../artifacts/ArtifactKind.ts","../artifacts/ClientArtifactsActivator.ts","../artifacts/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../artifacts/validateArtifactSchemas.ts","../artifacts/withActivatedArtifact.ts","../auditing/Causation.ts","../auditing/CausationManager.ts","../auditing/CausationType.ts","../auditing/ICausationManager.ts","../auditing/index.ts","../compliance/ComplianceContracts.ts","../compliance/ComplianceMetadata.ts","../compliance/ComplianceMetadataResolver.ts","../compliance/ComplianceMetadataType.ts","../compliance/IPIIManager.ts","../compliance/PIIManager.ts","../compliance/PIINotSupportedOnEventSourceId.ts","../compliance/index.ts","../compliance/pii.ts","../compliance/subject.ts","../confidentiality/EncryptedNotSupportedOnEventSourceId.ts","../confidentiality/EncryptionScope.ts","../confidentiality/PIIAndEncryptedCombinedNotSupported.ts","../confidentiality/SecurityMetadata.ts","../confidentiality/SecurityMetadataResolver.ts","../confidentiality/SecurityMetadataType.ts","../confidentiality/encrypted.ts","../confidentiality/index.ts","../connection/ChronicleConnection.ts","../connection/ChronicleConnectionString.ts","../connection/ChronicleServerAddressResolver.ts","../connection/ChronicleServices.ts","../connection/ChronicleSrvResolutionError.ts","../connection/ChronicleSrvResolver.ts","../connection/CompatibilityPreflight.ts","../connection/ConnectionLifecycle.ts","../connection/DateTimeOffset.ts","../connection/Guid.ts","../connection/ILoadBalancerStrategy.ts","../connection/IncompatibleChronicleServer.ts","../connection/KernelKeepAlive.ts","../connection/LeastConnectionsLoadBalancerStrategy.ts","../connection/LoadBalancerMode.ts","../connection/LoadBalancerStrategyFactory.ts","../connection/RandomLoadBalancerStrategy.ts","../connection/RejectedChronicleCredentials.ts","../connection/RoundRobinLoadBalancerStrategy.ts","../connection/TokenProvider.ts","../connection/callResults.ts","../connection/clientVersion.ts","../connection/fetchOAuthAccessToken.ts","../connection/formatServerAddress.ts","../connection/index.ts","../correlation/CorrelationId.ts","../correlation/CorrelationIdManager.ts","../correlation/ICorrelationIdAccessor.ts","../correlation/ICorrelationIdSetter.ts","../correlation/index.ts","../eventSequences/AppendError.ts","../eventSequences/AppendOperationsBroadcaster.ts","../eventSequences/AppendOptions.ts","../eventSequences/AppendResult.ts","../eventSequences/AppendedEventWithResult.ts","../eventSequences/CompleteStreamError.ts","../eventSequences/CompleteStreamResult.ts","../eventSequences/ConcurrencyScope.ts","../eventSequences/ConcurrencyViolation.ts","../eventSequences/ConstraintViolation.ts","../eventSequences/EventForEventSourceId.ts","../eventSequences/EventLog.ts","../eventSequences/EventSequence.ts","../eventSequences/EventSequenceId.ts","../eventSequences/EventSequenceNumber.ts","../eventSequences/IEventLog.ts","../eventSequences/IEventSequence.ts","../eventSequences/ITransactionalEventSequence.ts","../eventSequences/TransactionalEventSequence.ts","../eventSequences/WaitForCompletionOptions.ts","../eventSequences/WaitForCompletionResult.ts","../eventSequences/index.ts","../eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts","../eventStoreSubscriptions/EventStoreSubscriptionId.ts","../eventStoreSubscriptions/EventStoreSubscriptions.ts","../eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/IEventStoreSubscriptions.ts","../eventStoreSubscriptions/contracts.ts","../eventStoreSubscriptions/index.ts","../events/AppendedEvent.ts","../events/CausationEntry.ts","../events/EventContext.ts","../events/EventType.ts","../events/EventTypeGeneration.ts","../events/EventTypeId.ts","../events/EventTypes.ts","../events/IEventTypes.ts","../events/Tag.ts","../events/WireEventContext.ts","../events/eventTypeDecorator.ts","../events/filterEventsByTagDecorator.ts","../events/index.ts","../events/isRegisteredEvent.ts","../events/mergeTags.ts","../events/tagDecorator.ts","../events/toClientEventContext.ts","../events/constraints/ConstraintBuilder.ts","../events/constraints/ConstraintId.ts","../events/constraints/Constraints.ts","../events/constraints/IConstraint.ts","../events/constraints/IConstraintBuilder.ts","../events/constraints/IConstraints.ts","../events/constraints/IUniqueConstraintBuilder.ts","../events/constraints/UniqueConstraintBuilder.ts","../events/constraints/constraint.ts","../events/constraints/index.ts","../events/constraints/removeConstraint.ts","../events/constraints/unique.ts","../events/migrations/EventMigrationBuilder.ts","../events/migrations/EventMigrationPropertyBuilder.ts","../events/migrations/EventTypeMigrators.ts","../events/migrations/IEventMigrationBuilder.ts","../events/migrations/IEventMigrationPropertyBuilder.ts","../events/migrations/IEventTypeMigration.ts","../events/migrations/IEventTypeMigrators.ts","../events/migrations/InvalidMigrationGenerationGap.ts","../events/migrations/eventTypeMigration.ts","../events/migrations/index.ts","../externalServices/ExternalServiceBuilder.ts","../externalServices/ExternalServices.ts","../externalServices/IExternalServiceBuilder.ts","../externalServices/IExternalServices.ts","../externalServices/index.ts","../identities/IIdentityManager.ts","../identities/IdentityManager.ts","../identities/index.ts","../identity/IIdentityProvider.ts","../identity/Identity.ts","../identity/IdentityProvider.ts","../identity/index.ts","../jobs/IJobs.ts","../jobs/JobId.ts","../jobs/Jobs.ts","../jobs/index.ts","../observation/FailedPartition.ts","../observation/FailedPartitionAttempt.ts","../observation/FailedPartitions.ts","../observation/ICanBeNotifiedWhenPartitionReplayed.ts","../observation/ICanBeNotifiedWhenReplay.ts","../observation/IFailedPartitions.ts","../observation/IObservers.ts","../observation/ObserverId.ts","../observation/ObserverInformation.ts","../observation/ObserverRemovalOutcome.ts","../observation/ObserverRemovalResult.ts","../observation/ObserverRunningState.ts","../observation/ObserverType.ts","../observation/Observers.ts","../observation/index.ts","../observation/notifyReplayLifecycle.ts","../observation/toClientFailedPartition.ts","../observation/toObserverInformation.ts","../observation/toObserverRemovalResult.ts","../observation/toObserverRunningState.ts","../projections/CompiledProjectionDefinitions.ts","../projections/GlobalHandlerPropertyNotOnVariant.ts","../projections/IProjections.ts","../projections/InvalidEventContextPropertyError.ts","../projections/ProjectionCapabilityProvenance.ts","../projections/ProjectionDefinitionCompiler.ts","../projections/ProjectionEventSchema.ts","../projections/ProjectionId.ts","../projections/ProjectionQueryResult.ts","../projections/ProjectionState.ts","../projections/Projections.ts","../projections/ResolvedModelBoundMetadata.ts","../projections/UnableToQueryProjection.ts","../projections/VariantMustDeclareEntersOnEvent.ts","../projections/VariantReclassifier.ts","../projections/canonicalStringify.ts","../projections/captureProjectionProvenance.ts","../projections/constantValueExpression.ts","../projections/eventContextPropertyExpression.ts","../projections/eventContractPath.ts","../projections/index.ts","../projections/invalidEventContextPropertyInProjection.ts","../projections/notSetPropertyPath.ts","../projections/declarative/AddBuilder.ts","../projections/declarative/AddChildBuilder.ts","../projections/declarative/AllSetBuilder.ts","../projections/declarative/ChildrenBuilder.ts","../projections/declarative/CompositeKeyBuilder.ts","../projections/declarative/FromBuilder.ts","../projections/declarative/FromEveryBuilder.ts","../projections/declarative/IAddBuilder.ts","../projections/declarative/IAddChildBuilder.ts","../projections/declarative/IAllSetBuilder.ts","../projections/declarative/IChildrenBuilder.ts","../projections/declarative/ICompositeKeyBuilder.ts","../projections/declarative/IFromBuilder.ts","../projections/declarative/IFromEveryBuilder.ts","../projections/declarative/IJoinBuilder.ts","../projections/declarative/INestedBuilder.ts","../projections/declarative/IProjectionBuilder.ts","../projections/declarative/IProjectionBuilderFor.ts","../projections/declarative/IProjectionFor.ts","../projections/declarative/IReadModelPropertiesBuilder.ts","../projections/declarative/IRemovedWithBuilder.ts","../projections/declarative/IRemovedWithJoinBuilder.ts","../projections/declarative/ISetBuilder.ts","../projections/declarative/ISubtractBuilder.ts","../projections/declarative/JoinBuilder.ts","../projections/declarative/NestedBuilder.ts","../projections/declarative/ProjectionBuilderCore.ts","../projections/declarative/ProjectionBuilderFor.ts","../projections/declarative/RemovedWithBuilder.ts","../projections/declarative/RemovedWithJoinBuilder.ts","../projections/declarative/SetBuilder.ts","../projections/declarative/SubtractBuilder.ts","../projections/declarative/index.ts","../projections/declarative/projection.ts","../projections/declarative/projectionBuilderProvenance.ts","../projections/modelBound/FromEventMetadata.ts","../projections/modelBound/FromEventOptions.ts","../projections/modelBound/addFrom.ts","../projections/modelBound/childrenAndNestedBuilder.ts","../projections/modelBound/childrenFrom.ts","../projections/modelBound/clearWith.ts","../projections/modelBound/count.ts","../projections/modelBound/decrement.ts","../projections/modelBound/entersOn.ts","../projections/modelBound/eventSequence.ts","../projections/modelBound/fromAll.ts","../projections/modelBound/fromEvent.ts","../projections/modelBound/fromEvery.ts","../projections/modelBound/globalFor.ts","../projections/modelBound/increment.ts","../projections/modelBound/index.ts","../projections/modelBound/isModelBoundProjection.ts","../projections/modelBound/join.ts","../projections/modelBound/nested.ts","../projections/modelBound/noAutoMap.ts","../projections/modelBound/notRewindable.ts","../projections/modelBound/passive.ts","../projections/modelBound/removedWith.ts","../projections/modelBound/removedWithJoin.ts","../projections/modelBound/setFrom.ts","../projections/modelBound/setFromContext.ts","../projections/modelBound/setValue.ts","../projections/modelBound/subtractFrom.ts","../projections/modelBound/variantOf.ts","../reactors/IReactors.ts","../reactors/ReactorId.ts","../reactors/ReactorResultHandler.ts","../reactors/ReactorServices.ts","../reactors/ReactorSideEffects.ts","../reactors/Reactors.ts","../reactors/index.ts","../reactors/onceOnly.ts","../reactors/reactor.ts","../reactors/replay.ts","../readModels/IMaterializedReadModels.ts","../readModels/IReadModels.ts","../readModels/MaterializedReadModels.ts","../readModels/ReadModelChangeset.ts","../readModels/ReadModelId.ts","../readModels/ReadModelSnapshot.ts","../readModels/ReadModelSubjectResolver.ts","../readModels/ReadModels.ts","../readModels/assertUniqueReadModelIds.ts","../readModels/buildReadModelDefinition.ts","../readModels/deserializeReadModel.ts","../readModels/index.ts","../readModels/indexDecorator.ts","../readModels/readModel.ts","../readModels/rootReadModelTypes.ts","../reducers/IReducers.ts","../reducers/ReducerEventDispatcher.ts","../reducers/ReducerEventHandler.ts","../reducers/ReducerId.ts","../reducers/Reducers.ts","../reducers/index.ts","../reducers/reducer.ts","../schemas/JsonSchema.ts","../schemas/JsonSchemaGenerator.ts","../schemas/createDeferredSchema.ts","../schemas/index.ts","../schemas/jsonSchemaProperty.ts","../seeding/EventSeeding.ts","../seeding/ICanSeedEvents.ts","../seeding/IEventSeeding.ts","../seeding/IEventSeedingBuilder.ts","../seeding/IEventSeedingScopeBuilder.ts","../seeding/index.ts","../seeding/seeder.ts","../sinks/WellKnownSinks.ts","../sinks/index.ts","../testing/ReadModelScenario.ts","../testing/ReadModelScenarioGiven.ts","../testing/ReadModelScenarioGivenBuilder.ts","../testing/index.ts","../testing/projections/ProjectionCapabilities.ts","../testing/projections/UnsupportedProjectionOperation.ts","../testing/projections/for_ProjectionCapabilities/given/Changed.ts","../testing/projections/for_ProjectionCapabilities/given/Model.ts","../testing/projections/for_ProjectionCapabilities/given/Removed.ts","../testing/projections/for_ProjectionCapabilities/given/compile.ts","../transactions/IUnitOfWork.ts","../transactions/IUnitOfWorkManager.ts","../transactions/NoUnitOfWorkHasBeenStarted.ts","../transactions/UnitOfWork.ts","../transactions/UnitOfWorkManager.ts","../transactions/index.ts","../types/DecoratorType.ts","../types/TypeDiscoverer.ts","../types/TypeIntrospector.ts","../types/conceptValueType.ts","../types/index.ts","../types/modelBoundProperty.ts","../types/modelBoundPropertyMetadata.ts","../types/propertyDecoratorMetadata.ts","../types/standardDecoratorMetadata.ts","../webhooks/IWebhook.ts","../webhooks/IWebhookDefinitionBuilder.ts","../webhooks/IWebhooks.ts","../webhooks/WebhookDefinitionBuilder.ts","../webhooks/WebhookId.ts","../webhooks/WebhookTargetUrl.ts","../webhooks/Webhooks.ts","../webhooks/index.ts","../webhooks/webhook.ts"],"packageJsons":["../package.json","../../node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/package.json","../../node_modules/@cratis/fundamentals/dist/esm/package.json","../../node_modules/@cratis/fundamentals/package.json","../../node_modules/@grpc/grpc-js/package.json","../../node_modules/@grpc/proto-loader/package.json","../../node_modules/@js-sdsl/ordered-map/package.json","../../node_modules/@opentelemetry/api/package.json","../../node_modules/@types/node/package.json","../../node_modules/glob/dist/esm/package.json","../../node_modules/glob/package.json","../../node_modules/long/package.json","../../node_modules/long/umd/package.json","../../node_modules/lru-cache/dist/esm/package.json","../../node_modules/lru-cache/package.json","../../node_modules/minimatch/dist/esm/package.json","../../node_modules/minimatch/package.json","../../node_modules/minipass/dist/esm/package.json","../../node_modules/minipass/package.json","../../node_modules/nice-grpc-common/package.json","../../node_modules/nice-grpc/package.json","../../node_modules/path-scurry/dist/esm/package.json","../../node_modules/path-scurry/package.json","../../node_modules/protobufjs/package.json","../../node_modules/reflect-metadata/package.json","../../node_modules/ts-error/package.json","../../node_modules/undici-types/package.json","../../node_modules/undici/package.json"],"missingPackageJsons":["../../node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/protobuf-net/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/dist/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/nice-grpc-common/package.json","../../node_modules/@cratis/fundamentals/dist/esm/geospatial/package.json","../../node_modules/@cratis/fundamentals/dist/esm/json/package.json","../../node_modules/@grpc/grpc-js/build/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/package.json","../../node_modules/@grpc/grpc-js/build/src/package.json","../../node_modules/@grpc/proto-loader/build/package.json","../../node_modules/@grpc/proto-loader/build/src/package.json","../../node_modules/@js-sdsl/ordered-map/dist/esm/package.json","../../node_modules/@js-sdsl/ordered-map/dist/package.json","../../node_modules/@opentelemetry/api/build/package.json","../../node_modules/@opentelemetry/api/build/src/api/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/internal/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/package.json","../../node_modules/@opentelemetry/api/build/src/common/package.json","../../node_modules/@opentelemetry/api/build/src/context/package.json","../../node_modules/@opentelemetry/api/build/src/diag/package.json","../../node_modules/@opentelemetry/api/build/src/metrics/package.json","../../node_modules/@opentelemetry/api/build/src/package.json","../../node_modules/@opentelemetry/api/build/src/propagation/package.json","../../node_modules/@opentelemetry/api/build/src/trace/internal/package.json","../../node_modules/@opentelemetry/api/build/src/trace/package.json","../../node_modules/@types/assert/package.json","../../node_modules/@types/assert/strict/package.json","../../node_modules/@types/async_hooks/package.json","../../node_modules/@types/buffer/package.json","../../node_modules/@types/child_process/package.json","../../node_modules/@types/cluster/package.json","../../node_modules/@types/console/package.json","../../node_modules/@types/constants/package.json","../../node_modules/@types/crypto/package.json","../../node_modules/@types/dgram/package.json","../../node_modules/@types/diagnostics_channel/package.json","../../node_modules/@types/dns/package.json","../../node_modules/@types/dns/promises/package.json","../../node_modules/@types/domain/package.json","../../node_modules/@types/events/package.json","../../node_modules/@types/fs/package.json","../../node_modules/@types/fs/promises/package.json","../../node_modules/@types/http/package.json","../../node_modules/@types/http2/package.json","../../node_modules/@types/https/package.json","../../node_modules/@types/inspector/package.json","../../node_modules/@types/inspector/promises/package.json","../../node_modules/@types/module/package.json","../../node_modules/@types/net/package.json","../../node_modules/@types/node/assert/package.json","../../node_modules/@types/node/dns/package.json","../../node_modules/@types/node/fs/package.json","../../node_modules/@types/node/inspector/package.json","../../node_modules/@types/node/path/package.json","../../node_modules/@types/node/readline/package.json","../../node_modules/@types/node/stream/package.json","../../node_modules/@types/node/test/package.json","../../node_modules/@types/node/timers/package.json","../../node_modules/@types/node/util/package.json","../../node_modules/@types/node/web-globals/package.json","../../node_modules/@types/node/zlib/package.json","../../node_modules/@types/os/package.json","../../node_modules/@types/path/package.json","../../node_modules/@types/path/posix/package.json","../../node_modules/@types/path/win32/package.json","../../node_modules/@types/perf_hooks/package.json","../../node_modules/@types/process/package.json","../../node_modules/@types/punycode/package.json","../../node_modules/@types/querystring/package.json","../../node_modules/@types/readline/package.json","../../node_modules/@types/readline/promises/package.json","../../node_modules/@types/repl/package.json","../../node_modules/@types/stream/consumers/package.json","../../node_modules/@types/stream/iter/package.json","../../node_modules/@types/stream/package.json","../../node_modules/@types/stream/promises/package.json","../../node_modules/@types/stream/web/package.json","../../node_modules/@types/string_decoder/package.json","../../node_modules/@types/timers/package.json","../../node_modules/@types/timers/promises/package.json","../../node_modules/@types/tls/package.json","../../node_modules/@types/trace_events/package.json","../../node_modules/@types/tty/package.json","../../node_modules/@types/url/package.json","../../node_modules/@types/util/package.json","../../node_modules/@types/util/types/package.json","../../node_modules/@types/v8/package.json","../../node_modules/@types/vm/package.json","../../node_modules/@types/wasi/package.json","../../node_modules/@types/worker_threads/package.json","../../node_modules/@types/zlib/package.json","../../node_modules/assert/package.json","../../node_modules/assert/strict/package.json","../../node_modules/async_hooks/package.json","../../node_modules/buffer/package.json","../../node_modules/child_process/package.json","../../node_modules/cluster/package.json","../../node_modules/console/package.json","../../node_modules/constants/package.json","../../node_modules/crypto/package.json","../../node_modules/dgram/package.json","../../node_modules/diagnostics_channel/package.json","../../node_modules/dns/package.json","../../node_modules/dns/promises/package.json","../../node_modules/domain/package.json","../../node_modules/events/package.json","../../node_modules/fs/package.json","../../node_modules/fs/promises/package.json","../../node_modules/http/package.json","../../node_modules/http2/package.json","../../node_modules/https/package.json","../../node_modules/inspector/package.json","../../node_modules/inspector/promises/package.json","../../node_modules/module/package.json","../../node_modules/net/package.json","../../node_modules/nice-grpc-common/lib/client/package.json","../../node_modules/nice-grpc-common/lib/package.json","../../node_modules/nice-grpc-common/lib/server/package.json","../../node_modules/nice-grpc/lib/client/package.json","../../node_modules/nice-grpc/lib/package.json","../../node_modules/nice-grpc/lib/server/package.json","../../node_modules/nice-grpc/lib/service-definitions/package.json","../../node_modules/nice-grpc/lib/utils/package.json","../../node_modules/os/package.json","../../node_modules/path/package.json","../../node_modules/path/posix/package.json","../../node_modules/path/win32/package.json","../../node_modules/perf_hooks/package.json","../../node_modules/process/package.json","../../node_modules/protobufjs/ext/descriptor/package.json","../../node_modules/protobufjs/ext/package.json","../../node_modules/protobufjs/node_modules/@types/long/package.json","../../node_modules/protobufjs/node_modules/long/package.json","../../node_modules/punycode/package.json","../../node_modules/querystring/package.json","../../node_modules/readline/package.json","../../node_modules/readline/promises/package.json","../../node_modules/repl/package.json","../../node_modules/stream/consumers/package.json","../../node_modules/stream/iter/package.json","../../node_modules/stream/package.json","../../node_modules/stream/promises/package.json","../../node_modules/stream/web/package.json","../../node_modules/string_decoder/package.json","../../node_modules/timers/package.json","../../node_modules/timers/promises/package.json","../../node_modules/tls/package.json","../../node_modules/trace_events/package.json","../../node_modules/ts-error/lib/package.json","../../node_modules/tty/package.json","../../node_modules/undici/types/package.json","../../node_modules/url/package.json","../../node_modules/util/package.json","../../node_modules/util/types/package.json","../../node_modules/v8/package.json","../../node_modules/vm/package.json","../../node_modules/wasi/package.json","../../node_modules/worker_threads/package.json","../../node_modules/zlib/package.json"]}
1
+ {"version":"7.0.2","root":["../ChronicleClient.ts","../ChronicleOptions.ts","../EventStore.ts","../EventStoreName.ts","../EventStoreNamespaceName.ts","../IChronicleClient.ts","../IEventStore.ts","../Metrics.ts","../Tracing.ts","../index.ts","../artifacts/ActivatedArtifact.ts","../artifacts/ArtifactActivationContext.ts","../artifacts/ArtifactCompletionFailed.ts","../artifacts/ArtifactDelivery.ts","../artifacts/ArtifactInvocationContext.ts","../artifacts/ArtifactKind.ts","../artifacts/ClientArtifactsActivator.ts","../artifacts/DefaultClientArtifactsProvider.ts","../artifacts/IClientArtifactsProvider.ts","../artifacts/index.ts","../artifacts/validateArtifactSchemas.ts","../artifacts/withActivatedArtifact.ts","../auditing/Causation.ts","../auditing/CausationManager.ts","../auditing/CausationType.ts","../auditing/ICausationManager.ts","../auditing/index.ts","../compliance/ComplianceContracts.ts","../compliance/ComplianceMetadata.ts","../compliance/ComplianceMetadataResolver.ts","../compliance/ComplianceMetadataType.ts","../compliance/IPIIManager.ts","../compliance/PIIManager.ts","../compliance/PIINotSupportedOnEventSourceId.ts","../compliance/index.ts","../compliance/pii.ts","../compliance/subject.ts","../confidentiality/EncryptedNotSupportedOnEventSourceId.ts","../confidentiality/EncryptionScope.ts","../confidentiality/PIIAndEncryptedCombinedNotSupported.ts","../confidentiality/SecurityMetadata.ts","../confidentiality/SecurityMetadataResolver.ts","../confidentiality/SecurityMetadataType.ts","../confidentiality/encrypted.ts","../confidentiality/index.ts","../connection/ChronicleConnection.ts","../connection/ChronicleConnectionString.ts","../connection/ChronicleServerAddressResolver.ts","../connection/ChronicleServices.ts","../connection/ChronicleSrvResolutionError.ts","../connection/ChronicleSrvResolver.ts","../connection/CompatibilityPreflight.ts","../connection/ConnectionLifecycle.ts","../connection/DateTimeOffset.ts","../connection/Guid.ts","../connection/ILoadBalancerStrategy.ts","../connection/IncompatibleChronicleServer.ts","../connection/KernelKeepAlive.ts","../connection/LeastConnectionsLoadBalancerStrategy.ts","../connection/LoadBalancerMode.ts","../connection/LoadBalancerStrategyFactory.ts","../connection/RandomLoadBalancerStrategy.ts","../connection/RejectedChronicleCredentials.ts","../connection/RoundRobinLoadBalancerStrategy.ts","../connection/TokenProvider.ts","../connection/callResults.ts","../connection/clientVersion.ts","../connection/fetchOAuthAccessToken.ts","../connection/formatServerAddress.ts","../connection/index.ts","../correlation/CorrelationId.ts","../correlation/CorrelationIdManager.ts","../correlation/ICorrelationIdAccessor.ts","../correlation/ICorrelationIdSetter.ts","../correlation/index.ts","../eventSequences/AppendError.ts","../eventSequences/AppendOperationsBroadcaster.ts","../eventSequences/AppendOptions.ts","../eventSequences/AppendResult.ts","../eventSequences/AppendedEventWithResult.ts","../eventSequences/CompleteStreamError.ts","../eventSequences/CompleteStreamResult.ts","../eventSequences/ConcurrencyScope.ts","../eventSequences/ConcurrencyViolation.ts","../eventSequences/ConstraintViolation.ts","../eventSequences/EventForEventSourceId.ts","../eventSequences/EventLog.ts","../eventSequences/EventSequence.ts","../eventSequences/EventSequenceId.ts","../eventSequences/EventSequenceNumber.ts","../eventSequences/IEventLog.ts","../eventSequences/IEventSequence.ts","../eventSequences/ITransactionalEventSequence.ts","../eventSequences/TransactionalEventSequence.ts","../eventSequences/WaitForCompletionOptions.ts","../eventSequences/WaitForCompletionResult.ts","../eventSequences/index.ts","../eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts","../eventStoreSubscriptions/EventStoreSubscriptionId.ts","../eventStoreSubscriptions/EventStoreSubscriptions.ts","../eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts","../eventStoreSubscriptions/IEventStoreSubscriptions.ts","../eventStoreSubscriptions/contracts.ts","../eventStoreSubscriptions/index.ts","../events/AppendedEvent.ts","../events/CausationEntry.ts","../events/EventContext.ts","../events/EventType.ts","../events/EventTypeGeneration.ts","../events/EventTypeId.ts","../events/EventTypes.ts","../events/IEventTypes.ts","../events/Tag.ts","../events/WireEventContext.ts","../events/eventTypeDecorator.ts","../events/filterEventsByTagDecorator.ts","../events/index.ts","../events/isRegisteredEvent.ts","../events/mergeTags.ts","../events/tagDecorator.ts","../events/toClientEventContext.ts","../events/constraints/ConstraintBuilder.ts","../events/constraints/ConstraintId.ts","../events/constraints/Constraints.ts","../events/constraints/IConstraint.ts","../events/constraints/IConstraintBuilder.ts","../events/constraints/IConstraints.ts","../events/constraints/IUniqueConstraintBuilder.ts","../events/constraints/UniqueConstraintBuilder.ts","../events/constraints/constraint.ts","../events/constraints/index.ts","../events/constraints/removeConstraint.ts","../events/constraints/unique.ts","../events/migrations/EventMigrationBuilder.ts","../events/migrations/EventMigrationPropertyBuilder.ts","../events/migrations/EventTypeMigrators.ts","../events/migrations/IEventMigrationBuilder.ts","../events/migrations/IEventMigrationPropertyBuilder.ts","../events/migrations/IEventTypeMigration.ts","../events/migrations/IEventTypeMigrators.ts","../events/migrations/InvalidMigrationGenerationGap.ts","../events/migrations/eventTypeMigration.ts","../events/migrations/index.ts","../externalServices/ExternalServiceBuilder.ts","../externalServices/ExternalServices.ts","../externalServices/IExternalServiceBuilder.ts","../externalServices/IExternalServices.ts","../externalServices/index.ts","../identities/IIdentityManager.ts","../identities/IdentityManager.ts","../identities/index.ts","../identity/IIdentityProvider.ts","../identity/Identity.ts","../identity/IdentityProvider.ts","../identity/index.ts","../jobs/IJobs.ts","../jobs/JobId.ts","../jobs/Jobs.ts","../jobs/index.ts","../observation/FailedPartition.ts","../observation/FailedPartitionAttempt.ts","../observation/FailedPartitions.ts","../observation/ICanBeNotifiedWhenPartitionReplayed.ts","../observation/ICanBeNotifiedWhenReplay.ts","../observation/IFailedPartitions.ts","../observation/IObservers.ts","../observation/ObserverId.ts","../observation/ObserverInformation.ts","../observation/ObserverRemovalOutcome.ts","../observation/ObserverRemovalResult.ts","../observation/ObserverRunningState.ts","../observation/ObserverType.ts","../observation/Observers.ts","../observation/index.ts","../observation/notifyReplayLifecycle.ts","../observation/toClientFailedPartition.ts","../observation/toObserverInformation.ts","../observation/toObserverRemovalResult.ts","../observation/toObserverRunningState.ts","../projections/CompiledProjectionDefinitions.ts","../projections/GlobalHandlerPropertyNotOnVariant.ts","../projections/IProjections.ts","../projections/InvalidEventContextPropertyError.ts","../projections/ProjectionCapabilityProvenance.ts","../projections/ProjectionDefinitionCompiler.ts","../projections/ProjectionEventSchema.ts","../projections/ProjectionId.ts","../projections/ProjectionQueryResult.ts","../projections/ProjectionState.ts","../projections/Projections.ts","../projections/ResolvedModelBoundMetadata.ts","../projections/UnableToQueryProjection.ts","../projections/VariantMustDeclareEntersOnEvent.ts","../projections/VariantReclassifier.ts","../projections/canonicalStringify.ts","../projections/captureProjectionProvenance.ts","../projections/constantValueExpression.ts","../projections/eventContextPropertyExpression.ts","../projections/eventContractPath.ts","../projections/index.ts","../projections/invalidEventContextPropertyInProjection.ts","../projections/notSetPropertyPath.ts","../projections/declarative/AddBuilder.ts","../projections/declarative/AddChildBuilder.ts","../projections/declarative/AllSetBuilder.ts","../projections/declarative/ChildrenBuilder.ts","../projections/declarative/CompositeKeyBuilder.ts","../projections/declarative/FromBuilder.ts","../projections/declarative/FromEveryBuilder.ts","../projections/declarative/IAddBuilder.ts","../projections/declarative/IAddChildBuilder.ts","../projections/declarative/IAllSetBuilder.ts","../projections/declarative/IChildrenBuilder.ts","../projections/declarative/ICompositeKeyBuilder.ts","../projections/declarative/IFromBuilder.ts","../projections/declarative/IFromEveryBuilder.ts","../projections/declarative/IJoinBuilder.ts","../projections/declarative/INestedBuilder.ts","../projections/declarative/IProjectionBuilder.ts","../projections/declarative/IProjectionBuilderFor.ts","../projections/declarative/IProjectionFor.ts","../projections/declarative/IReadModelPropertiesBuilder.ts","../projections/declarative/IRemovedWithBuilder.ts","../projections/declarative/IRemovedWithJoinBuilder.ts","../projections/declarative/ISetBuilder.ts","../projections/declarative/ISubtractBuilder.ts","../projections/declarative/JoinBuilder.ts","../projections/declarative/NestedBuilder.ts","../projections/declarative/ProjectionBuilderCore.ts","../projections/declarative/ProjectionBuilderFor.ts","../projections/declarative/RemovedWithBuilder.ts","../projections/declarative/RemovedWithJoinBuilder.ts","../projections/declarative/SetBuilder.ts","../projections/declarative/SubtractBuilder.ts","../projections/declarative/index.ts","../projections/declarative/projection.ts","../projections/declarative/projectionBuilderProvenance.ts","../projections/modelBound/FromEventMetadata.ts","../projections/modelBound/FromEventOptions.ts","../projections/modelBound/addFrom.ts","../projections/modelBound/childrenAndNestedBuilder.ts","../projections/modelBound/childrenFrom.ts","../projections/modelBound/clearWith.ts","../projections/modelBound/count.ts","../projections/modelBound/decrement.ts","../projections/modelBound/entersOn.ts","../projections/modelBound/eventSequence.ts","../projections/modelBound/fromAll.ts","../projections/modelBound/fromEvent.ts","../projections/modelBound/fromEvery.ts","../projections/modelBound/globalFor.ts","../projections/modelBound/increment.ts","../projections/modelBound/index.ts","../projections/modelBound/isModelBoundProjection.ts","../projections/modelBound/join.ts","../projections/modelBound/nested.ts","../projections/modelBound/noAutoMap.ts","../projections/modelBound/notRewindable.ts","../projections/modelBound/passive.ts","../projections/modelBound/removedWith.ts","../projections/modelBound/removedWithJoin.ts","../projections/modelBound/setFrom.ts","../projections/modelBound/setFromContext.ts","../projections/modelBound/setValue.ts","../projections/modelBound/subtractFrom.ts","../projections/modelBound/variantOf.ts","../reactors/IReactors.ts","../reactors/ReactorId.ts","../reactors/ReactorResultHandler.ts","../reactors/ReactorServices.ts","../reactors/ReactorSideEffects.ts","../reactors/Reactors.ts","../reactors/index.ts","../reactors/onceOnly.ts","../reactors/reactor.ts","../reactors/replay.ts","../readModels/IMaterializedReadModels.ts","../readModels/IReadModels.ts","../readModels/MaterializedReadModels.ts","../readModels/ReadModelChangeset.ts","../readModels/ReadModelId.ts","../readModels/ReadModelSnapshot.ts","../readModels/ReadModelSubjectResolver.ts","../readModels/ReadModels.ts","../readModels/assertUniqueReadModelIds.ts","../readModels/buildReadModelDefinition.ts","../readModels/deserializeReadModel.ts","../readModels/index.ts","../readModels/indexDecorator.ts","../readModels/readModel.ts","../readModels/rootReadModelTypes.ts","../reducers/IReducers.ts","../reducers/ReducerEventDispatcher.ts","../reducers/ReducerEventHandler.ts","../reducers/ReducerId.ts","../reducers/Reducers.ts","../reducers/index.ts","../reducers/reducer.ts","../schemas/JsonSchema.ts","../schemas/JsonSchemaGenerator.ts","../schemas/createDeferredSchema.ts","../schemas/index.ts","../schemas/jsonSchemaProperty.ts","../seeding/EventSeeding.ts","../seeding/ICanSeedEvents.ts","../seeding/IEventSeeding.ts","../seeding/IEventSeedingBuilder.ts","../seeding/IEventSeedingScopeBuilder.ts","../seeding/index.ts","../seeding/seeder.ts","../sinks/WellKnownSinks.ts","../sinks/index.ts","../testing/IReadModelProcessor.ts","../testing/ReadModelScenario.ts","../testing/ReadModelScenarioGiven.ts","../testing/ReadModelScenarioGivenBuilder.ts","../testing/ReadModelState.ts","../testing/ReducerReadModelProcessor.ts","../testing/ScenarioEvent.ts","../testing/index.ts","../testing/projections/ProjectionCapabilities.ts","../testing/projections/ProjectionExpressionEvaluator.ts","../testing/projections/ProjectionReadModelProcessor.ts","../testing/projections/ProjectionValueConverter.ts","../testing/projections/UnsupportedProjectionOperation.ts","../testing/projections/for_ProjectionCapabilities/given/Changed.ts","../testing/projections/for_ProjectionCapabilities/given/Model.ts","../testing/projections/for_ProjectionCapabilities/given/Removed.ts","../testing/projections/for_ProjectionCapabilities/given/compile.ts","../transactions/IUnitOfWork.ts","../transactions/IUnitOfWorkManager.ts","../transactions/NoUnitOfWorkHasBeenStarted.ts","../transactions/UnitOfWork.ts","../transactions/UnitOfWorkManager.ts","../transactions/index.ts","../types/DecoratorType.ts","../types/TypeDiscoverer.ts","../types/TypeIntrospector.ts","../types/conceptValueType.ts","../types/index.ts","../types/modelBoundProperty.ts","../types/modelBoundPropertyMetadata.ts","../types/propertyDecoratorMetadata.ts","../types/standardDecoratorMetadata.ts","../webhooks/IWebhook.ts","../webhooks/IWebhookDefinitionBuilder.ts","../webhooks/IWebhooks.ts","../webhooks/WebhookDefinitionBuilder.ts","../webhooks/WebhookId.ts","../webhooks/WebhookTargetUrl.ts","../webhooks/Webhooks.ts","../webhooks/index.ts","../webhooks/webhook.ts"],"packageJsons":["../package.json","../../node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/package.json","../../node_modules/@cratis/fundamentals/dist/esm/package.json","../../node_modules/@cratis/fundamentals/package.json","../../node_modules/@grpc/grpc-js/package.json","../../node_modules/@grpc/proto-loader/package.json","../../node_modules/@js-sdsl/ordered-map/package.json","../../node_modules/@opentelemetry/api/package.json","../../node_modules/@types/node/package.json","../../node_modules/glob/dist/esm/package.json","../../node_modules/glob/package.json","../../node_modules/long/package.json","../../node_modules/long/umd/package.json","../../node_modules/lru-cache/dist/esm/package.json","../../node_modules/lru-cache/package.json","../../node_modules/minimatch/dist/esm/package.json","../../node_modules/minimatch/package.json","../../node_modules/minipass/dist/esm/package.json","../../node_modules/minipass/package.json","../../node_modules/nice-grpc-common/package.json","../../node_modules/nice-grpc/package.json","../../node_modules/path-scurry/dist/esm/package.json","../../node_modules/path-scurry/package.json","../../node_modules/protobufjs/package.json","../../node_modules/reflect-metadata/package.json","../../node_modules/ts-error/package.json","../../node_modules/undici-types/package.json","../../node_modules/undici/package.json"],"missingPackageJsons":["../../node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/generated/protobuf-net/package.json","../../node_modules/@cratis/chronicle.contracts/dist/esm/package.json","../../node_modules/@cratis/chronicle.contracts/dist/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/reflect/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/dist/esm/wkt/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/@bufbuild/protobuf/wire/package.json","../../node_modules/@cratis/chronicle.contracts/node_modules/nice-grpc-common/package.json","../../node_modules/@cratis/fundamentals/dist/esm/geospatial/package.json","../../node_modules/@cratis/fundamentals/dist/esm/json/package.json","../../node_modules/@grpc/grpc-js/build/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/grpc/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/data/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/package.json","../../node_modules/@grpc/grpc-js/build/src/generated/xds/service/package.json","../../node_modules/@grpc/grpc-js/build/src/package.json","../../node_modules/@grpc/proto-loader/build/package.json","../../node_modules/@grpc/proto-loader/build/src/package.json","../../node_modules/@js-sdsl/ordered-map/dist/esm/package.json","../../node_modules/@js-sdsl/ordered-map/dist/package.json","../../node_modules/@opentelemetry/api/build/package.json","../../node_modules/@opentelemetry/api/build/src/api/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/internal/package.json","../../node_modules/@opentelemetry/api/build/src/baggage/package.json","../../node_modules/@opentelemetry/api/build/src/common/package.json","../../node_modules/@opentelemetry/api/build/src/context/package.json","../../node_modules/@opentelemetry/api/build/src/diag/package.json","../../node_modules/@opentelemetry/api/build/src/metrics/package.json","../../node_modules/@opentelemetry/api/build/src/package.json","../../node_modules/@opentelemetry/api/build/src/propagation/package.json","../../node_modules/@opentelemetry/api/build/src/trace/internal/package.json","../../node_modules/@opentelemetry/api/build/src/trace/package.json","../../node_modules/@types/assert/package.json","../../node_modules/@types/assert/strict/package.json","../../node_modules/@types/async_hooks/package.json","../../node_modules/@types/buffer/package.json","../../node_modules/@types/child_process/package.json","../../node_modules/@types/cluster/package.json","../../node_modules/@types/console/package.json","../../node_modules/@types/constants/package.json","../../node_modules/@types/crypto/package.json","../../node_modules/@types/dgram/package.json","../../node_modules/@types/diagnostics_channel/package.json","../../node_modules/@types/dns/package.json","../../node_modules/@types/dns/promises/package.json","../../node_modules/@types/domain/package.json","../../node_modules/@types/events/package.json","../../node_modules/@types/fs/package.json","../../node_modules/@types/fs/promises/package.json","../../node_modules/@types/http/package.json","../../node_modules/@types/http2/package.json","../../node_modules/@types/https/package.json","../../node_modules/@types/inspector/package.json","../../node_modules/@types/inspector/promises/package.json","../../node_modules/@types/module/package.json","../../node_modules/@types/net/package.json","../../node_modules/@types/node/assert/package.json","../../node_modules/@types/node/dns/package.json","../../node_modules/@types/node/fs/package.json","../../node_modules/@types/node/inspector/package.json","../../node_modules/@types/node/path/package.json","../../node_modules/@types/node/readline/package.json","../../node_modules/@types/node/stream/package.json","../../node_modules/@types/node/test/package.json","../../node_modules/@types/node/timers/package.json","../../node_modules/@types/node/util/package.json","../../node_modules/@types/node/web-globals/package.json","../../node_modules/@types/node/zlib/package.json","../../node_modules/@types/os/package.json","../../node_modules/@types/path/package.json","../../node_modules/@types/path/posix/package.json","../../node_modules/@types/path/win32/package.json","../../node_modules/@types/perf_hooks/package.json","../../node_modules/@types/process/package.json","../../node_modules/@types/punycode/package.json","../../node_modules/@types/querystring/package.json","../../node_modules/@types/readline/package.json","../../node_modules/@types/readline/promises/package.json","../../node_modules/@types/repl/package.json","../../node_modules/@types/stream/consumers/package.json","../../node_modules/@types/stream/iter/package.json","../../node_modules/@types/stream/package.json","../../node_modules/@types/stream/promises/package.json","../../node_modules/@types/stream/web/package.json","../../node_modules/@types/string_decoder/package.json","../../node_modules/@types/timers/package.json","../../node_modules/@types/timers/promises/package.json","../../node_modules/@types/tls/package.json","../../node_modules/@types/trace_events/package.json","../../node_modules/@types/tty/package.json","../../node_modules/@types/url/package.json","../../node_modules/@types/util/package.json","../../node_modules/@types/util/types/package.json","../../node_modules/@types/v8/package.json","../../node_modules/@types/vm/package.json","../../node_modules/@types/wasi/package.json","../../node_modules/@types/worker_threads/package.json","../../node_modules/@types/zlib/package.json","../../node_modules/assert/package.json","../../node_modules/assert/strict/package.json","../../node_modules/async_hooks/package.json","../../node_modules/buffer/package.json","../../node_modules/child_process/package.json","../../node_modules/cluster/package.json","../../node_modules/console/package.json","../../node_modules/constants/package.json","../../node_modules/crypto/package.json","../../node_modules/dgram/package.json","../../node_modules/diagnostics_channel/package.json","../../node_modules/dns/package.json","../../node_modules/dns/promises/package.json","../../node_modules/domain/package.json","../../node_modules/events/package.json","../../node_modules/fs/package.json","../../node_modules/fs/promises/package.json","../../node_modules/http/package.json","../../node_modules/http2/package.json","../../node_modules/https/package.json","../../node_modules/inspector/package.json","../../node_modules/inspector/promises/package.json","../../node_modules/module/package.json","../../node_modules/net/package.json","../../node_modules/nice-grpc-common/lib/client/package.json","../../node_modules/nice-grpc-common/lib/package.json","../../node_modules/nice-grpc-common/lib/server/package.json","../../node_modules/nice-grpc/lib/client/package.json","../../node_modules/nice-grpc/lib/package.json","../../node_modules/nice-grpc/lib/server/package.json","../../node_modules/nice-grpc/lib/service-definitions/package.json","../../node_modules/nice-grpc/lib/utils/package.json","../../node_modules/os/package.json","../../node_modules/path/package.json","../../node_modules/path/posix/package.json","../../node_modules/path/win32/package.json","../../node_modules/perf_hooks/package.json","../../node_modules/process/package.json","../../node_modules/protobufjs/ext/descriptor/package.json","../../node_modules/protobufjs/ext/package.json","../../node_modules/protobufjs/node_modules/@types/long/package.json","../../node_modules/protobufjs/node_modules/long/package.json","../../node_modules/punycode/package.json","../../node_modules/querystring/package.json","../../node_modules/readline/package.json","../../node_modules/readline/promises/package.json","../../node_modules/repl/package.json","../../node_modules/stream/consumers/package.json","../../node_modules/stream/iter/package.json","../../node_modules/stream/package.json","../../node_modules/stream/promises/package.json","../../node_modules/stream/web/package.json","../../node_modules/string_decoder/package.json","../../node_modules/timers/package.json","../../node_modules/timers/promises/package.json","../../node_modules/tls/package.json","../../node_modules/trace_events/package.json","../../node_modules/ts-error/lib/package.json","../../node_modules/tty/package.json","../../node_modules/undici/types/package.json","../../node_modules/url/package.json","../../node_modules/util/package.json","../../node_modules/util/types/package.json","../../node_modules/v8/package.json","../../node_modules/vm/package.json","../../node_modules/wasi/package.json","../../node_modules/worker_threads/package.json","../../node_modules/zlib/package.json"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/chronicle",
3
- "version": "6.17.0",
3
+ "version": "6.19.0",
4
4
  "description": "Event sourcing for TypeScript and Node.js — the idiomatic client for Cratis Chronicle, the open-source event-sourcing database",
5
5
  "author": "Cratis",
6
6
  "license": "MIT",
@@ -167,7 +167,7 @@
167
167
  "build": "tsc -b",
168
168
  "clean": "rm -rf dist",
169
169
  "test": "vitest run",
170
- "test:standard-types": "tsc --ignoreConfig --noEmit --target es2022 --module es2022 --moduleResolution bundler --lib es2022,esnext.decorators --types node --skipLibCheck --strict schemas/decorators.standard.spec.ts projections/modelBound/decorators.standard.spec.ts events/classDecorators.standard.spec.ts reactors/decorators.standard.spec.ts readModels/standardFallbacks.standard.spec.ts readModels/registration.standard.spec.ts for_ChronicleClient/when_registering_artifacts/with_standard_property_mappings.standard.spec.ts artifacts/validateArtifactSchemas.spec.ts",
170
+ "test:standard-types": "tsc --ignoreConfig --noEmit --target es2022 --module es2022 --moduleResolution bundler --lib es2022,esnext.decorators --types node --skipLibCheck --strict schemas/decorators.standard.spec.ts projections/declarative/addChildCompatibility.standard.spec.ts projections/modelBound/decorators.standard.spec.ts events/classDecorators.standard.spec.ts reactors/decorators.standard.spec.ts readModels/standardFallbacks.standard.spec.ts readModels/registration.standard.spec.ts for_ChronicleClient/when_registering_artifacts/with_standard_property_mappings.standard.spec.ts artifacts/validateArtifactSchemas.spec.ts",
171
171
  "test:native": "node ./scripts/check-native-esm.mjs"
172
172
  },
173
173
  "dependencies": {
@@ -153,10 +153,12 @@ class SharedTitle { title!: string; }
153
153
  setFrom(TitleChanged, 'title')(SharedTitle.prototype, 'title');
154
154
  globalFor(Identity)(SharedTitle);
155
155
 
156
- class Declarative { id!: string; name!: string; quantity!: number; lines!: Line[]; }
156
+ class Declarative { id!: string; name!: string; quantity!: number; lines!: Line[]; contextLines!: Line[]; }
157
157
  class DeclarativeProjection implements IProjectionFor<Declarative> {
158
158
  define(builder: IProjectionBuilderFor<Declarative>): void {
159
- builder.from(ItemCreated, from => from.set(model => model.name).to(event => event.name))
159
+ builder.from(ItemCreated, from => from.set(model => model.name).to(event => event.name)
160
+ .addChild<Line>(model => model.contextLines, child => child.identifiedBy(line => line.productId)
161
+ .usingKeyFromContext('sequenceNumber').usingParentKeyFromContext('eventSourceId')))
160
162
  .join(Joined, joined => joined.on(model => model.name).set(model => model.name).to(event => event.name))
161
163
  .fromEvery(every => every.set(model => model.name).toEventContextProperty('eventType'))
162
164
  .removedWith(ItemRemoved)
@@ -10,7 +10,10 @@ import { ChronicleConnection } from '../connection/index.js';
10
10
  import { eventType } from '../events/eventTypeDecorator.js';
11
11
  import { childrenFrom } from './modelBound/childrenFrom.js';
12
12
  import { clearWith } from './modelBound/clearWith.js';
13
+ import { count } from './modelBound/count.js';
14
+ import { decrement } from './modelBound/decrement.js';
13
15
  import { fromEvent } from './modelBound/fromEvent.js';
16
+ import { increment } from './modelBound/increment.js';
14
17
  import { nested } from './modelBound/nested.js';
15
18
  import { noAutoMap } from './modelBound/noAutoMap.js';
16
19
  import { setFrom } from './modelBound/setFrom.js';
@@ -22,6 +25,7 @@ import { Projections } from './Projections.js';
22
25
  class LineAdded {
23
26
  productId!: string;
24
27
  quantity!: number;
28
+ label!: string;
25
29
  }
26
30
  eventType()(LineAdded);
27
31
 
@@ -30,6 +34,11 @@ class LineQuantityChanged {
30
34
  }
31
35
  eventType()(LineQuantityChanged);
32
36
 
37
+ class AlternateLineAdded {
38
+ alternateId!: string;
39
+ }
40
+ eventType()(AlternateLineAdded);
41
+
33
42
  class LineQuantityCleared {}
34
43
  eventType()(LineQuantityCleared);
35
44
 
@@ -71,6 +80,117 @@ setFrom(LineQuantityChanged)(OrderLine.prototype, 'quantity');
71
80
  noAutoMap(OrderLine.prototype, 'quantity');
72
81
  clearWith(LineQuantityCleared)(OrderLine.prototype, 'quantity');
73
82
 
83
+ class ChildWithId {
84
+ id = '';
85
+ label = '';
86
+ }
87
+ class ChildWithUppercaseId {
88
+ Id = '';
89
+ }
90
+ class ChildWithExplicitId {
91
+ employeeNumber = '';
92
+ label = '';
93
+ }
94
+ class ChildWithMatchingEventKey {
95
+ productId = '';
96
+ }
97
+ class ChildWithMappedId {
98
+ id = '';
99
+ }
100
+ setFrom(LineAdded, 'productId')(ChildWithMappedId.prototype, 'id');
101
+ class ChildWithoutAutoMap {
102
+ id = '';
103
+ }
104
+ noAutoMap(ChildWithoutAutoMap);
105
+ class ChildWithNoAutoMappedId {
106
+ id = '';
107
+ }
108
+ noAutoMap(ChildWithNoAutoMappedId.prototype, 'id');
109
+ class ChildWithConstantCount {
110
+ id = '';
111
+ total = 0;
112
+ label = '';
113
+ }
114
+ count(LineAdded, 'all')(ChildWithConstantCount.prototype, 'total');
115
+ class ChildWithConstantIncrement {
116
+ id = '';
117
+ total = 0;
118
+ label = '';
119
+ }
120
+ increment(LineAdded, 'all')(ChildWithConstantIncrement.prototype, 'total');
121
+ class ChildWithConstantDecrement {
122
+ id = '';
123
+ total = 0;
124
+ label = '';
125
+ }
126
+ decrement(LineAdded, 'all')(ChildWithConstantDecrement.prototype, 'total');
127
+ class ChildWithPlainCount {
128
+ id = '';
129
+ total = 0;
130
+ label = '';
131
+ }
132
+ count(LineAdded)(ChildWithPlainCount.prototype, 'total');
133
+ class ChildWithMappedLabelAndCount {
134
+ id = '';
135
+ total = 0;
136
+ label = '';
137
+ }
138
+ count(LineAdded)(ChildWithMappedLabelAndCount.prototype, 'total');
139
+ setFrom(LineAdded)(ChildWithMappedLabelAndCount.prototype, 'label');
140
+ class ChildWithEmptyKey {
141
+ [''] = '';
142
+ }
143
+ class ChildWithoutMatchingEmptyKey {
144
+ label = '';
145
+ }
146
+ class IdentifiedChildren {
147
+ byConvention!: ChildWithId[];
148
+ byUppercaseId!: ChildWithUppercaseId[];
149
+ byExplicitId!: ChildWithExplicitId[];
150
+ byExplicitIdWithoutChildType!: ChildWithId[];
151
+ byInferredEventKey!: ChildWithMatchingEventKey[];
152
+ byEventKey!: ChildWithId[];
153
+ byMatchingKey!: ChildWithId[];
154
+ withExplicitMapping!: ChildWithMappedId[];
155
+ withoutAutoMap!: ChildWithoutAutoMap[];
156
+ withNoAutoMappedId!: ChildWithNoAutoMappedId[];
157
+ withDifferentEventKeys!: ChildWithId[];
158
+ withConstantCount!: ChildWithConstantCount[];
159
+ withConstantIncrement!: ChildWithConstantIncrement[];
160
+ withConstantDecrement!: ChildWithConstantDecrement[];
161
+ withPlainCount!: ChildWithPlainCount[];
162
+ withMappedLabelAndCount!: ChildWithMappedLabelAndCount[];
163
+ withEmptyEventKey!: ChildWithEmptyKey[];
164
+ withoutMatchingEmptyKey!: ChildWithoutMatchingEmptyKey[];
165
+ }
166
+ childrenFrom(LineAdded, ChildWithId)(IdentifiedChildren.prototype, 'byConvention');
167
+ childrenFrom(LineAdded, ChildWithUppercaseId)(IdentifiedChildren.prototype, 'byUppercaseId');
168
+ childrenFrom(LineAdded, ChildWithExplicitId, 'employeeNumber')(IdentifiedChildren.prototype, 'byExplicitId');
169
+ childrenFrom(LineAdded, undefined, 'id')(IdentifiedChildren.prototype, 'byExplicitIdWithoutChildType');
170
+ childrenFrom(LineAdded, 'productId')(IdentifiedChildren.prototype, 'byInferredEventKey');
171
+ childrenFrom(LineAdded, 'productId', 'id')(IdentifiedChildren.prototype, 'byEventKey');
172
+ childrenFrom(LineAdded, 'id', 'id')(IdentifiedChildren.prototype, 'byMatchingKey');
173
+ childrenFrom(LineAdded, ChildWithMappedId)(IdentifiedChildren.prototype, 'withExplicitMapping');
174
+ childrenFrom(LineAdded, ChildWithoutAutoMap)(IdentifiedChildren.prototype, 'withoutAutoMap');
175
+ childrenFrom(LineAdded, ChildWithNoAutoMappedId)(IdentifiedChildren.prototype, 'withNoAutoMappedId');
176
+ childrenFrom(LineAdded, 'productId')(IdentifiedChildren.prototype, 'withDifferentEventKeys');
177
+ childrenFrom(AlternateLineAdded, 'alternateId')(IdentifiedChildren.prototype, 'withDifferentEventKeys');
178
+ childrenFrom(LineAdded, ChildWithConstantCount)(IdentifiedChildren.prototype, 'withConstantCount');
179
+ childrenFrom(LineAdded, 'productId')(IdentifiedChildren.prototype, 'withConstantIncrement');
180
+ field(Array, { enumerable: true, genericArguments: [ChildWithConstantIncrement] })(IdentifiedChildren.prototype, 'withConstantIncrement');
181
+ childrenFrom(LineAdded, ChildWithConstantDecrement)(IdentifiedChildren.prototype, 'withConstantDecrement');
182
+ childrenFrom(LineAdded, ChildWithPlainCount)(IdentifiedChildren.prototype, 'withPlainCount');
183
+ childrenFrom(LineAdded, ChildWithMappedLabelAndCount)(IdentifiedChildren.prototype, 'withMappedLabelAndCount');
184
+ childrenFrom(LineAdded, '')(IdentifiedChildren.prototype, 'withEmptyEventKey');
185
+ childrenFrom(LineAdded, '')(IdentifiedChildren.prototype, 'withoutMatchingEmptyKey');
186
+ field(Array, { enumerable: true, genericArguments: [ChildWithMatchingEventKey] })(IdentifiedChildren.prototype, 'byInferredEventKey');
187
+ field(Array, { enumerable: true, genericArguments: [ChildWithId] })(IdentifiedChildren.prototype, 'byEventKey');
188
+ field(Array, { enumerable: true, genericArguments: [ChildWithId] })(IdentifiedChildren.prototype, 'byMatchingKey');
189
+ field(Array, { enumerable: true, genericArguments: [ChildWithId] })(IdentifiedChildren.prototype, 'withDifferentEventKeys');
190
+ field(Array, { enumerable: true, genericArguments: [ChildWithEmptyKey] })(IdentifiedChildren.prototype, 'withEmptyEventKey');
191
+ field(Array, { enumerable: true, genericArguments: [ChildWithoutMatchingEmptyKey] })(IdentifiedChildren.prototype, 'withoutMatchingEmptyKey');
192
+ fromEvent(OrderCreated)(IdentifiedChildren);
193
+
74
194
  class OrderSummary {
75
195
  total!: number;
76
196
  }
@@ -140,10 +260,11 @@ noAutoMap(OrderWithoutAutoMap);
140
260
  fromEvent(OrderCreated)(OrderWithoutAutoMap);
141
261
 
142
262
  class Grandchild {
143
- id!: string;
263
+ id = '';
144
264
  }
145
265
 
146
266
  class ChildWithGrandchildren {
267
+ id = '';
147
268
  grandchildren!: Grandchild[];
148
269
  detail!: Grandchild | undefined;
149
270
  }
@@ -248,6 +369,130 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
248
369
  expect(updateEntry.Value.Properties.quantity).toBe('quantity');
249
370
  });
250
371
 
372
+ it('should map a convention or explicit child identifier from the creating event source id', async () => {
373
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
374
+ await projections.register();
375
+
376
+ const children = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children;
377
+ expect(children.byConvention.IdentifiedBy).toBe('id');
378
+ expect(children.byConvention.From[0].Value.Properties).toEqual({ id: '$eventContext(EventSourceId)' });
379
+ expect(children.byUppercaseId.IdentifiedBy).toBe('Id');
380
+ expect(children.byUppercaseId.From[0].Value.Properties).toEqual({ Id: '$eventContext(EventSourceId)' });
381
+ expect(children.byExplicitId.IdentifiedBy).toBe('employeeNumber');
382
+ expect(children.byExplicitId.From[0].Value.Properties).toEqual({ employeeNumber: '$eventContext(EventSourceId)' });
383
+ });
384
+
385
+ it('should map an explicit identifier without child-type metadata from the creating event source id', async () => {
386
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
387
+ await projections.register();
388
+
389
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.byExplicitIdWithoutChildType;
390
+ expect(child.IdentifiedBy).toBe('id');
391
+ expect(child.From[0].Value.Properties).toEqual({ id: '$eventContext(EventSourceId)' });
392
+ });
393
+
394
+ it('should map the child identifier from an explicit event key when it differs from the property name', async () => {
395
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
396
+ await projections.register();
397
+
398
+ const children = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children;
399
+ expect(children.byEventKey.From[0].Value.Properties.id).toBe('productId');
400
+ expect(children.byInferredEventKey.IdentifiedBy).toBe('productId');
401
+ expect(children.byInferredEventKey.From[0].Value.Properties).toEqual({});
402
+ expect(children.byMatchingKey.From[0].Value.Properties).toEqual({});
403
+ });
404
+
405
+ it('should leave explicitly mapped identifiers and class-level disabled auto-mapping unchanged', async () => {
406
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
407
+ await projections.register();
408
+
409
+ const children = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children;
410
+ expect(children.withExplicitMapping.From[0].Value.Properties).toEqual({ id: 'productId' });
411
+ expect(children.withoutAutoMap.AutoMap).toBe(AutoMap.Disabled);
412
+ expect(children.withoutAutoMap.From[0].Value.Properties).toEqual({});
413
+ });
414
+
415
+ it('should map an identifier with property-level noAutoMap from the creating event source id', async () => {
416
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
417
+ await projections.register();
418
+
419
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.withNoAutoMappedId;
420
+ expect(child.AutoMap).toBe(AutoMap.Enabled);
421
+ expect(child.NoAutoMapProperties).toContain('id');
422
+ expect(child.From[0].Value.Properties.id).toBe('$eventContext(EventSourceId)');
423
+ });
424
+
425
+ it('should map each creating event using its own key on a shared children collection', async () => {
426
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
427
+ await projections.register();
428
+
429
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.withDifferentEventKeys;
430
+ expect(child.IdentifiedBy).toBe('id');
431
+ expect(child.From).toHaveLength(2);
432
+ expect(child.From.find(candidate => candidate.Key.Id === 'LineAdded')?.Value).toEqual({
433
+ Key: 'productId', ParentKey: '$eventSourceId', Properties: { id: 'productId' }
434
+ });
435
+ expect(child.From.find(candidate => candidate.Key.Id === 'AlternateLineAdded')?.Value).toEqual({
436
+ Key: 'alternateId', ParentKey: '$eventSourceId', Properties: { id: 'alternateId' }
437
+ });
438
+ });
439
+
440
+ it('should preserve aggregate-only child count, increment and decrement with constant keys', async () => {
441
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
442
+ await projections.register();
443
+
444
+ const children = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children;
445
+ for (const [name, operation] of [
446
+ ['withConstantCount', '$count'],
447
+ ['withConstantIncrement', '$increment'],
448
+ ['withConstantDecrement', '$decrement']
449
+ ]) {
450
+ const child = children[name];
451
+ expect(child.IdentifiedBy).toBe('id');
452
+ expect(child.From[0].Value).toEqual({
453
+ Key: '$value(all)', ParentKey: '$eventSourceId', Properties: { total: operation }
454
+ });
455
+ }
456
+ });
457
+
458
+ it('should preserve aggregate-only child count without a constant key', async () => {
459
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
460
+ await projections.register();
461
+
462
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.withPlainCount;
463
+ expect(child.IdentifiedBy).toBe('id');
464
+ expect(child.From[0].Value).toEqual({
465
+ Key: '$eventSourceId', ParentKey: '$eventSourceId', Properties: { total: '$count' }
466
+ });
467
+ });
468
+
469
+ it('should still map the identifier when a child count also explicitly maps a label', async () => {
470
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
471
+ await projections.register();
472
+
473
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.withMappedLabelAndCount;
474
+ expect(child.From[0].Value.Properties).toEqual({ total: '$count', label: 'label', id: '$eventContext(EventSourceId)' });
475
+ });
476
+
477
+ it('should discover a child property matching an explicitly empty event key', async () => {
478
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
479
+ await projections.register();
480
+
481
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.withEmptyEventKey;
482
+ expect(child.IdentifiedBy).toBe('');
483
+ expect(child.From[0].Value.Key).toBe('');
484
+ expect(child.From[0].Value.Properties).toEqual({});
485
+ });
486
+
487
+ it('should not infer an identifier from an empty event key without a matching child property', async () => {
488
+ const { projections, registerMock } = createProjections([IdentifiedChildren]);
489
+ await projections.register();
490
+
491
+ const child = (registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition).Children.withoutMatchingEmptyKey;
492
+ expect(child.IdentifiedBy).toBe('$eventSourceId');
493
+ expect(child.From[0].Value.Key).toBe('');
494
+ });
495
+
251
496
  it('should clear only the child member through a From mapping', async () => {
252
497
  const { projections, registerMock } = createProjections([Order]);
253
498
  await projections.register();
@@ -324,6 +569,7 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
324
569
  const child = definition.Children.children;
325
570
  expect(child.AutoMap).toBe(AutoMap.Disabled);
326
571
  expect(child.Children.grandchildren.AutoMap).toBe(AutoMap.Disabled);
572
+ expect(child.Children.grandchildren.From[0].Value.Properties).toEqual({});
327
573
  expect(child.Nested.detail.AutoMap).toBe(AutoMap.Disabled);
328
574
  });
329
575
 
@@ -334,7 +580,10 @@ describe('Projections with childrenFrom, nested and clearWith', () => {
334
580
  const definition = registerMock.mock.calls[0][0].Projections[0] as BuiltDefinition;
335
581
  const child = definition.Children.children;
336
582
  expect(child.AutoMap).toBe(AutoMap.Disabled);
583
+ expect(child.From[0].Value.Properties).toEqual({});
337
584
  expect(child.Children.grandchildren.AutoMap).toBe(AutoMap.Enabled);
585
+ expect(child.Children.grandchildren.IdentifiedBy).toBe('id');
586
+ expect(child.Children.grandchildren.From[0].Value.Properties.id).toBe('$eventContext(EventSourceId)');
338
587
  expect(child.Nested.detail.AutoMap).toBe(AutoMap.Enabled);
339
588
  });
340
589
 
@@ -2,6 +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 { eventContextPropertyExpression } from '../eventContextPropertyExpression.js';
5
6
  import { IAddChildBuilder } from './IAddChildBuilder.js';
6
7
 
7
8
  /**
@@ -14,8 +15,10 @@ export interface ChildAdditionEntry {
14
15
  targetProperty: string;
15
16
  /** The child model property used to identify instances, when set via the builder callback overload. */
16
17
  identifiedBy?: string;
17
- /** The event property used as the key, when set via the builder callback overload. */
18
+ /** The event property or context expression used as the key, when set via the builder callback overload. */
18
19
  usingKey?: string;
20
+ /** The event context expression used as the parent key, when set via the builder callback overload. */
21
+ usingParentKey?: string;
19
22
  /** The event property whose value becomes the child directly, when set via the plain accessor overload. */
20
23
  fromEventProperty?: string;
21
24
  }
@@ -36,8 +39,9 @@ export class AddChildBuilder<TChildModel, TEvent> implements IAddChildBuilder<TC
36
39
  private _usedAsBuilder = false;
37
40
  private _identifiedByProperty: string | undefined;
38
41
  private _usingKeyProperty: string | undefined;
42
+ private _usingParentKeyProperty: string | undefined;
39
43
 
40
- /** Whether any builder member (`identifiedBy`/`usingKey`) was invoked on the probe. */
44
+ /** Whether any builder member (`identifiedBy`, `usingKey`, `usingKeyFromContext`, or `usingParentKeyFromContext`) was invoked on the probe. */
41
45
  get usedAsBuilder(): boolean {
42
46
  return this._usedAsBuilder;
43
47
  }
@@ -52,6 +56,11 @@ export class AddChildBuilder<TChildModel, TEvent> implements IAddChildBuilder<TC
52
56
  return this._usingKeyProperty;
53
57
  }
54
58
 
59
+ /** The parent key expression captured via `usingParentKeyFromContext()`, if any. */
60
+ get usingParentKeyProperty(): string | undefined {
61
+ return this._usingParentKeyProperty;
62
+ }
63
+
55
64
  /** The event property path captured when the probe was used as a plain accessor. */
56
65
  get capturedEventProperty(): string {
57
66
  return this._pathHandler.property;
@@ -77,10 +86,26 @@ export class AddChildBuilder<TChildModel, TEvent> implements IAddChildBuilder<TC
77
86
  return this;
78
87
  }
79
88
 
89
+ /** @inheritdoc */
90
+ usingKeyFromContext(contextPropertyName: string): IAddChildBuilder<TChildModel, TEvent> {
91
+ this._usingKeyProperty = eventContextPropertyExpression(contextPropertyName);
92
+ this._usedAsBuilder = true;
93
+ return this;
94
+ }
95
+
96
+ /** @inheritdoc */
97
+ usingParentKeyFromContext(contextPropertyName: string): IAddChildBuilder<TChildModel, TEvent> {
98
+ this._usingParentKeyProperty = eventContextPropertyExpression(contextPropertyName);
99
+ this._usedAsBuilder = true;
100
+ return this;
101
+ }
102
+
80
103
  /**
81
104
  * Proxy `get` trap: known builder members dispatch to the real implementation above;
82
105
  * anything else (a plain event property accessed by the accessor overload) falls through
83
106
  * to path-capturing so the accessor overload keeps working against the same probe.
107
+ * The builder member names are therefore reserved: an event property with one of these names
108
+ * cannot be selected through the accessor overload.
84
109
  * @param _target - The proxy's (unused) empty target object.
85
110
  * @param prop - The accessed property name.
86
111
  * @returns The resolved member.
@@ -92,6 +117,12 @@ export class AddChildBuilder<TChildModel, TEvent> implements IAddChildBuilder<TC
92
117
  if (prop === 'usingKey') {
93
118
  return this.usingKey.bind(this);
94
119
  }
120
+ if (prop === 'usingKeyFromContext') {
121
+ return this.usingKeyFromContext.bind(this);
122
+ }
123
+ if (prop === 'usingParentKeyFromContext') {
124
+ return this.usingParentKeyFromContext.bind(this);
125
+ }
95
126
  return Reflect.get(this._pathProxy as object, prop);
96
127
  }
97
128
  }