@cratis/chronicle 6.3.0 → 6.3.2

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 (921) hide show
  1. package/ChronicleClient.ts +14 -14
  2. package/ChronicleOptions.ts +3 -3
  3. package/EventStore.ts +43 -43
  4. package/IChronicleClient.ts +4 -4
  5. package/IEventStore.ts +20 -20
  6. package/artifacts/DefaultClientArtifactsProvider.ts +3 -3
  7. package/artifacts/index.ts +2 -2
  8. package/auditing/Causation.ts +1 -1
  9. package/auditing/CausationManager.ts +3 -3
  10. package/auditing/ICausationManager.ts +2 -2
  11. package/auditing/index.ts +5 -5
  12. package/compliance/ComplianceMetadata.ts +1 -1
  13. package/compliance/ComplianceMetadataResolver.ts +2 -2
  14. package/compliance/PIIManager.spec.ts +2 -2
  15. package/compliance/PIIManager.ts +2 -2
  16. package/compliance/index.ts +8 -8
  17. package/compliance/pii.spec.ts +2 -2
  18. package/compliance/pii.ts +4 -4
  19. package/compliance/subject.spec.ts +1 -1
  20. package/compliance/subject.ts +1 -1
  21. package/confidentiality/SecurityMetadata.ts +1 -1
  22. package/confidentiality/SecurityMetadataResolver.ts +2 -2
  23. package/confidentiality/encrypted.spec.ts +3 -3
  24. package/confidentiality/encrypted.ts +5 -5
  25. package/confidentiality/index.ts +7 -7
  26. package/connection/ChronicleConnection.ts +11 -11
  27. package/connection/ChronicleConnectionString.spec.ts +5 -5
  28. package/connection/ChronicleConnectionString.ts +2 -2
  29. package/connection/ChronicleServerAddressResolver.spec.ts +3 -3
  30. package/connection/ChronicleServerAddressResolver.ts +2 -2
  31. package/connection/ChronicleServices.ts +3 -3
  32. package/connection/ChronicleSrvResolver.spec.ts +2 -2
  33. package/connection/ChronicleSrvResolver.ts +2 -2
  34. package/connection/CompatibilityPreflight.ts +1 -1
  35. package/connection/ConnectionLifecycle.spec.ts +1 -1
  36. package/connection/ILoadBalancerStrategy.ts +1 -1
  37. package/connection/KernelKeepAlive.spec.ts +1 -1
  38. package/connection/LeastConnectionsLoadBalancerStrategy.spec.ts +2 -2
  39. package/connection/LeastConnectionsLoadBalancerStrategy.ts +3 -3
  40. package/connection/LoadBalancerStrategyFactory.ts +5 -5
  41. package/connection/RandomLoadBalancerStrategy.spec.ts +2 -2
  42. package/connection/RandomLoadBalancerStrategy.ts +2 -2
  43. package/connection/RoundRobinLoadBalancerStrategy.spec.ts +2 -2
  44. package/connection/RoundRobinLoadBalancerStrategy.ts +2 -2
  45. package/connection/TokenProvider.spec.ts +2 -2
  46. package/connection/TokenProvider.ts +1 -1
  47. package/connection/callResults.spec.ts +1 -1
  48. package/connection/for_ChronicleConnection/when_checking_compatibility/before_append.spec.ts +4 -4
  49. package/connection/for_CompatibilityPreflight/when_verifying/with_concurrent_calls.spec.ts +1 -1
  50. package/connection/formatServerAddress.ts +1 -1
  51. package/connection/index.ts +6 -6
  52. package/correlation/CorrelationIdManager.ts +3 -3
  53. package/correlation/ICorrelationIdAccessor.ts +1 -1
  54. package/correlation/ICorrelationIdSetter.ts +1 -1
  55. package/correlation/index.ts +5 -5
  56. package/dist/ChronicleClient.d.ts +5 -5
  57. package/dist/ChronicleClient.d.ts.map +1 -1
  58. package/dist/ChronicleClient.js +11 -11
  59. package/dist/ChronicleClient.js.map +1 -1
  60. package/dist/ChronicleOptions.d.ts +2 -2
  61. package/dist/ChronicleOptions.d.ts.map +1 -1
  62. package/dist/ChronicleOptions.js +3 -3
  63. package/dist/ChronicleOptions.js.map +1 -1
  64. package/dist/EventStore.d.ts +23 -23
  65. package/dist/EventStore.d.ts.map +1 -1
  66. package/dist/EventStore.js +22 -22
  67. package/dist/EventStore.js.map +1 -1
  68. package/dist/EventStoreName.d.ts.map +1 -1
  69. package/dist/EventStoreName.js.map +1 -1
  70. package/dist/EventStoreNamespaceName.d.ts.map +1 -1
  71. package/dist/EventStoreNamespaceName.js.map +1 -1
  72. package/dist/IChronicleClient.d.ts +4 -4
  73. package/dist/IChronicleClient.d.ts.map +1 -1
  74. package/dist/IEventStore.d.ts +20 -20
  75. package/dist/IEventStore.d.ts.map +1 -1
  76. package/dist/Metrics.d.ts.map +1 -1
  77. package/dist/artifacts/DefaultClientArtifactsProvider.d.ts +2 -2
  78. package/dist/artifacts/DefaultClientArtifactsProvider.d.ts.map +1 -1
  79. package/dist/artifacts/DefaultClientArtifactsProvider.js +2 -2
  80. package/dist/artifacts/DefaultClientArtifactsProvider.js.map +1 -1
  81. package/dist/artifacts/index.d.ts +2 -2
  82. package/dist/artifacts/index.d.ts.map +1 -1
  83. package/dist/artifacts/index.js +1 -1
  84. package/dist/artifacts/index.js.map +1 -1
  85. package/dist/auditing/Causation.d.ts +1 -1
  86. package/dist/auditing/Causation.d.ts.map +1 -1
  87. package/dist/auditing/Causation.js +1 -1
  88. package/dist/auditing/Causation.js.map +1 -1
  89. package/dist/auditing/CausationManager.d.ts +3 -3
  90. package/dist/auditing/CausationManager.d.ts.map +1 -1
  91. package/dist/auditing/CausationManager.js +2 -2
  92. package/dist/auditing/CausationManager.js.map +1 -1
  93. package/dist/auditing/CausationType.d.ts.map +1 -1
  94. package/dist/auditing/CausationType.js.map +1 -1
  95. package/dist/auditing/ICausationManager.d.ts +2 -2
  96. package/dist/auditing/ICausationManager.d.ts.map +1 -1
  97. package/dist/auditing/index.d.ts +5 -5
  98. package/dist/auditing/index.d.ts.map +1 -1
  99. package/dist/auditing/index.js +4 -4
  100. package/dist/auditing/index.js.map +1 -1
  101. package/dist/compliance/ComplianceContracts.d.ts +5 -5
  102. package/dist/compliance/ComplianceContracts.d.ts.map +1 -1
  103. package/dist/compliance/ComplianceContracts.js.map +1 -1
  104. package/dist/compliance/ComplianceMetadata.d.ts +1 -1
  105. package/dist/compliance/ComplianceMetadata.d.ts.map +1 -1
  106. package/dist/compliance/ComplianceMetadataResolver.d.ts +1 -1
  107. package/dist/compliance/ComplianceMetadataResolver.d.ts.map +1 -1
  108. package/dist/compliance/ComplianceMetadataResolver.js +1 -1
  109. package/dist/compliance/ComplianceMetadataResolver.js.map +1 -1
  110. package/dist/compliance/ComplianceMetadataType.d.ts.map +1 -1
  111. package/dist/compliance/ComplianceMetadataType.js.map +1 -1
  112. package/dist/compliance/PIIManager.d.ts +2 -2
  113. package/dist/compliance/PIIManager.d.ts.map +1 -1
  114. package/dist/compliance/PIIManager.js.map +1 -1
  115. package/dist/compliance/PIINotSupportedOnEventSourceId.d.ts.map +1 -1
  116. package/dist/compliance/index.d.ts +8 -8
  117. package/dist/compliance/index.d.ts.map +1 -1
  118. package/dist/compliance/index.js +6 -6
  119. package/dist/compliance/index.js.map +1 -1
  120. package/dist/compliance/pii.d.ts +1 -1
  121. package/dist/compliance/pii.d.ts.map +1 -1
  122. package/dist/compliance/pii.js +3 -3
  123. package/dist/compliance/pii.js.map +1 -1
  124. package/dist/compliance/subject.js +1 -1
  125. package/dist/compliance/subject.js.map +1 -1
  126. package/dist/confidentiality/EncryptedNotSupportedOnEventSourceId.d.ts.map +1 -1
  127. package/dist/confidentiality/PIIAndEncryptedCombinedNotSupported.d.ts.map +1 -1
  128. package/dist/confidentiality/SecurityMetadata.d.ts +1 -1
  129. package/dist/confidentiality/SecurityMetadata.d.ts.map +1 -1
  130. package/dist/confidentiality/SecurityMetadataResolver.d.ts +1 -1
  131. package/dist/confidentiality/SecurityMetadataResolver.d.ts.map +1 -1
  132. package/dist/confidentiality/SecurityMetadataResolver.js +1 -1
  133. package/dist/confidentiality/SecurityMetadataResolver.js.map +1 -1
  134. package/dist/confidentiality/SecurityMetadataType.d.ts.map +1 -1
  135. package/dist/confidentiality/SecurityMetadataType.js.map +1 -1
  136. package/dist/confidentiality/encrypted.d.ts +2 -2
  137. package/dist/confidentiality/encrypted.d.ts.map +1 -1
  138. package/dist/confidentiality/encrypted.js +4 -4
  139. package/dist/confidentiality/encrypted.js.map +1 -1
  140. package/dist/confidentiality/index.d.ts +7 -7
  141. package/dist/confidentiality/index.d.ts.map +1 -1
  142. package/dist/confidentiality/index.js +6 -6
  143. package/dist/confidentiality/index.js.map +1 -1
  144. package/dist/connection/ChronicleConnection.d.ts +5 -5
  145. package/dist/connection/ChronicleConnection.d.ts.map +1 -1
  146. package/dist/connection/ChronicleConnection.js +9 -9
  147. package/dist/connection/ChronicleConnection.js.map +1 -1
  148. package/dist/connection/ChronicleConnectionString.d.ts +1 -1
  149. package/dist/connection/ChronicleConnectionString.d.ts.map +1 -1
  150. package/dist/connection/ChronicleConnectionString.js +2 -2
  151. package/dist/connection/ChronicleConnectionString.js.map +1 -1
  152. package/dist/connection/ChronicleServerAddressResolver.d.ts +2 -2
  153. package/dist/connection/ChronicleServerAddressResolver.d.ts.map +1 -1
  154. package/dist/connection/ChronicleServerAddressResolver.js +1 -1
  155. package/dist/connection/ChronicleServerAddressResolver.js.map +1 -1
  156. package/dist/connection/ChronicleServices.d.ts +3 -3
  157. package/dist/connection/ChronicleServices.d.ts.map +1 -1
  158. package/dist/connection/ChronicleSrvResolutionError.d.ts.map +1 -1
  159. package/dist/connection/ChronicleSrvResolver.d.ts +1 -1
  160. package/dist/connection/ChronicleSrvResolver.d.ts.map +1 -1
  161. package/dist/connection/ChronicleSrvResolver.js +1 -1
  162. package/dist/connection/ChronicleSrvResolver.js.map +1 -1
  163. package/dist/connection/CompatibilityPreflight.d.ts.map +1 -1
  164. package/dist/connection/CompatibilityPreflight.js +1 -1
  165. package/dist/connection/CompatibilityPreflight.js.map +1 -1
  166. package/dist/connection/ConnectionLifecycle.d.ts.map +1 -1
  167. package/dist/connection/ILoadBalancerStrategy.d.ts +1 -1
  168. package/dist/connection/ILoadBalancerStrategy.d.ts.map +1 -1
  169. package/dist/connection/IncompatibleChronicleServer.d.ts.map +1 -1
  170. package/dist/connection/KernelKeepAlive.d.ts.map +1 -1
  171. package/dist/connection/KernelKeepAlive.js.map +1 -1
  172. package/dist/connection/LeastConnectionsLoadBalancerStrategy.d.ts +2 -2
  173. package/dist/connection/LeastConnectionsLoadBalancerStrategy.d.ts.map +1 -1
  174. package/dist/connection/LeastConnectionsLoadBalancerStrategy.js +1 -1
  175. package/dist/connection/LeastConnectionsLoadBalancerStrategy.js.map +1 -1
  176. package/dist/connection/LoadBalancerStrategyFactory.d.ts +2 -2
  177. package/dist/connection/LoadBalancerStrategyFactory.d.ts.map +1 -1
  178. package/dist/connection/LoadBalancerStrategyFactory.js +4 -4
  179. package/dist/connection/LoadBalancerStrategyFactory.js.map +1 -1
  180. package/dist/connection/RandomLoadBalancerStrategy.d.ts +2 -2
  181. package/dist/connection/RandomLoadBalancerStrategy.d.ts.map +1 -1
  182. package/dist/connection/RoundRobinLoadBalancerStrategy.d.ts +2 -2
  183. package/dist/connection/RoundRobinLoadBalancerStrategy.d.ts.map +1 -1
  184. package/dist/connection/TokenProvider.d.ts +1 -1
  185. package/dist/connection/TokenProvider.d.ts.map +1 -1
  186. package/dist/connection/TokenProvider.js +1 -1
  187. package/dist/connection/TokenProvider.js.map +1 -1
  188. package/dist/connection/callResults.d.ts.map +1 -1
  189. package/dist/connection/formatServerAddress.d.ts +1 -1
  190. package/dist/connection/formatServerAddress.d.ts.map +1 -1
  191. package/dist/connection/index.d.ts +6 -6
  192. package/dist/connection/index.d.ts.map +1 -1
  193. package/dist/connection/index.js +4 -4
  194. package/dist/connection/index.js.map +1 -1
  195. package/dist/correlation/CorrelationId.d.ts.map +1 -1
  196. package/dist/correlation/CorrelationId.js.map +1 -1
  197. package/dist/correlation/CorrelationIdManager.d.ts +3 -3
  198. package/dist/correlation/CorrelationIdManager.d.ts.map +1 -1
  199. package/dist/correlation/CorrelationIdManager.js +1 -1
  200. package/dist/correlation/CorrelationIdManager.js.map +1 -1
  201. package/dist/correlation/ICorrelationIdAccessor.d.ts +1 -1
  202. package/dist/correlation/ICorrelationIdAccessor.d.ts.map +1 -1
  203. package/dist/correlation/ICorrelationIdSetter.d.ts +1 -1
  204. package/dist/correlation/ICorrelationIdSetter.d.ts.map +1 -1
  205. package/dist/correlation/index.d.ts +5 -5
  206. package/dist/correlation/index.d.ts.map +1 -1
  207. package/dist/correlation/index.js +3 -3
  208. package/dist/correlation/index.js.map +1 -1
  209. package/dist/eventSequences/AppendOperationsBroadcaster.d.ts.map +1 -1
  210. package/dist/eventSequences/AppendOptions.d.ts +2 -2
  211. package/dist/eventSequences/AppendOptions.d.ts.map +1 -1
  212. package/dist/eventSequences/AppendResult.d.ts +5 -5
  213. package/dist/eventSequences/AppendResult.d.ts.map +1 -1
  214. package/dist/eventSequences/AppendedEventWithResult.d.ts +2 -2
  215. package/dist/eventSequences/AppendedEventWithResult.d.ts.map +1 -1
  216. package/dist/eventSequences/CompleteStreamResult.d.ts +2 -2
  217. package/dist/eventSequences/CompleteStreamResult.d.ts.map +1 -1
  218. package/dist/eventSequences/ConcurrencyScope.d.ts +1 -1
  219. package/dist/eventSequences/ConcurrencyScope.d.ts.map +1 -1
  220. package/dist/eventSequences/ConcurrencyViolation.d.ts +1 -1
  221. package/dist/eventSequences/ConcurrencyViolation.d.ts.map +1 -1
  222. package/dist/eventSequences/EventForEventSourceId.d.ts +1 -1
  223. package/dist/eventSequences/EventForEventSourceId.d.ts.map +1 -1
  224. package/dist/eventSequences/EventLog.d.ts +4 -4
  225. package/dist/eventSequences/EventLog.d.ts.map +1 -1
  226. package/dist/eventSequences/EventLog.js +2 -2
  227. package/dist/eventSequences/EventLog.js.map +1 -1
  228. package/dist/eventSequences/EventSequence.d.ts +13 -13
  229. package/dist/eventSequences/EventSequence.d.ts.map +1 -1
  230. package/dist/eventSequences/EventSequence.js +30 -20
  231. package/dist/eventSequences/EventSequence.js.map +1 -1
  232. package/dist/eventSequences/EventSequenceId.d.ts.map +1 -1
  233. package/dist/eventSequences/EventSequenceId.js.map +1 -1
  234. package/dist/eventSequences/EventSequenceNumber.d.ts.map +1 -1
  235. package/dist/eventSequences/EventSequenceNumber.js.map +1 -1
  236. package/dist/eventSequences/IEventLog.d.ts +1 -1
  237. package/dist/eventSequences/IEventLog.d.ts.map +1 -1
  238. package/dist/eventSequences/IEventSequence.d.ts +9 -9
  239. package/dist/eventSequences/IEventSequence.d.ts.map +1 -1
  240. package/dist/eventSequences/ITransactionalEventSequence.d.ts +1 -1
  241. package/dist/eventSequences/ITransactionalEventSequence.d.ts.map +1 -1
  242. package/dist/eventSequences/TransactionalEventSequence.d.ts +4 -4
  243. package/dist/eventSequences/TransactionalEventSequence.d.ts.map +1 -1
  244. package/dist/eventSequences/TransactionalEventSequence.js.map +1 -1
  245. package/dist/eventSequences/WaitForCompletionResult.d.ts +1 -1
  246. package/dist/eventSequences/WaitForCompletionResult.d.ts.map +1 -1
  247. package/dist/eventSequences/index.d.ts +19 -19
  248. package/dist/eventSequences/index.d.ts.map +1 -1
  249. package/dist/eventSequences/index.js +6 -6
  250. package/dist/eventSequences/index.js.map +1 -1
  251. package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.d.ts +4 -4
  252. package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.d.ts.map +1 -1
  253. package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.js +2 -2
  254. package/dist/eventStoreSubscriptions/EventStoreSubscriptionBuilder.js.map +1 -1
  255. package/dist/eventStoreSubscriptions/EventStoreSubscriptionDefinition.d.ts +2 -2
  256. package/dist/eventStoreSubscriptions/EventStoreSubscriptionDefinition.d.ts.map +1 -1
  257. package/dist/eventStoreSubscriptions/EventStoreSubscriptionDefinition.js.map +1 -1
  258. package/dist/eventStoreSubscriptions/EventStoreSubscriptionId.d.ts.map +1 -1
  259. package/dist/eventStoreSubscriptions/EventStoreSubscriptionId.js.map +1 -1
  260. package/dist/eventStoreSubscriptions/EventStoreSubscriptions.d.ts +7 -7
  261. package/dist/eventStoreSubscriptions/EventStoreSubscriptions.d.ts.map +1 -1
  262. package/dist/eventStoreSubscriptions/EventStoreSubscriptions.js +4 -4
  263. package/dist/eventStoreSubscriptions/EventStoreSubscriptions.js.map +1 -1
  264. package/dist/eventStoreSubscriptions/IEventStoreSubscriptionBuilder.d.ts +2 -2
  265. package/dist/eventStoreSubscriptions/IEventStoreSubscriptionBuilder.d.ts.map +1 -1
  266. package/dist/eventStoreSubscriptions/IEventStoreSubscriptions.d.ts +4 -4
  267. package/dist/eventStoreSubscriptions/IEventStoreSubscriptions.d.ts.map +1 -1
  268. package/dist/eventStoreSubscriptions/contracts.d.ts +5 -5
  269. package/dist/eventStoreSubscriptions/contracts.d.ts.map +1 -1
  270. package/dist/eventStoreSubscriptions/contracts.js.map +1 -1
  271. package/dist/eventStoreSubscriptions/index.d.ts +6 -6
  272. package/dist/eventStoreSubscriptions/index.d.ts.map +1 -1
  273. package/dist/eventStoreSubscriptions/index.js +4 -4
  274. package/dist/eventStoreSubscriptions/index.js.map +1 -1
  275. package/dist/events/AppendedEvent.d.ts +2 -2
  276. package/dist/events/AppendedEvent.d.ts.map +1 -1
  277. package/dist/events/EventContext.d.ts +4 -4
  278. package/dist/events/EventContext.d.ts.map +1 -1
  279. package/dist/events/EventType.d.ts +2 -2
  280. package/dist/events/EventType.d.ts.map +1 -1
  281. package/dist/events/EventType.js +2 -2
  282. package/dist/events/EventType.js.map +1 -1
  283. package/dist/events/EventTypeGeneration.d.ts.map +1 -1
  284. package/dist/events/EventTypeGeneration.js.map +1 -1
  285. package/dist/events/EventTypeId.d.ts.map +1 -1
  286. package/dist/events/EventTypeId.js.map +1 -1
  287. package/dist/events/EventTypes.d.ts +4 -4
  288. package/dist/events/EventTypes.d.ts.map +1 -1
  289. package/dist/events/EventTypes.js +5 -5
  290. package/dist/events/EventTypes.js.map +1 -1
  291. package/dist/events/IEventTypes.d.ts +1 -1
  292. package/dist/events/IEventTypes.d.ts.map +1 -1
  293. package/dist/events/Tag.d.ts.map +1 -1
  294. package/dist/events/Tag.js.map +1 -1
  295. package/dist/events/constraints/ConstraintBuilder.d.ts +3 -3
  296. package/dist/events/constraints/ConstraintBuilder.d.ts.map +1 -1
  297. package/dist/events/constraints/ConstraintBuilder.js +2 -2
  298. package/dist/events/constraints/ConstraintBuilder.js.map +1 -1
  299. package/dist/events/constraints/ConstraintId.d.ts.map +1 -1
  300. package/dist/events/constraints/ConstraintId.js.map +1 -1
  301. package/dist/events/constraints/Constraints.d.ts +4 -4
  302. package/dist/events/constraints/Constraints.d.ts.map +1 -1
  303. package/dist/events/constraints/Constraints.js +8 -3
  304. package/dist/events/constraints/Constraints.js.map +1 -1
  305. package/dist/events/constraints/IConstraint.d.ts +1 -1
  306. package/dist/events/constraints/IConstraint.d.ts.map +1 -1
  307. package/dist/events/constraints/IConstraintBuilder.d.ts +1 -1
  308. package/dist/events/constraints/IConstraintBuilder.d.ts.map +1 -1
  309. package/dist/events/constraints/IConstraints.d.ts +1 -1
  310. package/dist/events/constraints/IConstraints.d.ts.map +1 -1
  311. package/dist/events/constraints/IUniqueConstraintBuilder.d.ts +2 -1
  312. package/dist/events/constraints/IUniqueConstraintBuilder.d.ts.map +1 -1
  313. package/dist/events/constraints/UniqueConstraintBuilder.d.ts +4 -1
  314. package/dist/events/constraints/UniqueConstraintBuilder.d.ts.map +1 -1
  315. package/dist/events/constraints/UniqueConstraintBuilder.js +8 -3
  316. package/dist/events/constraints/UniqueConstraintBuilder.js.map +1 -1
  317. package/dist/events/constraints/constraint.d.ts +1 -1
  318. package/dist/events/constraints/constraint.d.ts.map +1 -1
  319. package/dist/events/constraints/constraint.js +2 -2
  320. package/dist/events/constraints/constraint.js.map +1 -1
  321. package/dist/events/constraints/index.d.ts +12 -12
  322. package/dist/events/constraints/index.d.ts.map +1 -1
  323. package/dist/events/constraints/index.js +5 -5
  324. package/dist/events/constraints/index.js.map +1 -1
  325. package/dist/events/eventTypeDecorator.d.ts +2 -2
  326. package/dist/events/eventTypeDecorator.d.ts.map +1 -1
  327. package/dist/events/eventTypeDecorator.js +5 -5
  328. package/dist/events/eventTypeDecorator.js.map +1 -1
  329. package/dist/events/filterEventsByTagDecorator.d.ts +1 -1
  330. package/dist/events/filterEventsByTagDecorator.d.ts.map +1 -1
  331. package/dist/events/filterEventsByTagDecorator.js +2 -2
  332. package/dist/events/filterEventsByTagDecorator.js.map +1 -1
  333. package/dist/events/index.d.ts +16 -16
  334. package/dist/events/index.d.ts.map +1 -1
  335. package/dist/events/index.js +11 -11
  336. package/dist/events/index.js.map +1 -1
  337. package/dist/events/mergeTags.d.ts +1 -1
  338. package/dist/events/mergeTags.d.ts.map +1 -1
  339. package/dist/events/migrations/EventMigrationBuilder.d.ts +2 -2
  340. package/dist/events/migrations/EventMigrationBuilder.d.ts.map +1 -1
  341. package/dist/events/migrations/EventMigrationBuilder.js +1 -1
  342. package/dist/events/migrations/EventMigrationBuilder.js.map +1 -1
  343. package/dist/events/migrations/EventMigrationPropertyBuilder.d.ts +1 -1
  344. package/dist/events/migrations/EventMigrationPropertyBuilder.d.ts.map +1 -1
  345. package/dist/events/migrations/EventTypeMigrators.d.ts +2 -2
  346. package/dist/events/migrations/EventTypeMigrators.d.ts.map +1 -1
  347. package/dist/events/migrations/EventTypeMigrators.js +2 -2
  348. package/dist/events/migrations/EventTypeMigrators.js.map +1 -1
  349. package/dist/events/migrations/IEventMigrationBuilder.d.ts +1 -1
  350. package/dist/events/migrations/IEventMigrationBuilder.d.ts.map +1 -1
  351. package/dist/events/migrations/IEventTypeMigration.d.ts +1 -1
  352. package/dist/events/migrations/IEventTypeMigration.d.ts.map +1 -1
  353. package/dist/events/migrations/InvalidMigrationGenerationGap.d.ts.map +1 -1
  354. package/dist/events/migrations/eventTypeMigration.d.ts +1 -1
  355. package/dist/events/migrations/eventTypeMigration.d.ts.map +1 -1
  356. package/dist/events/migrations/eventTypeMigration.js +3 -3
  357. package/dist/events/migrations/eventTypeMigration.js.map +1 -1
  358. package/dist/events/migrations/index.d.ts +10 -10
  359. package/dist/events/migrations/index.d.ts.map +1 -1
  360. package/dist/events/migrations/index.js +5 -5
  361. package/dist/events/migrations/index.js.map +1 -1
  362. package/dist/events/tagDecorator.d.ts +1 -1
  363. package/dist/events/tagDecorator.d.ts.map +1 -1
  364. package/dist/events/tagDecorator.js +2 -2
  365. package/dist/events/tagDecorator.js.map +1 -1
  366. package/dist/events/toClientEventContext.d.ts +2 -2
  367. package/dist/events/toClientEventContext.d.ts.map +1 -1
  368. package/dist/events/toClientEventContext.js +6 -6
  369. package/dist/events/toClientEventContext.js.map +1 -1
  370. package/dist/externalServices/ExternalServiceBuilder.d.ts +2 -2
  371. package/dist/externalServices/ExternalServiceBuilder.d.ts.map +1 -1
  372. package/dist/externalServices/ExternalServiceBuilder.js +1 -1
  373. package/dist/externalServices/ExternalServiceBuilder.js.map +1 -1
  374. package/dist/externalServices/ExternalServices.d.ts +3 -3
  375. package/dist/externalServices/ExternalServices.d.ts.map +1 -1
  376. package/dist/externalServices/ExternalServices.js +1 -1
  377. package/dist/externalServices/ExternalServices.js.map +1 -1
  378. package/dist/externalServices/ExternalServicesContracts.d.ts +3 -3
  379. package/dist/externalServices/ExternalServicesContracts.d.ts.map +1 -1
  380. package/dist/externalServices/ExternalServicesContracts.js.map +1 -1
  381. package/dist/externalServices/IExternalServices.d.ts +1 -1
  382. package/dist/externalServices/IExternalServices.d.ts.map +1 -1
  383. package/dist/externalServices/index.d.ts +4 -4
  384. package/dist/externalServices/index.d.ts.map +1 -1
  385. package/dist/externalServices/index.js +2 -2
  386. package/dist/externalServices/index.js.map +1 -1
  387. package/dist/identities/IdentityManager.d.ts +2 -2
  388. package/dist/identities/IdentityManager.d.ts.map +1 -1
  389. package/dist/identities/IdentityManager.js.map +1 -1
  390. package/dist/identities/index.d.ts +2 -2
  391. package/dist/identities/index.d.ts.map +1 -1
  392. package/dist/identities/index.js +1 -1
  393. package/dist/identities/index.js.map +1 -1
  394. package/dist/identity/IIdentityProvider.d.ts +1 -1
  395. package/dist/identity/IIdentityProvider.d.ts.map +1 -1
  396. package/dist/identity/Identity.d.ts.map +1 -1
  397. package/dist/identity/Identity.js.map +1 -1
  398. package/dist/identity/IdentityProvider.d.ts +2 -2
  399. package/dist/identity/IdentityProvider.d.ts.map +1 -1
  400. package/dist/identity/IdentityProvider.js +1 -1
  401. package/dist/identity/IdentityProvider.js.map +1 -1
  402. package/dist/identity/index.d.ts +4 -4
  403. package/dist/identity/index.d.ts.map +1 -1
  404. package/dist/identity/index.js +3 -3
  405. package/dist/identity/index.js.map +1 -1
  406. package/dist/index.d.ts +56 -56
  407. package/dist/index.d.ts.map +1 -1
  408. package/dist/index.js +54 -54
  409. package/dist/index.js.map +1 -1
  410. package/dist/jobs/IJobs.d.ts +1 -1
  411. package/dist/jobs/IJobs.d.ts.map +1 -1
  412. package/dist/jobs/JobId.d.ts.map +1 -1
  413. package/dist/jobs/JobId.js.map +1 -1
  414. package/dist/jobs/Jobs.d.ts +3 -3
  415. package/dist/jobs/Jobs.d.ts.map +1 -1
  416. package/dist/jobs/Jobs.js +3 -3
  417. package/dist/jobs/Jobs.js.map +1 -1
  418. package/dist/jobs/index.d.ts +3 -3
  419. package/dist/jobs/index.d.ts.map +1 -1
  420. package/dist/jobs/index.js +2 -2
  421. package/dist/jobs/index.js.map +1 -1
  422. package/dist/observation/FailedPartition.d.ts +1 -1
  423. package/dist/observation/FailedPartition.d.ts.map +1 -1
  424. package/dist/observation/FailedPartitionAttempt.d.ts +1 -1
  425. package/dist/observation/FailedPartitionAttempt.d.ts.map +1 -1
  426. package/dist/observation/FailedPartitions.d.ts +3 -3
  427. package/dist/observation/FailedPartitions.d.ts.map +1 -1
  428. package/dist/observation/FailedPartitions.js +1 -1
  429. package/dist/observation/FailedPartitions.js.map +1 -1
  430. package/dist/observation/IFailedPartitions.d.ts +1 -1
  431. package/dist/observation/IFailedPartitions.d.ts.map +1 -1
  432. package/dist/observation/ObserverId.d.ts.map +1 -1
  433. package/dist/observation/ObserverId.js.map +1 -1
  434. package/dist/observation/index.d.ts +9 -9
  435. package/dist/observation/index.d.ts.map +1 -1
  436. package/dist/observation/index.js +4 -4
  437. package/dist/observation/index.js.map +1 -1
  438. package/dist/observation/toClientFailedPartition.d.ts +1 -1
  439. package/dist/observation/toClientFailedPartition.d.ts.map +1 -1
  440. package/dist/observation/toClientFailedPartition.js +2 -2
  441. package/dist/observation/toClientFailedPartition.js.map +1 -1
  442. package/dist/observation/toObserverRunningState.d.ts +1 -1
  443. package/dist/observation/toObserverRunningState.d.ts.map +1 -1
  444. package/dist/observation/toObserverRunningState.js +1 -1
  445. package/dist/observation/toObserverRunningState.js.map +1 -1
  446. package/dist/projections/GlobalHandlerPropertyNotOnVariant.d.ts.map +1 -1
  447. package/dist/projections/IProjections.d.ts +5 -5
  448. package/dist/projections/IProjections.d.ts.map +1 -1
  449. package/dist/projections/ProjectionId.d.ts.map +1 -1
  450. package/dist/projections/ProjectionId.js.map +1 -1
  451. package/dist/projections/ProjectionState.d.ts +2 -2
  452. package/dist/projections/ProjectionState.d.ts.map +1 -1
  453. package/dist/projections/Projections.d.ts +8 -8
  454. package/dist/projections/Projections.d.ts.map +1 -1
  455. package/dist/projections/Projections.js +31 -31
  456. package/dist/projections/Projections.js.map +1 -1
  457. package/dist/projections/UnableToQueryProjection.d.ts.map +1 -1
  458. package/dist/projections/VariantMustDeclareEntersOnEvent.d.ts.map +1 -1
  459. package/dist/projections/VariantReclassifier.d.ts +1 -1
  460. package/dist/projections/VariantReclassifier.d.ts.map +1 -1
  461. package/dist/projections/VariantReclassifier.js +2 -2
  462. package/dist/projections/VariantReclassifier.js.map +1 -1
  463. package/dist/projections/declarative/AddBuilder.d.ts +1 -1
  464. package/dist/projections/declarative/AddBuilder.d.ts.map +1 -1
  465. package/dist/projections/declarative/AddBuilder.js.map +1 -1
  466. package/dist/projections/declarative/AddChildBuilder.d.ts +1 -1
  467. package/dist/projections/declarative/AddChildBuilder.d.ts.map +1 -1
  468. package/dist/projections/declarative/AllSetBuilder.d.ts +1 -1
  469. package/dist/projections/declarative/AllSetBuilder.d.ts.map +1 -1
  470. package/dist/projections/declarative/AllSetBuilder.js.map +1 -1
  471. package/dist/projections/declarative/ChildrenBuilder.d.ts +3 -3
  472. package/dist/projections/declarative/ChildrenBuilder.d.ts.map +1 -1
  473. package/dist/projections/declarative/ChildrenBuilder.js +2 -2
  474. package/dist/projections/declarative/ChildrenBuilder.js.map +1 -1
  475. package/dist/projections/declarative/CompositeKeyBuilder.d.ts +1 -1
  476. package/dist/projections/declarative/CompositeKeyBuilder.d.ts.map +1 -1
  477. package/dist/projections/declarative/FromBuilder.d.ts +7 -7
  478. package/dist/projections/declarative/FromBuilder.d.ts.map +1 -1
  479. package/dist/projections/declarative/FromBuilder.js +5 -5
  480. package/dist/projections/declarative/FromBuilder.js.map +1 -1
  481. package/dist/projections/declarative/FromEveryBuilder.d.ts +2 -2
  482. package/dist/projections/declarative/FromEveryBuilder.d.ts.map +1 -1
  483. package/dist/projections/declarative/FromEveryBuilder.js +1 -1
  484. package/dist/projections/declarative/FromEveryBuilder.js.map +1 -1
  485. package/dist/projections/declarative/IChildrenBuilder.d.ts +1 -1
  486. package/dist/projections/declarative/IChildrenBuilder.d.ts.map +1 -1
  487. package/dist/projections/declarative/IFromBuilder.d.ts +1 -1
  488. package/dist/projections/declarative/IFromBuilder.d.ts.map +1 -1
  489. package/dist/projections/declarative/IFromEveryBuilder.d.ts +1 -1
  490. package/dist/projections/declarative/IFromEveryBuilder.d.ts.map +1 -1
  491. package/dist/projections/declarative/IJoinBuilder.d.ts +1 -1
  492. package/dist/projections/declarative/IJoinBuilder.d.ts.map +1 -1
  493. package/dist/projections/declarative/INestedBuilder.d.ts +1 -1
  494. package/dist/projections/declarative/INestedBuilder.d.ts.map +1 -1
  495. package/dist/projections/declarative/IProjectionBuilder.d.ts +7 -7
  496. package/dist/projections/declarative/IProjectionBuilder.d.ts.map +1 -1
  497. package/dist/projections/declarative/IProjectionBuilderFor.d.ts +1 -1
  498. package/dist/projections/declarative/IProjectionBuilderFor.d.ts.map +1 -1
  499. package/dist/projections/declarative/IProjectionFor.d.ts +1 -1
  500. package/dist/projections/declarative/IProjectionFor.d.ts.map +1 -1
  501. package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts +5 -5
  502. package/dist/projections/declarative/IReadModelPropertiesBuilder.d.ts.map +1 -1
  503. package/dist/projections/declarative/JoinBuilder.d.ts +7 -7
  504. package/dist/projections/declarative/JoinBuilder.d.ts.map +1 -1
  505. package/dist/projections/declarative/JoinBuilder.js +5 -5
  506. package/dist/projections/declarative/JoinBuilder.js.map +1 -1
  507. package/dist/projections/declarative/NestedBuilder.d.ts +3 -3
  508. package/dist/projections/declarative/NestedBuilder.d.ts.map +1 -1
  509. package/dist/projections/declarative/NestedBuilder.js +2 -2
  510. package/dist/projections/declarative/NestedBuilder.js.map +1 -1
  511. package/dist/projections/declarative/ProjectionBuilderCore.d.ts +5 -5
  512. package/dist/projections/declarative/ProjectionBuilderCore.d.ts.map +1 -1
  513. package/dist/projections/declarative/ProjectionBuilderCore.js +6 -6
  514. package/dist/projections/declarative/ProjectionBuilderCore.js.map +1 -1
  515. package/dist/projections/declarative/ProjectionBuilderFor.d.ts +4 -4
  516. package/dist/projections/declarative/ProjectionBuilderFor.d.ts.map +1 -1
  517. package/dist/projections/declarative/ProjectionBuilderFor.js +4 -4
  518. package/dist/projections/declarative/ProjectionBuilderFor.js.map +1 -1
  519. package/dist/projections/declarative/RemovedWithBuilder.d.ts +1 -1
  520. package/dist/projections/declarative/RemovedWithBuilder.d.ts.map +1 -1
  521. package/dist/projections/declarative/RemovedWithJoinBuilder.d.ts +1 -1
  522. package/dist/projections/declarative/RemovedWithJoinBuilder.d.ts.map +1 -1
  523. package/dist/projections/declarative/SetBuilder.d.ts +1 -1
  524. package/dist/projections/declarative/SetBuilder.d.ts.map +1 -1
  525. package/dist/projections/declarative/SetBuilder.js.map +1 -1
  526. package/dist/projections/declarative/SubtractBuilder.d.ts +1 -1
  527. package/dist/projections/declarative/SubtractBuilder.d.ts.map +1 -1
  528. package/dist/projections/declarative/SubtractBuilder.js.map +1 -1
  529. package/dist/projections/declarative/index.d.ts +32 -32
  530. package/dist/projections/declarative/index.d.ts.map +1 -1
  531. package/dist/projections/declarative/index.js +13 -13
  532. package/dist/projections/declarative/index.js.map +1 -1
  533. package/dist/projections/declarative/projection.d.ts +1 -1
  534. package/dist/projections/declarative/projection.d.ts.map +1 -1
  535. package/dist/projections/declarative/projection.js +2 -2
  536. package/dist/projections/declarative/projection.js.map +1 -1
  537. package/dist/projections/index.d.ts +10 -10
  538. package/dist/projections/index.d.ts.map +1 -1
  539. package/dist/projections/index.js +7 -7
  540. package/dist/projections/index.js.map +1 -1
  541. package/dist/projections/modelBound/FromEventMetadata.d.ts +1 -1
  542. package/dist/projections/modelBound/FromEventMetadata.d.ts.map +1 -1
  543. package/dist/projections/modelBound/addFrom.js +1 -1
  544. package/dist/projections/modelBound/addFrom.js.map +1 -1
  545. package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts +1 -1
  546. package/dist/projections/modelBound/childrenAndNestedBuilder.d.ts.map +1 -1
  547. package/dist/projections/modelBound/childrenAndNestedBuilder.js +16 -16
  548. package/dist/projections/modelBound/childrenAndNestedBuilder.js.map +1 -1
  549. package/dist/projections/modelBound/childrenFrom.js +1 -1
  550. package/dist/projections/modelBound/childrenFrom.js.map +1 -1
  551. package/dist/projections/modelBound/clearWith.js +1 -1
  552. package/dist/projections/modelBound/clearWith.js.map +1 -1
  553. package/dist/projections/modelBound/count.js +1 -1
  554. package/dist/projections/modelBound/count.js.map +1 -1
  555. package/dist/projections/modelBound/decrement.js +1 -1
  556. package/dist/projections/modelBound/decrement.js.map +1 -1
  557. package/dist/projections/modelBound/eventSequence.js +1 -1
  558. package/dist/projections/modelBound/eventSequence.js.map +1 -1
  559. package/dist/projections/modelBound/fromAll.js +1 -1
  560. package/dist/projections/modelBound/fromAll.js.map +1 -1
  561. package/dist/projections/modelBound/fromEvent.d.ts +2 -2
  562. package/dist/projections/modelBound/fromEvent.d.ts.map +1 -1
  563. package/dist/projections/modelBound/fromEvery.js +1 -1
  564. package/dist/projections/modelBound/fromEvery.js.map +1 -1
  565. package/dist/projections/modelBound/globalFor.js +1 -1
  566. package/dist/projections/modelBound/globalFor.js.map +1 -1
  567. package/dist/projections/modelBound/increment.js +1 -1
  568. package/dist/projections/modelBound/increment.js.map +1 -1
  569. package/dist/projections/modelBound/index.d.ts +44 -44
  570. package/dist/projections/modelBound/index.d.ts.map +1 -1
  571. package/dist/projections/modelBound/index.js +24 -24
  572. package/dist/projections/modelBound/index.js.map +1 -1
  573. package/dist/projections/modelBound/join.js +1 -1
  574. package/dist/projections/modelBound/join.js.map +1 -1
  575. package/dist/projections/modelBound/nested.js +1 -1
  576. package/dist/projections/modelBound/nested.js.map +1 -1
  577. package/dist/projections/modelBound/noAutoMap.js +1 -1
  578. package/dist/projections/modelBound/noAutoMap.js.map +1 -1
  579. package/dist/projections/modelBound/removedWith.js +1 -1
  580. package/dist/projections/modelBound/removedWith.js.map +1 -1
  581. package/dist/projections/modelBound/removedWithJoin.js +1 -1
  582. package/dist/projections/modelBound/removedWithJoin.js.map +1 -1
  583. package/dist/projections/modelBound/setFrom.js +1 -1
  584. package/dist/projections/modelBound/setFrom.js.map +1 -1
  585. package/dist/projections/modelBound/setFromContext.d.ts +1 -1
  586. package/dist/projections/modelBound/setFromContext.d.ts.map +1 -1
  587. package/dist/projections/modelBound/setFromContext.js +1 -1
  588. package/dist/projections/modelBound/setFromContext.js.map +1 -1
  589. package/dist/projections/modelBound/setValue.js +1 -1
  590. package/dist/projections/modelBound/setValue.js.map +1 -1
  591. package/dist/projections/modelBound/subtractFrom.js +1 -1
  592. package/dist/projections/modelBound/subtractFrom.js.map +1 -1
  593. package/dist/reactors/ReactorId.d.ts.map +1 -1
  594. package/dist/reactors/ReactorId.js.map +1 -1
  595. package/dist/reactors/ReactorSideEffects.d.ts +1 -1
  596. package/dist/reactors/ReactorSideEffects.d.ts.map +1 -1
  597. package/dist/reactors/ReactorSideEffects.js +1 -1
  598. package/dist/reactors/ReactorSideEffects.js.map +1 -1
  599. package/dist/reactors/Reactors.d.ts +5 -5
  600. package/dist/reactors/Reactors.d.ts.map +1 -1
  601. package/dist/reactors/Reactors.js +8 -8
  602. package/dist/reactors/Reactors.js.map +1 -1
  603. package/dist/reactors/index.d.ts +5 -5
  604. package/dist/reactors/index.d.ts.map +1 -1
  605. package/dist/reactors/index.js +3 -3
  606. package/dist/reactors/index.js.map +1 -1
  607. package/dist/reactors/reactor.d.ts +1 -1
  608. package/dist/reactors/reactor.d.ts.map +1 -1
  609. package/dist/reactors/reactor.js +2 -2
  610. package/dist/reactors/reactor.js.map +1 -1
  611. package/dist/readModels/IReadModels.d.ts +3 -3
  612. package/dist/readModels/IReadModels.d.ts.map +1 -1
  613. package/dist/readModels/MaterializedReadModels.d.ts +2 -2
  614. package/dist/readModels/MaterializedReadModels.d.ts.map +1 -1
  615. package/dist/readModels/MaterializedReadModels.js +3 -3
  616. package/dist/readModels/MaterializedReadModels.js.map +1 -1
  617. package/dist/readModels/ReadModelId.d.ts.map +1 -1
  618. package/dist/readModels/ReadModelId.js.map +1 -1
  619. package/dist/readModels/ReadModelSubjectResolver.d.ts.map +1 -1
  620. package/dist/readModels/ReadModelSubjectResolver.js +1 -1
  621. package/dist/readModels/ReadModelSubjectResolver.js.map +1 -1
  622. package/dist/readModels/ReadModels.d.ts +6 -6
  623. package/dist/readModels/ReadModels.d.ts.map +1 -1
  624. package/dist/readModels/ReadModels.js +12 -12
  625. package/dist/readModels/ReadModels.js.map +1 -1
  626. package/dist/readModels/index.d.ts +10 -10
  627. package/dist/readModels/index.d.ts.map +1 -1
  628. package/dist/readModels/index.js +5 -5
  629. package/dist/readModels/index.js.map +1 -1
  630. package/dist/readModels/readModel.d.ts +2 -2
  631. package/dist/readModels/readModel.d.ts.map +1 -1
  632. package/dist/readModels/readModel.js +3 -3
  633. package/dist/readModels/readModel.js.map +1 -1
  634. package/dist/reducers/ReducerId.d.ts.map +1 -1
  635. package/dist/reducers/ReducerId.js.map +1 -1
  636. package/dist/reducers/Reducers.d.ts +4 -4
  637. package/dist/reducers/Reducers.d.ts.map +1 -1
  638. package/dist/reducers/Reducers.js +10 -10
  639. package/dist/reducers/Reducers.js.map +1 -1
  640. package/dist/reducers/index.d.ts +5 -5
  641. package/dist/reducers/index.d.ts.map +1 -1
  642. package/dist/reducers/index.js +3 -3
  643. package/dist/reducers/index.js.map +1 -1
  644. package/dist/reducers/reducer.d.ts +1 -1
  645. package/dist/reducers/reducer.d.ts.map +1 -1
  646. package/dist/reducers/reducer.js +2 -2
  647. package/dist/reducers/reducer.js.map +1 -1
  648. package/dist/schemas/JsonSchemaGenerator.d.ts +1 -1
  649. package/dist/schemas/JsonSchemaGenerator.d.ts.map +1 -1
  650. package/dist/schemas/JsonSchemaGenerator.js +4 -4
  651. package/dist/schemas/JsonSchemaGenerator.js.map +1 -1
  652. package/dist/schemas/index.d.ts +3 -3
  653. package/dist/schemas/index.d.ts.map +1 -1
  654. package/dist/schemas/index.js +2 -2
  655. package/dist/schemas/index.js.map +1 -1
  656. package/dist/schemas/jsonSchemaProperty.js +1 -1
  657. package/dist/schemas/jsonSchemaProperty.js.map +1 -1
  658. package/dist/seeding/EventSeeding.d.ts +6 -6
  659. package/dist/seeding/EventSeeding.d.ts.map +1 -1
  660. package/dist/seeding/EventSeeding.js +4 -4
  661. package/dist/seeding/EventSeeding.js.map +1 -1
  662. package/dist/seeding/ICanSeedEvents.d.ts +1 -1
  663. package/dist/seeding/ICanSeedEvents.d.ts.map +1 -1
  664. package/dist/seeding/IEventSeeding.d.ts +1 -1
  665. package/dist/seeding/IEventSeeding.d.ts.map +1 -1
  666. package/dist/seeding/IEventSeedingBuilder.d.ts +2 -2
  667. package/dist/seeding/IEventSeedingBuilder.d.ts.map +1 -1
  668. package/dist/seeding/index.d.ts +7 -7
  669. package/dist/seeding/index.d.ts.map +1 -1
  670. package/dist/seeding/index.js +2 -2
  671. package/dist/seeding/index.js.map +1 -1
  672. package/dist/seeding/seeder.js +1 -1
  673. package/dist/seeding/seeder.js.map +1 -1
  674. package/dist/sinks/WellKnownSinks.d.ts +4 -4
  675. package/dist/sinks/WellKnownSinks.d.ts.map +1 -1
  676. package/dist/sinks/index.d.ts +1 -1
  677. package/dist/sinks/index.d.ts.map +1 -1
  678. package/dist/sinks/index.js +1 -1
  679. package/dist/sinks/index.js.map +1 -1
  680. package/dist/transactions/IUnitOfWork.d.ts +5 -5
  681. package/dist/transactions/IUnitOfWork.d.ts.map +1 -1
  682. package/dist/transactions/IUnitOfWorkManager.d.ts +1 -1
  683. package/dist/transactions/IUnitOfWorkManager.d.ts.map +1 -1
  684. package/dist/transactions/NoUnitOfWorkHasBeenStarted.d.ts.map +1 -1
  685. package/dist/transactions/UnitOfWork.d.ts +7 -7
  686. package/dist/transactions/UnitOfWork.d.ts.map +1 -1
  687. package/dist/transactions/UnitOfWork.js +1 -1
  688. package/dist/transactions/UnitOfWork.js.map +1 -1
  689. package/dist/transactions/UnitOfWorkManager.d.ts +3 -3
  690. package/dist/transactions/UnitOfWorkManager.d.ts.map +1 -1
  691. package/dist/transactions/UnitOfWorkManager.js +2 -2
  692. package/dist/transactions/UnitOfWorkManager.js.map +1 -1
  693. package/dist/transactions/index.d.ts +5 -5
  694. package/dist/transactions/index.d.ts.map +1 -1
  695. package/dist/transactions/index.js +3 -3
  696. package/dist/transactions/index.js.map +1 -1
  697. package/dist/tsconfig.tsbuildinfo +1 -1
  698. package/dist/types/TypeDiscoverer.d.ts +1 -1
  699. package/dist/types/TypeDiscoverer.d.ts.map +1 -1
  700. package/dist/types/TypeDiscoverer.js.map +1 -1
  701. package/dist/types/TypeIntrospector.d.ts.map +1 -1
  702. package/dist/types/index.d.ts +3 -3
  703. package/dist/types/index.d.ts.map +1 -1
  704. package/dist/types/index.js +3 -3
  705. package/dist/types/index.js.map +1 -1
  706. package/dist/webhooks/IWebhook.d.ts +1 -1
  707. package/dist/webhooks/IWebhook.d.ts.map +1 -1
  708. package/dist/webhooks/IWebhookDefinitionBuilder.d.ts +1 -1
  709. package/dist/webhooks/IWebhookDefinitionBuilder.d.ts.map +1 -1
  710. package/dist/webhooks/IWebhooks.d.ts +3 -3
  711. package/dist/webhooks/IWebhooks.d.ts.map +1 -1
  712. package/dist/webhooks/WebhookDefinitionBuilder.d.ts +5 -5
  713. package/dist/webhooks/WebhookDefinitionBuilder.d.ts.map +1 -1
  714. package/dist/webhooks/WebhookDefinitionBuilder.js +2 -2
  715. package/dist/webhooks/WebhookDefinitionBuilder.js.map +1 -1
  716. package/dist/webhooks/WebhookId.d.ts.map +1 -1
  717. package/dist/webhooks/WebhookId.js.map +1 -1
  718. package/dist/webhooks/WebhookTargetUrl.d.ts.map +1 -1
  719. package/dist/webhooks/WebhookTargetUrl.js.map +1 -1
  720. package/dist/webhooks/Webhooks.d.ts +7 -7
  721. package/dist/webhooks/Webhooks.d.ts.map +1 -1
  722. package/dist/webhooks/Webhooks.js +6 -6
  723. package/dist/webhooks/Webhooks.js.map +1 -1
  724. package/dist/webhooks/index.d.ts +9 -9
  725. package/dist/webhooks/index.d.ts.map +1 -1
  726. package/dist/webhooks/index.js +5 -5
  727. package/dist/webhooks/index.js.map +1 -1
  728. package/dist/webhooks/webhook.d.ts +2 -2
  729. package/dist/webhooks/webhook.d.ts.map +1 -1
  730. package/dist/webhooks/webhook.js +3 -3
  731. package/dist/webhooks/webhook.js.map +1 -1
  732. package/eventSequences/AppendOptions.ts +2 -2
  733. package/eventSequences/AppendResult.ts +5 -5
  734. package/eventSequences/AppendedEventWithResult.ts +2 -2
  735. package/eventSequences/CompleteStreamResult.ts +2 -2
  736. package/eventSequences/ConcurrencyScope.ts +1 -1
  737. package/eventSequences/ConcurrencyViolation.ts +1 -1
  738. package/eventSequences/EventForEventSourceId.ts +1 -1
  739. package/eventSequences/EventLog.ts +5 -5
  740. package/eventSequences/EventSequence.spec.ts +47 -8
  741. package/eventSequences/EventSequence.ts +52 -42
  742. package/eventSequences/IEventLog.ts +1 -1
  743. package/eventSequences/IEventSequence.ts +9 -9
  744. package/eventSequences/ITransactionalEventSequence.ts +1 -1
  745. package/eventSequences/TransactionalEventSequence.ts +4 -4
  746. package/eventSequences/WaitForCompletionResult.ts +1 -1
  747. package/eventSequences/for_EventSequence/when_appending/with_metadata.spec.ts +4 -4
  748. package/eventSequences/for_EventSequence/when_reading/with_route_filters.spec.ts +4 -4
  749. package/eventSequences/index.ts +19 -19
  750. package/eventStoreSubscriptions/EventStoreSubscriptionBuilder.ts +4 -4
  751. package/eventStoreSubscriptions/EventStoreSubscriptionDefinition.ts +2 -2
  752. package/eventStoreSubscriptions/EventStoreSubscriptions.spec.ts +3 -3
  753. package/eventStoreSubscriptions/EventStoreSubscriptions.ts +8 -8
  754. package/eventStoreSubscriptions/IEventStoreSubscriptionBuilder.ts +2 -2
  755. package/eventStoreSubscriptions/IEventStoreSubscriptions.ts +4 -4
  756. package/eventStoreSubscriptions/index.ts +6 -6
  757. package/events/AppendedEvent.ts +2 -2
  758. package/events/EventContext.ts +4 -4
  759. package/events/EventType.ts +2 -2
  760. package/events/EventTypes.ts +10 -10
  761. package/events/IEventTypes.ts +1 -1
  762. package/events/constraints/ConstraintBuilder.ts +4 -4
  763. package/events/constraints/Constraints.ts +13 -8
  764. package/events/constraints/IConstraint.ts +1 -1
  765. package/events/constraints/IConstraintBuilder.ts +1 -1
  766. package/events/constraints/IConstraints.ts +1 -1
  767. package/events/constraints/IUniqueConstraintBuilder.ts +2 -1
  768. package/events/constraints/UniqueConstraintBuilder.ts +12 -4
  769. package/events/constraints/constraint.ts +2 -2
  770. package/events/constraints/for_Constraints/when_registering_unique_property_constraints.spec.ts +137 -0
  771. package/events/constraints/index.ts +12 -12
  772. package/events/eventTypeDecorator.ts +5 -5
  773. package/events/filterEventsByTagDecorator.ts +2 -2
  774. package/events/for_EventContext/when_receiving/with_kernel_metadata.spec.ts +11 -11
  775. package/events/index.ts +16 -16
  776. package/events/mergeTags.spec.ts +2 -2
  777. package/events/mergeTags.ts +1 -1
  778. package/events/migrations/EventMigrationBuilder.ts +2 -2
  779. package/events/migrations/EventMigrationPropertyBuilder.ts +1 -1
  780. package/events/migrations/EventTypeMigrators.ts +4 -4
  781. package/events/migrations/IEventMigrationBuilder.ts +1 -1
  782. package/events/migrations/IEventTypeMigration.ts +1 -1
  783. package/events/migrations/eventTypeMigration.ts +4 -4
  784. package/events/migrations/index.ts +10 -10
  785. package/events/tagDecorator.spec.ts +2 -2
  786. package/events/tagDecorator.ts +2 -2
  787. package/events/toClientEventContext.ts +8 -8
  788. package/externalServices/ExternalServiceBuilder.ts +2 -2
  789. package/externalServices/ExternalServices.ts +4 -4
  790. package/externalServices/IExternalServices.ts +1 -1
  791. package/externalServices/index.ts +4 -4
  792. package/for_ChronicleClient/when_reconnecting/and_the_server_becomes_incompatible.spec.ts +3 -3
  793. package/identities/IdentityManager.ts +2 -2
  794. package/identities/index.ts +2 -2
  795. package/identity/IIdentityProvider.ts +1 -1
  796. package/identity/IdentityProvider.ts +2 -2
  797. package/identity/index.ts +4 -4
  798. package/index.ts +56 -56
  799. package/jobs/IJobs.ts +1 -1
  800. package/jobs/Jobs.ts +5 -5
  801. package/jobs/index.ts +3 -3
  802. package/observation/FailedPartition.ts +1 -1
  803. package/observation/FailedPartitionAttempt.ts +1 -1
  804. package/observation/FailedPartitions.spec.ts +2 -2
  805. package/observation/FailedPartitions.ts +4 -4
  806. package/observation/IFailedPartitions.ts +1 -1
  807. package/observation/index.ts +9 -9
  808. package/observation/notifyReplayLifecycle.spec.ts +1 -1
  809. package/observation/notifyReplayLifecycle.ts +2 -2
  810. package/observation/toClientFailedPartition.ts +3 -3
  811. package/observation/toObserverRunningState.ts +1 -1
  812. package/package.json +5 -3
  813. package/projections/IProjections.ts +5 -5
  814. package/projections/ProjectionState.ts +2 -2
  815. package/projections/Projections.childrenAndNested.spec.ts +10 -10
  816. package/projections/Projections.declarativeVariants.spec.ts +8 -8
  817. package/projections/Projections.modelBoundCompleteness.spec.ts +11 -11
  818. package/projections/Projections.operationalSurface.spec.ts +12 -12
  819. package/projections/Projections.spec.ts +11 -11
  820. package/projections/Projections.ts +38 -38
  821. package/projections/Projections.variants.spec.ts +12 -12
  822. package/projections/VariantReclassifier.ts +3 -3
  823. package/projections/declarative/AddBuilder.ts +1 -1
  824. package/projections/declarative/AddChildBuilder.ts +1 -1
  825. package/projections/declarative/AllSetBuilder.ts +1 -1
  826. package/projections/declarative/ChildrenBuilder.spec.ts +2 -2
  827. package/projections/declarative/ChildrenBuilder.ts +4 -4
  828. package/projections/declarative/CompositeKeyBuilder.spec.ts +2 -2
  829. package/projections/declarative/CompositeKeyBuilder.ts +1 -1
  830. package/projections/declarative/FromBuilder.ts +11 -11
  831. package/projections/declarative/FromEveryBuilder.ts +3 -3
  832. package/projections/declarative/IChildrenBuilder.ts +1 -1
  833. package/projections/declarative/IFromBuilder.ts +1 -1
  834. package/projections/declarative/IFromEveryBuilder.ts +1 -1
  835. package/projections/declarative/IJoinBuilder.ts +1 -1
  836. package/projections/declarative/INestedBuilder.ts +1 -1
  837. package/projections/declarative/IProjectionBuilder.ts +7 -7
  838. package/projections/declarative/IProjectionBuilderFor.ts +1 -1
  839. package/projections/declarative/IProjectionFor.ts +1 -1
  840. package/projections/declarative/IReadModelPropertiesBuilder.ts +5 -5
  841. package/projections/declarative/JoinBuilder.ts +11 -11
  842. package/projections/declarative/NestedBuilder.ts +4 -4
  843. package/projections/declarative/ProjectionBuilderCore.ts +12 -12
  844. package/projections/declarative/ProjectionBuilderFor.spec.ts +2 -2
  845. package/projections/declarative/ProjectionBuilderFor.ts +7 -7
  846. package/projections/declarative/RemovedWithBuilder.ts +1 -1
  847. package/projections/declarative/RemovedWithJoinBuilder.ts +1 -1
  848. package/projections/declarative/SetBuilder.ts +1 -1
  849. package/projections/declarative/SubtractBuilder.ts +1 -1
  850. package/projections/declarative/index.ts +32 -32
  851. package/projections/declarative/projection.ts +2 -2
  852. package/projections/index.ts +10 -10
  853. package/projections/modelBound/FromEventMetadata.ts +1 -1
  854. package/projections/modelBound/addFrom.ts +1 -1
  855. package/projections/modelBound/childrenAndNestedBuilder.ts +16 -16
  856. package/projections/modelBound/childrenFrom.ts +1 -1
  857. package/projections/modelBound/clearWith.ts +1 -1
  858. package/projections/modelBound/count.ts +1 -1
  859. package/projections/modelBound/decrement.ts +1 -1
  860. package/projections/modelBound/eventSequence.ts +1 -1
  861. package/projections/modelBound/fromAll.ts +1 -1
  862. package/projections/modelBound/fromEvent.ts +2 -2
  863. package/projections/modelBound/fromEvery.ts +1 -1
  864. package/projections/modelBound/globalFor.ts +1 -1
  865. package/projections/modelBound/increment.ts +1 -1
  866. package/projections/modelBound/index.ts +44 -44
  867. package/projections/modelBound/join.ts +1 -1
  868. package/projections/modelBound/nested.ts +1 -1
  869. package/projections/modelBound/noAutoMap.ts +1 -1
  870. package/projections/modelBound/removedWith.ts +1 -1
  871. package/projections/modelBound/removedWithJoin.ts +1 -1
  872. package/projections/modelBound/setFrom.ts +1 -1
  873. package/projections/modelBound/setFromContext.ts +2 -2
  874. package/projections/modelBound/setValue.ts +1 -1
  875. package/projections/modelBound/subtractFrom.ts +1 -1
  876. package/reactors/ReactorSideEffects.spec.ts +4 -4
  877. package/reactors/ReactorSideEffects.ts +3 -3
  878. package/reactors/Reactors.ts +13 -13
  879. package/reactors/index.ts +5 -5
  880. package/reactors/reactor.ts +2 -2
  881. package/readModels/IReadModels.ts +3 -3
  882. package/readModels/MaterializedReadModels.spec.ts +5 -5
  883. package/readModels/MaterializedReadModels.ts +5 -5
  884. package/readModels/ReadModelSubjectResolver.spec.ts +2 -2
  885. package/readModels/ReadModelSubjectResolver.ts +1 -1
  886. package/readModels/ReadModels.spec.ts +6 -6
  887. package/readModels/ReadModels.ts +18 -18
  888. package/readModels/index.ts +10 -10
  889. package/readModels/readModel.ts +3 -3
  890. package/reducers/Reducers.spec.ts +9 -9
  891. package/reducers/Reducers.ts +14 -14
  892. package/reducers/index.ts +5 -5
  893. package/reducers/reducer.spec.ts +1 -1
  894. package/reducers/reducer.ts +2 -2
  895. package/schemas/JsonSchemaGenerator.confidentiality.spec.ts +6 -6
  896. package/schemas/JsonSchemaGenerator.spec.ts +4 -4
  897. package/schemas/JsonSchemaGenerator.ts +7 -7
  898. package/schemas/index.ts +3 -3
  899. package/schemas/jsonSchemaProperty.ts +1 -1
  900. package/seeding/EventSeeding.ts +10 -10
  901. package/seeding/ICanSeedEvents.ts +1 -1
  902. package/seeding/IEventSeeding.ts +1 -1
  903. package/seeding/IEventSeedingBuilder.ts +2 -2
  904. package/seeding/index.ts +7 -7
  905. package/seeding/seeder.ts +1 -1
  906. package/sinks/index.ts +1 -1
  907. package/transactions/IUnitOfWork.ts +5 -5
  908. package/transactions/IUnitOfWorkManager.ts +1 -1
  909. package/transactions/UnitOfWork.spec.ts +6 -6
  910. package/transactions/UnitOfWork.ts +8 -8
  911. package/transactions/UnitOfWorkManager.ts +5 -5
  912. package/transactions/index.ts +5 -5
  913. package/types/TypeDiscoverer.ts +1 -1
  914. package/types/index.ts +3 -3
  915. package/webhooks/IWebhook.ts +1 -1
  916. package/webhooks/IWebhookDefinitionBuilder.ts +1 -1
  917. package/webhooks/IWebhooks.ts +3 -3
  918. package/webhooks/WebhookDefinitionBuilder.ts +6 -6
  919. package/webhooks/Webhooks.ts +12 -12
  920. package/webhooks/index.ts +9 -9
  921. package/webhooks/webhook.ts +3 -3
@@ -1,11 +1,11 @@
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 { ChronicleConnection } from '../connection';
5
- import { EventSequence } from './EventSequence';
6
- import { EventSequenceId } from './EventSequenceId';
7
- import { IEventLog } from './IEventLog';
8
- import { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager';
4
+ import { ChronicleConnection } from '../connection/index.js';
5
+ import { EventSequence } from './EventSequence.js';
6
+ import { EventSequenceId } from './EventSequenceId.js';
7
+ import { IEventLog } from './IEventLog.js';
8
+ import { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager.js';
9
9
 
10
10
  /**
11
11
  * Implements {@link IEventLog} by extending the base {@link EventSequence}.
@@ -2,13 +2,13 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { describe, expect, it, vi } from 'vitest';
5
- import type { ChronicleConnection } from '../connection';
6
- import type { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager';
7
- import { eventType } from '../events/eventTypeDecorator';
8
- import { CompleteStreamError } from './CompleteStreamError';
9
- import { EventSequence } from './EventSequence';
10
- import { EventSequenceId } from './EventSequenceId';
11
- import { EventSequenceNumber } from './EventSequenceNumber';
5
+ import type { ChronicleConnection } from '../connection/index.js';
6
+ import type { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager.js';
7
+ import { eventType } from '../events/eventTypeDecorator.js';
8
+ import { CompleteStreamError } from './CompleteStreamError.js';
9
+ import { EventSequence } from './EventSequence.js';
10
+ import { EventSequenceId } from './EventSequenceId.js';
11
+ import { EventSequenceNumber } from './EventSequenceNumber.js';
12
12
 
13
13
  class SomethingHappened {
14
14
  constructor(readonly value: string = '') {}
@@ -31,7 +31,9 @@ function createEventSequence(
31
31
  fromSequenceNumber: vi.fn().mockResolvedValue({ Data: [] }),
32
32
  tailSequenceNumber: vi.fn().mockResolvedValue({ Data: { SequenceNumber: EventSequenceNumber.unset.value } }),
33
33
  completeStream: vi.fn().mockResolvedValue({ Response: { IsSuccess: true, SequenceNumber: 3n, Error: 0 } }),
34
- appendManyForEventSources: vi.fn().mockResolvedValue({ Response: { SequenceNumbers: [], ConstraintViolations: [], Errors: [] } }),
34
+ appendManyForEventSources: vi.fn().mockImplementation(async request => ({
35
+ Response: { SequenceNumbers: request.Events.map((_: unknown, index: number) => BigInt(index)), ConstraintViolations: [], Errors: [] }
36
+ })),
35
37
  append: vi.fn().mockResolvedValue({ Response: { SequenceNumber: 0n, ConstraintViolations: [], Errors: [] } }),
36
38
  ...overrides
37
39
  };
@@ -570,6 +572,43 @@ describe('EventSequence', () => {
570
572
  });
571
573
  });
572
574
 
575
+ describe('when appendMany is rejected without sequence numbers', () => {
576
+ const { eventSequence, waitForCompletion } = createEventSequence({
577
+ appendManyForEventSources: vi.fn().mockResolvedValue({
578
+ Response: {
579
+ SequenceNumbers: [],
580
+ ConstraintViolations: [{ ConstraintId: 'unique', Message: 'Value must be unique', Details: { value: 'a' } }],
581
+ Errors: ['Batch rejected']
582
+ }
583
+ })
584
+ });
585
+
586
+ it('should carry every batch rejection detail on each input result', async () => {
587
+ const results = await eventSequence.appendMany('some-event-source', [new SomethingHappened('a'), new SomethingHappened('b')]);
588
+
589
+ expect(results).toHaveLength(2);
590
+ for (const result of results) {
591
+ expect(result.isSuccess).toBe(false);
592
+ expect(result.sequenceNumber.value).toBe(0n);
593
+ expect(result.constraintViolations).toEqual([{ constraintId: 'unique', message: 'Value must be unique', details: { value: 'a' } }]);
594
+ expect(result.errors).toEqual([{ message: 'Batch rejected' }]);
595
+ await result.waitForCompletion();
596
+ }
597
+ expect(waitForCompletion).not.toHaveBeenCalled();
598
+ });
599
+ });
600
+
601
+ describe('when appendMany has no sequence numbers or rejection details', () => {
602
+ const { eventSequence } = createEventSequence({
603
+ appendManyForEventSources: vi.fn().mockResolvedValue({ Response: { SequenceNumbers: [], ConstraintViolations: [], Errors: [] } })
604
+ });
605
+
606
+ it('should not report an unknown outcome as success', async () => {
607
+ await expect(eventSequence.appendMany('some-event-source', [new SomethingHappened('a')]))
608
+ .rejects.toThrow('Append many events returned no sequence numbers or rejection details.');
609
+ });
610
+ });
611
+
573
612
  describe('when appendMany fails with a concurrency violation', () => {
574
613
  const { eventSequence } = createEventSequence({
575
614
  appendManyForEventSources: vi.fn().mockResolvedValue({
@@ -1,46 +1,46 @@
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 { ChronicleConnection } from '../connection';
4
+ import { ChronicleConnection } from '../connection/index.js';
5
5
  import { SpanStatusCode } from '@opentelemetry/api';
6
6
  import type { AppendedEventResponse as ContractsAppendedEvent } from '@cratis/chronicle.contracts';
7
7
  import { Constructor, Guid, JsonSerializer } from '@cratis/fundamentals';
8
- import { getEventTypeFor } from '../events/eventTypeDecorator';
9
- import type { AppendedEvent } from '../events/AppendedEvent';
10
- import { toClientEventContext } from '../events/toClientEventContext';
11
- import { Tag } from '../events/Tag';
12
- import { getTagsFor } from '../events/tagDecorator';
13
- import { mergeTags } from '../events/mergeTags';
14
- import { DecoratorType } from '../types/DecoratorType';
15
- import { TypeDiscoverer } from '../types/TypeDiscoverer';
16
- import { toClientFailedPartition } from '../observation/toClientFailedPartition';
17
- import { AppendedEventWithResult } from './AppendedEventWithResult';
18
- import { AppendOperationsBroadcaster } from './AppendOperationsBroadcaster';
19
- import { AppendOptions } from './AppendOptions';
20
- import { AppendResult } from './AppendResult';
21
- import { CompleteStreamError } from './CompleteStreamError';
22
- import { CompleteStreamResult } from './CompleteStreamResult';
23
- import { ConcurrencyViolation } from './ConcurrencyViolation';
24
- import { ConstraintViolation } from './ConstraintViolation';
25
- import { EventForEventSourceId } from './EventForEventSourceId';
26
- import { IEventSequence } from './IEventSequence';
27
- import { ITransactionalEventSequence } from './ITransactionalEventSequence';
28
- import { EventSequenceId } from './EventSequenceId';
29
- import { EventSequenceNumber } from './EventSequenceNumber';
30
- import { TransactionalEventSequence } from './TransactionalEventSequence';
31
- import { WaitForCompletionResult } from './WaitForCompletionResult';
8
+ import { getEventTypeFor } from '../events/eventTypeDecorator.js';
9
+ import type { AppendedEvent } from '../events/AppendedEvent.js';
10
+ import { toClientEventContext } from '../events/toClientEventContext.js';
11
+ import { Tag } from '../events/Tag.js';
12
+ import { getTagsFor } from '../events/tagDecorator.js';
13
+ import { mergeTags } from '../events/mergeTags.js';
14
+ import { DecoratorType } from '../types/DecoratorType.js';
15
+ import { TypeDiscoverer } from '../types/TypeDiscoverer.js';
16
+ import { toClientFailedPartition } from '../observation/toClientFailedPartition.js';
17
+ import { AppendedEventWithResult } from './AppendedEventWithResult.js';
18
+ import { AppendOperationsBroadcaster } from './AppendOperationsBroadcaster.js';
19
+ import { AppendOptions } from './AppendOptions.js';
20
+ import { AppendResult } from './AppendResult.js';
21
+ import { CompleteStreamError } from './CompleteStreamError.js';
22
+ import { CompleteStreamResult } from './CompleteStreamResult.js';
23
+ import { ConcurrencyViolation } from './ConcurrencyViolation.js';
24
+ import { ConstraintViolation } from './ConstraintViolation.js';
25
+ import { EventForEventSourceId } from './EventForEventSourceId.js';
26
+ import { IEventSequence } from './IEventSequence.js';
27
+ import { ITransactionalEventSequence } from './ITransactionalEventSequence.js';
28
+ import { EventSequenceId } from './EventSequenceId.js';
29
+ import { EventSequenceNumber } from './EventSequenceNumber.js';
30
+ import { TransactionalEventSequence } from './TransactionalEventSequence.js';
31
+ import { WaitForCompletionResult } from './WaitForCompletionResult.js';
32
32
 
33
33
  /** Default timeout for {@link AppendResult.waitForCompletion}, matching the C# client's default. */
34
34
  const DEFAULT_WAIT_FOR_COMPLETION_TIMEOUT_MS = 5000;
35
- import { ChronicleTracer } from '../Tracing';
36
- import { ChronicleMetrics } from '../Metrics';
37
- import { identityProvider, Identity } from '../identity';
38
- import { causationManager, CausationType } from '../auditing';
39
- import { correlationIdManager } from '../correlation';
40
- import { toContractsGuid } from '../connection/Guid';
41
- import { ensureCommandResponse, ensureCommandSuccess, ensureQuerySuccess } from '../connection/callResults';
42
- import type { ConcurrencyScope } from './ConcurrencyScope';
43
- import { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager';
35
+ import { ChronicleTracer } from '../Tracing.js';
36
+ import { ChronicleMetrics } from '../Metrics.js';
37
+ import { identityProvider, Identity } from '../identity/index.js';
38
+ import { causationManager, CausationType } from '../auditing/index.js';
39
+ import { correlationIdManager } from '../correlation/index.js';
40
+ import { toContractsGuid } from '../connection/Guid.js';
41
+ import { ensureCommandResponse, ensureCommandSuccess, ensureQuerySuccess } from '../connection/callResults.js';
42
+ import type { ConcurrencyScope } from './ConcurrencyScope.js';
43
+ import { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager.js';
44
44
 
45
45
  /**
46
46
  * Implements {@link IEventSequence} by communicating with the Chronicle Kernel
@@ -298,14 +298,24 @@ export class EventSequence implements IEventSequence {
298
298
  // constraint violations and the first concurrency violation of the whole batch —
299
299
  // the wire response doesn't correlate either back to a specific event index.
300
300
  const firstConcurrencyViolation = (appendManyResponse.ConcurrencyViolations ?? [])[0];
301
- const result = (appendManyResponse.SequenceNumbers ?? []).map((sequenceNumber: bigint, index: number) =>
302
- this.mapAppendResponse(
303
- sequenceNumber,
304
- appendManyResponse.ConstraintViolations ?? [],
305
- (appendManyResponse.Errors ?? []).filter((_: string, errorIndex: number) => errorIndex === index),
306
- firstConcurrencyViolation
307
- )
308
- );
301
+ const sequenceNumbers = appendManyResponse.SequenceNumbers ?? [];
302
+ const constraintViolations = appendManyResponse.ConstraintViolations ?? [];
303
+ const errors = appendManyResponse.Errors ?? [];
304
+ const batchWasRejected = sequenceNumbers.length === 0 &&
305
+ (constraintViolations.length > 0 || errors.length > 0 || firstConcurrencyViolation !== undefined);
306
+ if (sequenceNumbers.length === 0 && eventsForEventSourceIds.length > 0 && !batchWasRejected) {
307
+ throw new Error('Append many events returned no sequence numbers or rejection details.');
308
+ }
309
+ const result = batchWasRejected
310
+ ? eventsForEventSourceIds.map(() => this.mapAppendResponse(0n, constraintViolations, errors, firstConcurrencyViolation))
311
+ : sequenceNumbers.map((sequenceNumber: bigint, index: number) =>
312
+ this.mapAppendResponse(
313
+ sequenceNumber,
314
+ constraintViolations,
315
+ errors.filter((_: string, errorIndex: number) => errorIndex === index),
316
+ firstConcurrencyViolation
317
+ )
318
+ );
309
319
  span.setStatus({ code: SpanStatusCode.OK });
310
320
 
311
321
  ChronicleMetrics.batchAppendsPerformed.add(1, batchMetricAttributes);
@@ -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 { IEventSequence } from './IEventSequence';
4
+ import { IEventSequence } from './IEventSequence.js';
5
5
 
6
6
  /**
7
7
  * Defines the API surface for the event log, which is the default event sequence.
@@ -2,15 +2,15 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import type { Constructor } from '@cratis/fundamentals';
5
- import type { AppendedEvent } from '../events/AppendedEvent';
6
- import { AppendedEventWithResult } from './AppendedEventWithResult';
7
- import { AppendOptions } from './AppendOptions';
8
- import { CompleteStreamResult } from './CompleteStreamResult';
9
- import { EventForEventSourceId } from './EventForEventSourceId';
10
- import { AppendResult } from './AppendResult';
11
- import { EventSequenceId } from './EventSequenceId';
12
- import { EventSequenceNumber } from './EventSequenceNumber';
13
- import { ITransactionalEventSequence } from './ITransactionalEventSequence';
5
+ import type { AppendedEvent } from '../events/AppendedEvent.js';
6
+ import { AppendedEventWithResult } from './AppendedEventWithResult.js';
7
+ import { AppendOptions } from './AppendOptions.js';
8
+ import { CompleteStreamResult } from './CompleteStreamResult.js';
9
+ import { EventForEventSourceId } from './EventForEventSourceId.js';
10
+ import { AppendResult } from './AppendResult.js';
11
+ import { EventSequenceId } from './EventSequenceId.js';
12
+ import { EventSequenceNumber } from './EventSequenceNumber.js';
13
+ import { ITransactionalEventSequence } from './ITransactionalEventSequence.js';
14
14
 
15
15
  /**
16
16
  * Defines the API surface for an event sequence.
@@ -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 { IUnitOfWork } from '../transactions/IUnitOfWork';
4
+ import { IUnitOfWork } from '../transactions/IUnitOfWork.js';
5
5
 
6
6
  /**
7
7
  * Defines a transactional event sequence that appends to the current unit of work.
@@ -1,10 +1,10 @@
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 { IUnitOfWork } from '../transactions/IUnitOfWork';
5
- import { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager';
6
- import { IEventSequence } from './IEventSequence';
7
- import { ITransactionalEventSequence } from './ITransactionalEventSequence';
4
+ import { IUnitOfWork } from '../transactions/IUnitOfWork.js';
5
+ import { IUnitOfWorkManager } from '../transactions/IUnitOfWorkManager.js';
6
+ import { IEventSequence } from './IEventSequence.js';
7
+ import { ITransactionalEventSequence } from './ITransactionalEventSequence.js';
8
8
 
9
9
  /**
10
10
  * Implements {@link ITransactionalEventSequence} by delegating appends to the current unit of work.
@@ -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 { FailedPartition } from '../observation/FailedPartition';
4
+ import { FailedPartition } from '../observation/FailedPartition.js';
5
5
 
6
6
  /**
7
7
  * Represents the result of waiting for the observers affected by an append operation to catch up.
@@ -3,10 +3,10 @@
3
3
 
4
4
  import { beforeEach, chai, describe, it, vi } from 'vitest';
5
5
  import { AppendRequest, AppendManyForEventSourcesRequest } from '@cratis/chronicle.contracts';
6
- import { EventSequence, EventSequenceId, EventSequenceNumber } from '../../index';
7
- import { eventType } from '../../../events';
8
- import type { ChronicleConnection } from '../../../connection';
9
- import type { IUnitOfWorkManager } from '../../../transactions';
6
+ import { EventSequence, EventSequenceId, EventSequenceNumber } from '../../index.js';
7
+ import { eventType } from '../../../events/index.js';
8
+ import type { ChronicleConnection } from '../../../connection/index.js';
9
+ import type { IUnitOfWorkManager } from '../../../transactions/index.js';
10
10
 
11
11
  const should = chai.should();
12
12
  class MetadataRecorded { constructor(readonly value = 'payload') {} }
@@ -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 { beforeEach, chai, describe, it, vi } from 'vitest';
5
- import { EventSequence, EventSequenceId } from '../../index';
6
- import { eventType } from '../../../events';
7
- import type { ChronicleConnection } from '../../../connection';
8
- import type { IUnitOfWorkManager } from '../../../transactions';
5
+ import { EventSequence, EventSequenceId } from '../../index.js';
6
+ import { eventType } from '../../../events/index.js';
7
+ import type { ChronicleConnection } from '../../../connection/index.js';
8
+ import type { IUnitOfWorkManager } from '../../../transactions/index.js';
9
9
 
10
10
  chai.should();
11
11
 
@@ -1,22 +1,22 @@
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 { EventSequenceId } from './EventSequenceId';
5
- export { EventSequenceNumber } from './EventSequenceNumber';
6
- export type { AppendError } from './AppendError';
7
- export type { ConcurrencyViolation } from './ConcurrencyViolation';
8
- export type { ConstraintViolation } from './ConstraintViolation';
9
- export type { AppendResult } from './AppendResult';
10
- export type { AppendedEventWithResult } from './AppendedEventWithResult';
11
- export type { AppendOptions } from './AppendOptions';
12
- export { CompleteStreamError } from './CompleteStreamError';
13
- export type { CompleteStreamResult } from './CompleteStreamResult';
14
- export type { ConcurrencyScope } from './ConcurrencyScope';
15
- export type { EventForEventSourceId } from './EventForEventSourceId';
16
- export type { WaitForCompletionResult } from './WaitForCompletionResult';
17
- export type { IEventSequence } from './IEventSequence';
18
- export type { IEventLog } from './IEventLog';
19
- export type { ITransactionalEventSequence } from './ITransactionalEventSequence';
20
- export { EventSequence } from './EventSequence';
21
- export { EventLog } from './EventLog';
22
- export { TransactionalEventSequence } from './TransactionalEventSequence';
4
+ export { EventSequenceId } from './EventSequenceId.js';
5
+ export { EventSequenceNumber } from './EventSequenceNumber.js';
6
+ export type { AppendError } from './AppendError.js';
7
+ export type { ConcurrencyViolation } from './ConcurrencyViolation.js';
8
+ export type { ConstraintViolation } from './ConstraintViolation.js';
9
+ export type { AppendResult } from './AppendResult.js';
10
+ export type { AppendedEventWithResult } from './AppendedEventWithResult.js';
11
+ export type { AppendOptions } from './AppendOptions.js';
12
+ export { CompleteStreamError } from './CompleteStreamError.js';
13
+ export type { CompleteStreamResult } from './CompleteStreamResult.js';
14
+ export type { ConcurrencyScope } from './ConcurrencyScope.js';
15
+ export type { EventForEventSourceId } from './EventForEventSourceId.js';
16
+ export type { WaitForCompletionResult } from './WaitForCompletionResult.js';
17
+ export type { IEventSequence } from './IEventSequence.js';
18
+ export type { IEventLog } from './IEventLog.js';
19
+ export type { ITransactionalEventSequence } from './ITransactionalEventSequence.js';
20
+ export { EventSequence } from './EventSequence.js';
21
+ export { EventLog } from './EventLog.js';
22
+ export { TransactionalEventSequence } from './TransactionalEventSequence.js';
@@ -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 { Constructor } from '@cratis/fundamentals';
5
- import { EventType, EventTypeGeneration, EventTypeId, IEventTypes, getEventTypeFor } from '../events';
6
- import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition';
7
- import { EventStoreSubscriptionId } from './EventStoreSubscriptionId';
8
- import { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder';
5
+ import { EventType, EventTypeGeneration, EventTypeId, IEventTypes, getEventTypeFor } from '../events/index.js';
6
+ import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition.js';
7
+ import { EventStoreSubscriptionId } from './EventStoreSubscriptionId.js';
8
+ import { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder.js';
9
9
 
10
10
  /**
11
11
  * Represents an implementation of {@link IEventStoreSubscriptionBuilder}.
@@ -1,8 +1,8 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
- import { EventType } from '../events';
5
- import { EventStoreSubscriptionId } from './EventStoreSubscriptionId';
4
+ import { EventType } from '../events/index.js';
5
+ import { EventStoreSubscriptionId } from './EventStoreSubscriptionId.js';
6
6
 
7
7
  /**
8
8
  * Represents a definition of an event store subscription.
@@ -2,9 +2,9 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { describe, expect, it, vi } from 'vitest';
5
- import type { ChronicleConnection } from '../connection';
6
- import type { IEventTypes } from '../events';
7
- import { EventStoreSubscriptions } from './EventStoreSubscriptions';
5
+ import type { ChronicleConnection } from '../connection/index.js';
6
+ import type { IEventTypes } from '../events/index.js';
7
+ import { EventStoreSubscriptions } from './EventStoreSubscriptions.js';
8
8
 
9
9
  function createEventStoreSubscriptions(getSubscriptionsResult?: unknown) {
10
10
  const getSubscriptions = vi.fn().mockResolvedValue(getSubscriptionsResult ?? { items: [] });
@@ -2,14 +2,14 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { diag } from '@opentelemetry/api';
5
- import { ChronicleConnection } from '../connection';
6
- import { EventStoreName } from '../EventStoreName';
7
- import { EventType, EventTypeGeneration, EventTypeId, IEventTypes } from '../events';
8
- import { EventStoreSubscriptionBuilder } from './EventStoreSubscriptionBuilder';
9
- import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition';
10
- import { EventStoreSubscriptionId } from './EventStoreSubscriptionId';
11
- import { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder';
12
- import { IEventStoreSubscriptions } from './IEventStoreSubscriptions';
5
+ import { ChronicleConnection } from '../connection/index.js';
6
+ import { EventStoreName } from '../EventStoreName.js';
7
+ import { EventType, EventTypeGeneration, EventTypeId, IEventTypes } from '../events/index.js';
8
+ import { EventStoreSubscriptionBuilder } from './EventStoreSubscriptionBuilder.js';
9
+ import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition.js';
10
+ import { EventStoreSubscriptionId } from './EventStoreSubscriptionId.js';
11
+ import { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder.js';
12
+ import { IEventStoreSubscriptions } from './IEventStoreSubscriptions.js';
13
13
 
14
14
  /**
15
15
  * Represents an implementation of {@link IEventStoreSubscriptions}.
@@ -2,8 +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 { Constructor } from '@cratis/fundamentals';
5
- import { EventTypeId } from '../events';
6
- import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition';
5
+ import { EventTypeId } from '../events/index.js';
6
+ import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition.js';
7
7
 
8
8
  /**
9
9
  * Defines a builder for configuring an event store subscription.
@@ -1,10 +1,10 @@
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 { EventStoreName } from '../EventStoreName';
5
- import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition';
6
- import { EventStoreSubscriptionId } from './EventStoreSubscriptionId';
7
- import { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder';
4
+ import { EventStoreName } from '../EventStoreName.js';
5
+ import { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition.js';
6
+ import { EventStoreSubscriptionId } from './EventStoreSubscriptionId.js';
7
+ import { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder.js';
8
8
 
9
9
  /**
10
10
  * Defines the API for managing event store subscriptions.
@@ -1,9 +1,9 @@
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 { EventStoreSubscriptionBuilder } from './EventStoreSubscriptionBuilder';
5
- export { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition';
6
- export { EventStoreSubscriptionId } from './EventStoreSubscriptionId';
7
- export type { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder';
8
- export type { IEventStoreSubscriptions } from './IEventStoreSubscriptions';
9
- export { EventStoreSubscriptions } from './EventStoreSubscriptions';
4
+ export { EventStoreSubscriptionBuilder } from './EventStoreSubscriptionBuilder.js';
5
+ export { EventStoreSubscriptionDefinition } from './EventStoreSubscriptionDefinition.js';
6
+ export { EventStoreSubscriptionId } from './EventStoreSubscriptionId.js';
7
+ export type { IEventStoreSubscriptionBuilder } from './IEventStoreSubscriptionBuilder.js';
8
+ export type { IEventStoreSubscriptions } from './IEventStoreSubscriptions.js';
9
+ export { EventStoreSubscriptions } from './EventStoreSubscriptions.js';
@@ -1,8 +1,8 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
- import { EventContext } from './EventContext';
5
- import { EventType } from './EventType';
4
+ import { EventContext } from './EventContext.js';
5
+ import { EventType } from './EventType.js';
6
6
 
7
7
  /**
8
8
  * Represents an event that has been appended to an event sequence.
@@ -1,10 +1,10 @@
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 { EventType } from './EventType';
5
- import { CausationEntry } from './CausationEntry';
6
- import { Tag } from './Tag';
7
- import type { Identity } from '../identity/Identity';
4
+ import { EventType } from './EventType.js';
5
+ import { CausationEntry } from './CausationEntry.js';
6
+ import { Tag } from './Tag.js';
7
+ import type { Identity } from '../identity/Identity.js';
8
8
 
9
9
  /**
10
10
  * Represents contextual information about an appended event.
@@ -1,8 +1,8 @@
1
1
  // Copyright (c) Cratis. All rights reserved.
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
- import { EventTypeId } from './EventTypeId';
5
- import { EventTypeGeneration } from './EventTypeGeneration';
4
+ import { EventTypeId } from './EventTypeId.js';
5
+ import { EventTypeGeneration } from './EventTypeGeneration.js';
6
6
 
7
7
  /**
8
8
  * Represents the type of an event.
@@ -2,16 +2,16 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { Constructor } from '@cratis/fundamentals';
5
- import { IClientArtifactsProvider } from '../artifacts';
6
- import { ChronicleConnection } from '../connection';
7
- import { ensureCommandSuccess } from '../connection/callResults';
8
- import { EventTypeId } from './EventTypeId';
9
- import { IEventTypes } from './IEventTypes';
10
- import { getEventTypeMetadata, getEventTypeJsonSchemaFor } from './eventTypeDecorator';
11
- import { EventMigrationBuilder } from './migrations/EventMigrationBuilder';
12
- import { EventTypeMigrators } from './migrations/EventTypeMigrators';
13
- import { getEventTypeMigrationMetadata } from './migrations/eventTypeMigration';
14
- import { IEventTypeMigration } from './migrations/IEventTypeMigration';
5
+ import { IClientArtifactsProvider } from '../artifacts/index.js';
6
+ import { ChronicleConnection } from '../connection/index.js';
7
+ import { ensureCommandSuccess } from '../connection/callResults.js';
8
+ import { EventTypeId } from './EventTypeId.js';
9
+ import { IEventTypes } from './IEventTypes.js';
10
+ import { getEventTypeMetadata, getEventTypeJsonSchemaFor } from './eventTypeDecorator.js';
11
+ import { EventMigrationBuilder } from './migrations/EventMigrationBuilder.js';
12
+ import { EventTypeMigrators } from './migrations/EventTypeMigrators.js';
13
+ import { getEventTypeMigrationMetadata } from './migrations/eventTypeMigration.js';
14
+ import { IEventTypeMigration } from './migrations/IEventTypeMigration.js';
15
15
 
16
16
  // Mirrors .NET client behavior for migration-only generations that do not have a local CLR/TS type.
17
17
  const UNKNOWN_GENERATION_SCHEMA = '{}';
@@ -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 { Constructor } from '@cratis/fundamentals';
5
- import { EventTypeId } from './EventTypeId';
5
+ import { EventTypeId } from './EventTypeId.js';
6
6
 
7
7
  /**
8
8
  * Defines a system to work with event types, including discovery and registration with the Kernel.
@@ -1,10 +1,10 @@
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 { getEventTypeFor } from '../eventTypeDecorator';
5
- import { IConstraintBuilder } from './IConstraintBuilder';
6
- import { IUniqueConstraintBuilder } from './IUniqueConstraintBuilder';
7
- import { UniqueConstraintBuilder, UniqueConstraintCapture } from './UniqueConstraintBuilder';
4
+ import { getEventTypeFor } from '../eventTypeDecorator.js';
5
+ import { IConstraintBuilder } from './IConstraintBuilder.js';
6
+ import { IUniqueConstraintBuilder } from './IUniqueConstraintBuilder.js';
7
+ import { UniqueConstraintBuilder, UniqueConstraintCapture } from './UniqueConstraintBuilder.js';
8
8
 
9
9
  /** Represents the captured scope for a constraint. */
10
10
  export interface ConstraintScopeCapture {
@@ -2,13 +2,13 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { ConstraintType } from '@cratis/chronicle.contracts';
5
- import { IClientArtifactsProvider } from '../../artifacts';
6
- import { ChronicleConnection } from '../../connection';
7
- import { ConstraintId } from './ConstraintId';
8
- import { IConstraint } from './IConstraint';
9
- import { IConstraints } from './IConstraints';
10
- import { ConstraintBuilder, ConstraintCapture } from './ConstraintBuilder';
11
- import { getConstraintMetadata } from './constraint';
5
+ import { IClientArtifactsProvider } from '../../artifacts/index.js';
6
+ import { ChronicleConnection } from '../../connection/index.js';
7
+ import { ConstraintId } from './ConstraintId.js';
8
+ import { IConstraint } from './IConstraint.js';
9
+ import { IConstraints } from './IConstraints.js';
10
+ import { ConstraintBuilder, ConstraintCapture } from './ConstraintBuilder.js';
11
+ import { getConstraintMetadata } from './constraint.js';
12
12
 
13
13
  /**
14
14
  * Manages discovery and registration of constraints with the Chronicle Kernel.
@@ -57,10 +57,15 @@ export class Constraints implements IConstraints {
57
57
 
58
58
  if (capture.uniqueConstraint) {
59
59
  const uc = capture.uniqueConstraint;
60
+ const removalEventTypeIds = uc.removedWithEventTypeIds ?? [];
61
+ const legacyEventTypeId = uc.removedWithEventTypeId;
60
62
  return {
61
63
  Name: capture.name,
62
64
  Type: ConstraintType.Unique,
63
- RemovedWith: uc.removedWithEventTypeId ? [uc.removedWithEventTypeId] : [],
65
+ RemovedWith: [...new Set([
66
+ ...(legacyEventTypeId && !removalEventTypeIds.includes(legacyEventTypeId) ? [legacyEventTypeId] : []),
67
+ ...removalEventTypeIds
68
+ ])],
64
69
  Definition: {
65
70
  Value0: {
66
71
  EventDefinitions: uc.eventDefinitions.map(ed => ({
@@ -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 { IConstraintBuilder } from './IConstraintBuilder';
4
+ import { IConstraintBuilder } from './IConstraintBuilder.js';
5
5
 
6
6
  /**
7
7
  * Defines a constraint for events.