@spine-event-engine/server 2.0.0-snapshot.14 → 2.0.0-snapshot.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -0
- package/REFERENCE.md +146 -23
- package/dist/context/bounded-context.d.ts +131 -20
- package/dist/context/bounded-context.d.ts.map +1 -1
- package/dist/context/bounded-context.js +647 -48
- package/dist/context/bounded-context.js.map +1 -1
- package/dist/entity/entity-metadata.d.ts +12 -3
- package/dist/entity/entity-metadata.d.ts.map +1 -1
- package/dist/entity/entity-metadata.js +37 -1
- package/dist/entity/entity-metadata.js.map +1 -1
- package/dist/entity/entity-transaction.d.ts +46 -42
- package/dist/entity/entity-transaction.d.ts.map +1 -1
- package/dist/entity/entity-transaction.js +130 -35
- package/dist/entity/entity-transaction.js.map +1 -1
- package/dist/entity/entity.d.ts +138 -100
- package/dist/entity/entity.d.ts.map +1 -1
- package/dist/entity/entity.js +217 -227
- package/dist/entity/entity.js.map +1 -1
- package/dist/handler/event-registration-readiness.d.ts +13 -56
- package/dist/handler/event-registration-readiness.d.ts.map +1 -1
- package/dist/handler/event-registration-readiness.js +23 -43
- package/dist/handler/event-registration-readiness.js.map +1 -1
- package/dist/handler/generated-handler-registry.d.ts +8 -0
- package/dist/handler/generated-handler-registry.d.ts.map +1 -1
- package/dist/handler/generated-handler-registry.js +165 -3
- package/dist/handler/generated-handler-registry.js.map +1 -1
- package/dist/handler/handler-decorators.d.ts +70 -33
- package/dist/handler/handler-decorators.d.ts.map +1 -1
- package/dist/handler/handler-decorators.js +88 -31
- package/dist/handler/handler-decorators.js.map +1 -1
- package/dist/handler/handler-metadata.d.ts +53 -51
- package/dist/handler/handler-metadata.d.ts.map +1 -1
- package/dist/handler/handler-metadata.js +214 -42
- package/dist/handler/handler-metadata.js.map +1 -1
- package/dist/handler/registration-readiness-metadata.d.ts +4 -0
- package/dist/handler/registration-readiness-metadata.d.ts.map +1 -1
- package/dist/handler/registration-readiness-metadata.js +82 -1
- package/dist/handler/registration-readiness-metadata.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/repository/repository.d.ts +217 -70
- package/dist/repository/repository.d.ts.map +1 -1
- package/dist/repository/repository.js +2728 -354
- package/dist/repository/repository.js.map +1 -1
- package/dist/runtime/standalone-handler-runtime.d.ts +16 -0
- package/dist/runtime/standalone-handler-runtime.d.ts.map +1 -1
- package/dist/runtime/standalone-handler-runtime.js +93 -18
- package/dist/runtime/standalone-handler-runtime.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration-readiness-metadata.js","sourceRoot":"","sources":["../../src/handler/registration-readiness-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"registration-readiness-metadata.js","sourceRoot":"","sources":["../../src/handler/registration-readiness-metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAaH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAmC9D;;GAEG;AACH,MAAM,sBAAsB;IAC1B,kBAAkB;IAElB;;;;;;OAMG;IACH,gBAAgB,CAAC,IAAY,EAAE,KAAa;QAC1C,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACjB,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,iBAAqD;QAErD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAChE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CAAC;QACnD,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/B,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAA4B,KAAiB;QACvD,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAe,CAAC;QACzE,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAqC,MAAM,CAAC,MAAM,CAC9E,IAAI,sBAAsB,EAAE,CAC7B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { Inbox, type DeliveryLabel, type DeliveryStatus, type InboxId, InboxMess
|
|
|
21
21
|
export { InboxStorage, type InboxStorageOptions } from "./delivery/inbox-storage.js";
|
|
22
22
|
export { ShardIndex } from "./delivery/shard-index.js";
|
|
23
23
|
export { ShardedWorkRegistry, ShardSession, type ShardedWorkRegistryOptions, } from "./delivery/sharded-work-registry.js";
|
|
24
|
-
export { Aggregate, Entity, type EntityFamily, type EntityLifecycleFlags, type EntityOptions, type EntityScopeReason,
|
|
24
|
+
export { Aggregate, Entity, type EntityFamily, type EntityLifecycleFlags, type EntityOptions, type EntityScopeReason, ProcessManager, Projection, TransactionalEntity, TransactionalEntityScopeError, type TransactionalEntityScopeOperation, } from "./entity/entity.js";
|
|
25
25
|
export { type DeclaredEntityVisibility, type DescriptorFieldMetadata, DescriptorMetadataError, type DescriptorMetadataErrorCode, type DescriptorMessageSchema, describeEntityMetadata, type EntityKind, type EntityMetadata, type EntityVisibility, type FirstFieldRoutingHint, isEntitySchema, } from "./entity/entity-metadata.js";
|
|
26
26
|
export { SpecScanner } from "./entity/spec-scanner.js";
|
|
27
27
|
export { createEntityTransaction, EntityTransaction, DraftStateError, EntityTransactionStateError, type EntityTransactionAcceptedCommit, type EntityTransactionCommitResult, type CommittedVersionMetadata, type DraftStateReason, type EntityTransactionLifecycleFlags, type EntityTransactionOperation, type EntityTransactionOptions, type EntityTransactionRejectedCommit, type EntityTransactionRollbackResult, type EntityTransactionStatus, type EntityTransactionMutator, type EntityTransactionVersionMetadata, } from "./entity/entity-transaction.js";
|
|
@@ -30,17 +30,17 @@ export { type ActorContextInput, type Clock, type CommandContextInput, FixedCloc
|
|
|
30
30
|
export { type ServerRuntimeLifecycle, type ServerRuntimeRejectedState, type ServerRuntimeState, ServerRuntimeStateError, type ServerRuntimeStateOperation, type ServerRuntimeWork, type RuntimeStateErrorCode, SingleProcessServerRuntime, } from "./runtime/runtime.js";
|
|
31
31
|
export { acceptSignalIntake, failSignalIntake, type SignalIntakeAccepted, type SignalIntakeAcceptedFor, type SignalIntakeFailure, type SignalIntakeFailureCode, type SignalIntakeFailureDetails, type SignalIntakeFailureDiagnostics, type SignalIntakeResult, type SignalKind, } from "./runtime/signal-intake.js";
|
|
32
32
|
export { CommandRegistrationReadiness, type CommandRegistrationAssigneeMetadata, type CommandRegistrationReadinessLookup, } from "./handler/command-registration-readiness.js";
|
|
33
|
-
export { EventRegistrationReadiness, type
|
|
33
|
+
export { EventRegistrationReadiness, type EventRegistrationReadinessLookup, type EventRegistrationReactorMetadata, type EventRegistrationSubscriberMetadata, } from "./handler/event-registration-readiness.js";
|
|
34
34
|
export { type MessageId, type PrimitiveId } from "./repository/primitive-id.js";
|
|
35
35
|
export { CommandRouting, type CommandRoute } from "./repository/command-routing.js";
|
|
36
36
|
export type { InterfaceRouteMessage } from "./repository/routing-declarations.js";
|
|
37
37
|
export { EventRouting, type EventRoute } from "./repository/event-routing.js";
|
|
38
38
|
export { StateUpdateRouting, type StateUpdateRoute } from "./repository/state-update-routing.js";
|
|
39
39
|
export { type ConcreteRepositoryEntityType, Repository, type RepositoryCommandRoute, type RepositoryEntityType, type RepositoryEventRoute, RepositoryIdentityError, type RepositoryIdentityErrorCode, type RepositoryIdentitySnapshot, type RepositoryOptions, type RepositoryRouteInvocation, type RepositoryStateSchema, type RepositoryView, } from "./repository/repository.js";
|
|
40
|
-
export {
|
|
40
|
+
export { Assign, Command, type HandlerMethodDecorator, type HandlerMethodValue, React, Subscribe, Throws, Where, type RejectionDeclaration, type WhereOptions, materializeDecoratedEntityHandlers, } from "./handler/handler-decorators.js";
|
|
41
41
|
export type { External } from "./handler/external.js";
|
|
42
42
|
export { AbstractAssignee, AbstractCommander, AbstractEventReactor, AbstractEventSubscriber, } from "./handler/standalone.js";
|
|
43
43
|
export { GeneratedRegistryDiscovery, GeneratedRegistryDiscoveryError, type GeneratedRegistryDiscoveryOptions, type RegistryDiscoveryErrorCode, } from "./handler/generated-registry-discovery.js";
|
|
44
44
|
export { HandlerRegistryIngestionError, HandlerRegistryIngestor, type RegistryIngestionErrorCode, } from "./handler/generated-handler-registry.js";
|
|
45
|
-
export { type BaseHandlerMetadata, type CommandAssignmentHandlerMetadata, type CommandSubstitutionHandlerMetadata, type CommandReactionHandlerMetadata, type EntityClass, type EntityHandlersMetadata, type
|
|
45
|
+
export { type BaseHandlerMetadata, type CommandAssignmentHandlerMetadata, type CommandSubstitutionHandlerMetadata, type CommandReactionHandlerMetadata, type EntityClass, type EntityHandlersMetadata, type EventReactionHandlerMetadata, type EventSubscriptionHandlerMetadata, type StateSubscriptionHandlerMetadata, type HandlerKind, type HandlerOrigin, type HandlerMetadata, EntityHandlers, HandlerMetadataError, type HandlerMetadataErrorCode, HandlerMetadataRegistry, HandlerMetadataRegistryError, type HandlerRegistryErrorCode, type HandlerMetadataRegistryLookup, type HandlerMethodName, type HandlerParameterCount, type HandlerRegistrationBuilder, type RegisteredHandlerMetadata, } from "./handler/handler-metadata.js";
|
|
46
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
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K,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,GAC/B,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ export { CommandRouting } from "./repository/command-routing.js";
|
|
|
46
46
|
export { EventRouting } from "./repository/event-routing.js";
|
|
47
47
|
export { StateUpdateRouting } from "./repository/state-update-routing.js";
|
|
48
48
|
export { Repository, RepositoryIdentityError, } from "./repository/repository.js";
|
|
49
|
-
export {
|
|
49
|
+
export { Assign, Command, React, Subscribe, Throws, Where, materializeDecoratedEntityHandlers, } from "./handler/handler-decorators.js";
|
|
50
50
|
export { AbstractAssignee, AbstractCommander, AbstractEventReactor, AbstractEventSubscriber, } from "./handler/standalone.js";
|
|
51
51
|
export { GeneratedRegistryDiscovery, GeneratedRegistryDiscoveryError, } from "./handler/generated-registry-discovery.js";
|
|
52
52
|
export { HandlerRegistryIngestionError, HandlerRegistryIngestor, } from "./handler/generated-handler-registry.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,cAAc,EACd,qBAAqB,EAErB,uBAAuB,EAGvB,WAAW,GAOZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EACL,KAAK,EAOL,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,kBAAkB,GAOnB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAA6B,MAAM,8BAA8B,CAAC;AACxF,OAAO,EACL,MAAM,GAIP,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,wBAAwB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gC,CAAC;AAExC,OAAO,EAGL,6BAA6B,GAC9B,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAIL,UAAU,EAEV,cAAc,EAEd,WAAW,GACZ,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAIL,uBAAuB,EAIvB,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GASjB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,4BAA4B,GAG7B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACL,0BAA0B,GAI3B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAoC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,cAAc,EAAqB,MAAM,iCAAiC,CAAC;AAEpF,OAAO,EAAE,YAAY,EAAmB,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAyB,MAAM,sCAAsC,CAAC;AAEjG,OAAO,EAEL,UAAU,EAIV,uBAAuB,GAOxB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,MAAM,EACN,OAAO,EAGP,KAAK,EACL,SAAS,EACT,MAAM,EACN,KAAK,EAGL,kCAAkC,GACnC,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,GAGhC,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,GAExB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAaL,cAAc,EACd,oBAAoB,EAEpB,uBAAuB,EACvB,4BAA4B,GAO7B,MAAM,+BAA+B,CAAC"}
|
|
@@ -10,40 +10,75 @@ import type { CommandDispatcher } from "../bus/command-dispatcher.js";
|
|
|
10
10
|
import type { EventDispatcher } from "../bus/event-dispatcher.js";
|
|
11
11
|
import { Delivery } from "../delivery/delivery.js";
|
|
12
12
|
import { type InboxMessage, type InboxMessageInput } from "../delivery/inbox.js";
|
|
13
|
-
import { Aggregate, type
|
|
13
|
+
import { Aggregate, type EntityOptions, ProcessManager, Projection, type EntityFamily } from "../entity/entity.js";
|
|
14
14
|
import { type DescriptorFieldMetadata, type DescriptorMessageSchema, type EntityMetadata } from "../entity/entity-metadata.js";
|
|
15
15
|
import { type EventHandlerFilterPlan } from "../handler/event-handler-filter.js";
|
|
16
16
|
import { SignalMetadata } from "../runtime/signal-metadata.js";
|
|
17
|
-
import { type CommandAssignmentHandlerMetadata, type CommandReactionHandlerMetadata, type EntityHandlersMetadata, type EventReactionHandlerMetadata, type StateSubscriptionHandlerMetadata, type RegisteredHandlerMetadata, type WhereOptions } from "../handler/handler-metadata.js";
|
|
17
|
+
import { type CommandAssignmentHandlerMetadata, type CommandReactionHandlerMetadata, type EntityHandlersMetadata, type EventReactionHandlerMetadata, type StateSubscriptionHandlerMetadata, type HandlerMetadata, type RegisteredHandlerMetadata, type WhereOptions } from "../handler/handler-metadata.js";
|
|
18
18
|
import { type Stand } from "../stand/stand.js";
|
|
19
|
-
type RepositoryEntityInstance<Schema extends DescriptorMessageSchema = DescriptorMessageSchema> = Aggregate<unknown, Schema, unknown> | Projection<unknown, Schema, unknown> | ProcessManager<unknown, Schema, unknown>;
|
|
20
19
|
/**
|
|
21
|
-
*
|
|
20
|
+
* Represents an Aggregate, Projection, or Process Manager with a state schema.
|
|
21
|
+
*
|
|
22
|
+
* @typeParam Schema Generated state schema of the Entity instance.
|
|
23
|
+
*/
|
|
24
|
+
type RepositoryEntityInstance<Schema extends DescriptorMessageSchema = DescriptorMessageSchema> = Aggregate<unknown, Schema> | Projection<unknown, Schema> | ProcessManager<unknown, Schema>;
|
|
25
|
+
/**
|
|
26
|
+
* Generated state schema declared by a repository's Entity class.
|
|
27
|
+
*
|
|
28
|
+
* @typeParam EntityType Entity constructor whose state schema is selected.
|
|
29
|
+
*/
|
|
30
|
+
export type RepositoryStateSchema<EntityType extends RepositoryEntityType> = EntityType["prototype"] extends Aggregate<unknown, infer Schema> ? Schema : EntityType["prototype"] extends Projection<unknown, infer Schema> ? Schema : EntityType["prototype"] extends ProcessManager<unknown, infer Schema> ? Schema : never;
|
|
31
|
+
/**
|
|
32
|
+
* Selects the ID type declared by a repository Entity constructor.
|
|
33
|
+
*
|
|
34
|
+
* @typeParam EntityType Entity constructor whose ID type is selected.
|
|
35
|
+
*/
|
|
36
|
+
type RepositoryEntityId<EntityType extends RepositoryEntityType> = EntityType["prototype"] extends Aggregate<infer Id, DescriptorMessageSchema> ? Id : EntityType["prototype"] extends Projection<infer Id, DescriptorMessageSchema> ? Id : EntityType["prototype"] extends ProcessManager<infer Id, DescriptorMessageSchema> ? Id : never;
|
|
37
|
+
/**
|
|
38
|
+
* Describes handler metadata compatible with an Entity constructor.
|
|
39
|
+
*
|
|
40
|
+
* @typeParam EntityType Entity constructor represented by the handlers.
|
|
22
41
|
*/
|
|
23
|
-
export type RepositoryStateSchema<EntityType extends RepositoryEntityType> = EntityType["prototype"] extends Aggregate<infer Id, infer Schema, infer Version> ? [Id, Version] extends [unknown, unknown] ? Schema : never : EntityType["prototype"] extends Projection<infer Id, infer Schema, infer Version> ? [Id, Version] extends [unknown, unknown] ? Schema : never : EntityType["prototype"] extends ProcessManager<infer Id, infer Schema, infer Version> ? [Id, Version] extends [unknown, unknown] ? Schema : never : never;
|
|
24
|
-
type RepositoryEntityId<EntityType extends RepositoryEntityType> = EntityType["prototype"] extends Aggregate<infer Id, DescriptorMessageSchema, unknown> ? Id : EntityType["prototype"] extends Projection<infer Id, DescriptorMessageSchema, unknown> ? Id : EntityType["prototype"] extends ProcessManager<infer Id, DescriptorMessageSchema, unknown> ? Id : never;
|
|
25
42
|
type RepositoryHandlers<EntityType extends RepositoryEntityType> = EntityType["prototype"] extends infer Instance extends object ? EntityHandlersMetadata<Instance, RepositoryStateSchema<EntityType>> : never;
|
|
26
|
-
|
|
27
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Accepts one or several handler metadata blocks for an Entity constructor.
|
|
45
|
+
*
|
|
46
|
+
* @typeParam EntityType Entity constructor represented by the handlers.
|
|
47
|
+
*/
|
|
48
|
+
type RepositoryHandlersOptionFor<EntityType extends RepositoryEntityType> = RepositoryHandlers<EntityType> | readonly RepositoryHandlers<EntityType>[];
|
|
49
|
+
/**
|
|
50
|
+
* Allows state-update routing only for Projection constructors.
|
|
51
|
+
*
|
|
52
|
+
* @typeParam EntityType Entity constructor being configured.
|
|
53
|
+
*/
|
|
54
|
+
type StateRoutingOption<EntityType extends RepositoryEntityType> = EntityType["prototype"] extends Projection<unknown, DescriptorMessageSchema> ? StateUpdateRouting<RepositoryEntityId<EntityType>> : never;
|
|
55
|
+
/**
|
|
56
|
+
* Detects a TypeScript union while preserving the complete input type.
|
|
57
|
+
*
|
|
58
|
+
* @typeParam Type Candidate type to test.
|
|
59
|
+
* @typeParam Union Original unsplit candidate type.
|
|
60
|
+
*/
|
|
28
61
|
type IsUnion<Type, Union = Type> = Type extends unknown ? [Union] extends [Type] ? false : true : false;
|
|
29
62
|
/**
|
|
30
|
-
*
|
|
63
|
+
* Checks whether a repository binds one concrete Entity class and state schema.
|
|
31
64
|
*
|
|
32
65
|
* Concrete aggregate, projection, and process-manager classes satisfy this type naturally. Broad
|
|
33
66
|
* constructor aliases, constructor unions, broad state schemas, and state-schema unions are
|
|
34
|
-
* rejected so repository
|
|
67
|
+
* rejected so a repository cannot lose its Entity class's state schema.
|
|
68
|
+
*
|
|
69
|
+
* @typeParam EntityType Candidate concrete Entity constructor.
|
|
35
70
|
*/
|
|
36
71
|
export type ConcreteRepositoryEntityType<EntityType extends RepositoryEntityType> = IsUnion<EntityType> extends true ? never : RepositoryEntityType extends EntityType ? never : [ConstructorParameters<EntityType>] extends [never[]] ? never : IsUnion<RepositoryStateSchema<EntityType>> extends true ? never : DescriptorMessageSchema extends RepositoryStateSchema<EntityType> ? never : unknown;
|
|
37
72
|
/**
|
|
38
|
-
* Describes an
|
|
73
|
+
* Describes an Aggregate, Projection, or Process Manager class accepted by a repository.
|
|
39
74
|
*
|
|
40
|
-
* @typeParam Instance
|
|
75
|
+
* @typeParam Instance The aggregate, projection, or process-manager instance type.
|
|
41
76
|
* @param args The constructor arguments accepted by the entity class.
|
|
42
77
|
* @returns An entity instance.
|
|
43
78
|
*/
|
|
44
|
-
export type RepositoryEntityType<Instance extends RepositoryEntityInstance = RepositoryEntityInstance> = (abstract new (...args: never[]) => Instance) &
|
|
79
|
+
export type RepositoryEntityType<Instance extends RepositoryEntityInstance = RepositoryEntityInstance> = (abstract new (...args: never[]) => Instance) & {
|
|
45
80
|
/**
|
|
46
|
-
* Prototype
|
|
81
|
+
* Prototype used to identify the Entity family and state schema.
|
|
47
82
|
*/
|
|
48
83
|
readonly prototype: Instance;
|
|
49
84
|
/**
|
|
@@ -52,30 +87,36 @@ export type RepositoryEntityType<Instance extends RepositoryEntityInstance = Rep
|
|
|
52
87
|
readonly name: string;
|
|
53
88
|
};
|
|
54
89
|
/**
|
|
55
|
-
*
|
|
90
|
+
* Entity class, state schema, and routing options for a repository.
|
|
56
91
|
*
|
|
57
|
-
* @typeParam EntityType
|
|
92
|
+
* @typeParam EntityType A single concrete aggregate, projection, or process-manager constructor.
|
|
58
93
|
* The constructor's prototype must carry one concrete generated state schema; broad constructor,
|
|
59
94
|
* constructor-union, broad-schema, and schema-union bindings are rejected at compile time.
|
|
60
95
|
*/
|
|
61
|
-
|
|
96
|
+
interface RepositoryOptionsBase<EntityType extends RepositoryEntityType & ConcreteRepositoryEntityType<EntityType>> {
|
|
62
97
|
/**
|
|
63
|
-
* Entity
|
|
98
|
+
* Entity class constructed by this repository.
|
|
64
99
|
*/
|
|
65
100
|
readonly entityType: EntityType;
|
|
66
101
|
/**
|
|
67
|
-
* Generated
|
|
102
|
+
* Generated schema for this repository's Entity state.
|
|
68
103
|
*/
|
|
69
104
|
readonly schema: RepositoryStateSchema<EntityType>;
|
|
70
105
|
/**
|
|
71
|
-
*
|
|
106
|
+
* Constructs each new or restored Entity with application dependencies.
|
|
107
|
+
*
|
|
108
|
+
* The callback receives the framework's ID, schema, state, Version, and lifecycle options.
|
|
109
|
+
* It must synchronously return a fresh instance of `entityType` that passes those options to
|
|
110
|
+
* the Entity base constructor. Shared services should be created before context startup and
|
|
111
|
+
* closed by the application after context shutdown.
|
|
72
112
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*
|
|
113
|
+
* @param options Framework identity, state, Version, and lifecycle values.
|
|
114
|
+
* @returns A synchronous instance of the registered Entity class.
|
|
115
|
+
*/
|
|
116
|
+
readonly onCreate?: (options: EntityOptions<RepositoryEntityId<EntityType>, RepositoryStateSchema<EntityType>>) => InstanceType<EntityType>;
|
|
117
|
+
/**
|
|
118
|
+
* Explicit handler metadata used to register repository command and event routing.
|
|
119
|
+
* The metadata must describe this repository's Entity constructor and state schema.
|
|
79
120
|
*/
|
|
80
121
|
readonly handlers?: RepositoryHandlersOptionFor<EntityType>;
|
|
81
122
|
/**
|
|
@@ -121,32 +162,63 @@ export interface RepositoryOptions<EntityType extends RepositoryEntityType & Con
|
|
|
121
162
|
readonly depth?: number;
|
|
122
163
|
};
|
|
123
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Requires a creation callback when the Entity constructor needs application arguments.
|
|
167
|
+
*
|
|
168
|
+
* @typeParam EntityType Concrete Entity constructor configured by this repository.
|
|
169
|
+
*/
|
|
170
|
+
type RepositoryCreationOption<EntityType extends RepositoryEntityType> = [EntityType] extends [
|
|
171
|
+
new (options: EntityOptions<RepositoryEntityId<EntityType>, RepositoryStateSchema<EntityType>>) => InstanceType<EntityType>
|
|
172
|
+
] ? {
|
|
173
|
+
readonly onCreate?: OnCreate<EntityType>;
|
|
174
|
+
} : {
|
|
175
|
+
readonly onCreate: OnCreate<EntityType>;
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* Constructs the registered Entity from framework-supplied options.
|
|
179
|
+
*
|
|
180
|
+
* @typeParam EntityType Concrete Entity constructor configured by the repository.
|
|
181
|
+
* @param options Framework identity, state, Version, and lifecycle values.
|
|
182
|
+
* @returns One new Entity instance.
|
|
183
|
+
*/
|
|
184
|
+
type OnCreate<EntityType extends RepositoryEntityType> = (options: EntityOptions<RepositoryEntityId<EntityType>, RepositoryStateSchema<EntityType>>) => InstanceType<EntityType>;
|
|
185
|
+
/**
|
|
186
|
+
* Configures repository identity, routing, and optional Entity constructor injection.
|
|
187
|
+
*
|
|
188
|
+
* `onCreate` is required when `EntityType` needs constructor arguments beyond framework
|
|
189
|
+
* `EntityOptions`. The callback runs for new and restored instances before handlers; it receives
|
|
190
|
+
* the authoritative options and must return a synchronous instance of the registered class.
|
|
191
|
+
* Framework history, queries, transactions, and persistence remain configured separately.
|
|
192
|
+
*
|
|
193
|
+
* @typeParam EntityType A single concrete Entity constructor and state schema.
|
|
194
|
+
*/
|
|
195
|
+
export type RepositoryOptions<EntityType extends RepositoryEntityType & ConcreteRepositoryEntityType<EntityType>> = RepositoryOptionsBase<EntityType> & RepositoryCreationOption<EntityType>;
|
|
124
196
|
/**
|
|
125
197
|
* Immutable copy-safe repository identity snapshot.
|
|
126
198
|
*
|
|
127
|
-
* @typeParam EntityType
|
|
199
|
+
* @typeParam EntityType The concrete entity constructor represented by the repository. The snapshot's
|
|
128
200
|
* state schema and metadata are derived from this constructor so callers cannot spell an impossible
|
|
129
201
|
* entity/schema snapshot pair.
|
|
130
202
|
*/
|
|
131
203
|
export interface RepositoryIdentitySnapshot<EntityType extends RepositoryEntityType = RepositoryEntityType> {
|
|
132
204
|
/**
|
|
133
|
-
* Entity
|
|
205
|
+
* Entity class registered with the repository.
|
|
134
206
|
*/
|
|
135
207
|
readonly entityType: EntityType;
|
|
136
208
|
/**
|
|
137
|
-
*
|
|
209
|
+
* Aggregate, Projection, or Process Manager family of the Entity class.
|
|
138
210
|
*/
|
|
139
211
|
readonly entityFamily: EntityFamily;
|
|
140
212
|
/**
|
|
141
|
-
* Generated
|
|
213
|
+
* Generated schema for the Entity state.
|
|
142
214
|
*/
|
|
143
215
|
readonly stateSchema: RepositoryStateSchema<EntityType>;
|
|
144
216
|
/**
|
|
145
|
-
* Descriptor
|
|
217
|
+
* Descriptor metadata for the Entity state.
|
|
146
218
|
*/
|
|
147
219
|
readonly metadata: EntityMetadata<RepositoryStateSchema<EntityType>>;
|
|
148
220
|
/**
|
|
149
|
-
* Fully qualified Protobuf
|
|
221
|
+
* Fully qualified Protobuf name of the Entity state type.
|
|
150
222
|
*/
|
|
151
223
|
readonly stateFullTypeName: RepositoryStateSchema<EntityType>["typeName"];
|
|
152
224
|
/**
|
|
@@ -159,23 +231,23 @@ export interface RepositoryIdentitySnapshot<EntityType extends RepositoryEntityT
|
|
|
159
231
|
*/
|
|
160
232
|
export interface RepositoryView {
|
|
161
233
|
/**
|
|
162
|
-
* Entity
|
|
234
|
+
* Entity class registered with the repository.
|
|
163
235
|
*/
|
|
164
236
|
readonly entityType: RepositoryEntityType;
|
|
165
237
|
/**
|
|
166
|
-
*
|
|
238
|
+
* Aggregate, Projection, or Process Manager family of the Entity class.
|
|
167
239
|
*/
|
|
168
240
|
readonly entityFamily: EntityFamily;
|
|
169
241
|
/**
|
|
170
|
-
* Generated
|
|
242
|
+
* Generated schema for the Entity state.
|
|
171
243
|
*/
|
|
172
244
|
readonly stateSchema: DescriptorMessageSchema;
|
|
173
245
|
/**
|
|
174
|
-
* Descriptor
|
|
246
|
+
* Descriptor metadata for the Entity state.
|
|
175
247
|
*/
|
|
176
248
|
readonly metadata: EntityMetadata;
|
|
177
249
|
/**
|
|
178
|
-
* Fully qualified Protobuf
|
|
250
|
+
* Fully qualified Protobuf name of the Entity state type.
|
|
179
251
|
*/
|
|
180
252
|
readonly stateFullTypeName: string;
|
|
181
253
|
/**
|
|
@@ -192,7 +264,7 @@ export interface RepositoryView {
|
|
|
192
264
|
*/
|
|
193
265
|
export type RepositoryIdentityErrorCode = "ENTITY_SCHEMA_KIND_MISMATCH" | "UNSUPPORTED_ENTITY_TYPE";
|
|
194
266
|
/**
|
|
195
|
-
*
|
|
267
|
+
* Error raised when an Entity class and state schema cannot form a repository.
|
|
196
268
|
*/
|
|
197
269
|
export declare class RepositoryIdentityError extends Error {
|
|
198
270
|
/**
|
|
@@ -208,30 +280,17 @@ export declare class RepositoryIdentityError extends Error {
|
|
|
208
280
|
constructor(code: RepositoryIdentityErrorCode, message: string);
|
|
209
281
|
}
|
|
210
282
|
/**
|
|
211
|
-
*
|
|
283
|
+
* Configures storage and handlers for one Entity class.
|
|
212
284
|
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* and hand already-stored events to the event bus. Aggregate and process-manager command
|
|
220
|
-
* execution require `command.id` before routing or mutation so produced events
|
|
221
|
-
* can carry a contract-valid command origin. With authentic projection
|
|
222
|
-
* subscriber metadata, built contexts can also execute projection subscribers
|
|
223
|
-
* and write changed projection state through the context-owned `Stand`. With
|
|
224
|
-
* authentic process-manager metadata, built contexts can execute command
|
|
225
|
-
* assignees, event reactors, and event-commanding handlers, storing changed
|
|
226
|
-
* process-manager state through tenant-scoped Stand records with numeric
|
|
227
|
-
* versions. The `events` option declares generated event schemas emitted by
|
|
228
|
-
* aggregate and process-manager producer handlers. The repository surface still
|
|
229
|
-
* does not expose direct entity lookup/storage APIs, inbox/delivery management,
|
|
230
|
-
* caches, lifecycle monitors, or transport startup.
|
|
285
|
+
* Construction selects the Entity class, state schema, routing, and optional
|
|
286
|
+
* creation callback. A Bounded Context builder registers the repository. During
|
|
287
|
+
* context assembly, it opens record storage and installs handlers and Inbox
|
|
288
|
+
* targets. Aggregate handlers store state and a diagnostic event journal;
|
|
289
|
+
* Projection and Process Manager handlers store state in Stand. The `events`
|
|
290
|
+
* option lists generated event schemas that handlers may emit.
|
|
231
291
|
*
|
|
232
|
-
* @typeParam EntityType
|
|
233
|
-
* with one
|
|
234
|
-
* schema-union bindings intentionally fail the public type constraint.
|
|
292
|
+
* @typeParam EntityType One concrete Aggregate, Projection, or Process Manager
|
|
293
|
+
* class with one generated state schema.
|
|
235
294
|
*/
|
|
236
295
|
export declare class Repository<EntityType extends RepositoryEntityType & ConcreteRepositoryEntityType<EntityType>> implements RepositoryView {
|
|
237
296
|
#private;
|
|
@@ -242,9 +301,9 @@ export declare class Repository<EntityType extends RepositoryEntityType & Concre
|
|
|
242
301
|
*/
|
|
243
302
|
constructor(options: RepositoryOptions<EntityType>);
|
|
244
303
|
/**
|
|
245
|
-
* Returns the
|
|
304
|
+
* Returns the Entity class registered with this repository.
|
|
246
305
|
*
|
|
247
|
-
* @returns The
|
|
306
|
+
* @returns The registered Entity class.
|
|
248
307
|
*/
|
|
249
308
|
get entityType(): EntityType;
|
|
250
309
|
/**
|
|
@@ -256,7 +315,7 @@ export declare class Repository<EntityType extends RepositoryEntityType & Concre
|
|
|
256
315
|
/**
|
|
257
316
|
* Returns the generated schema for this repository's entity state.
|
|
258
317
|
*
|
|
259
|
-
* @returns The
|
|
318
|
+
* @returns The Entity state schema.
|
|
260
319
|
*/
|
|
261
320
|
get stateSchema(): RepositoryStateSchema<EntityType>;
|
|
262
321
|
/**
|
|
@@ -269,13 +328,13 @@ export declare class Repository<EntityType extends RepositoryEntityType & Concre
|
|
|
269
328
|
*/
|
|
270
329
|
setStateHistoryEnabled(enabled: boolean): void;
|
|
271
330
|
/**
|
|
272
|
-
* Returns descriptor
|
|
331
|
+
* Returns descriptor metadata for this repository's Entity state.
|
|
273
332
|
*
|
|
274
|
-
* @returns
|
|
333
|
+
* @returns Descriptor metadata for the Entity state.
|
|
275
334
|
*/
|
|
276
335
|
get metadata(): EntityMetadata<RepositoryStateSchema<EntityType>>;
|
|
277
336
|
/**
|
|
278
|
-
* Returns the fully qualified Protobuf name of the
|
|
337
|
+
* Returns the fully qualified Protobuf name of the Entity state.
|
|
279
338
|
*
|
|
280
339
|
* @returns The state message type name.
|
|
281
340
|
*/
|
|
@@ -322,6 +381,8 @@ export declare class Repository<EntityType extends RepositoryEntityType & Concre
|
|
|
322
381
|
export type RepositoryRouteInvocation = "deferred";
|
|
323
382
|
/**
|
|
324
383
|
* Command route calculated by a repository.
|
|
384
|
+
*
|
|
385
|
+
* @typeParam Id Target Entity identifier type.
|
|
325
386
|
*/
|
|
326
387
|
export interface RepositoryCommandRoute<Id = unknown> {
|
|
327
388
|
/**
|
|
@@ -339,6 +400,8 @@ export interface RepositoryCommandRoute<Id = unknown> {
|
|
|
339
400
|
}
|
|
340
401
|
/**
|
|
341
402
|
* Event route calculated by a repository.
|
|
403
|
+
*
|
|
404
|
+
* @typeParam Id Target Entity identifier type.
|
|
342
405
|
*/
|
|
343
406
|
export interface RepositoryEventRoute<Id = unknown> {
|
|
344
407
|
/**
|
|
@@ -357,6 +420,7 @@ export interface RepositoryEventRoute<Id = unknown> {
|
|
|
357
420
|
/**
|
|
358
421
|
* Route calculated for one unpacked Entity state update.
|
|
359
422
|
*
|
|
423
|
+
* @typeParam Id Target Projection identifier type.
|
|
360
424
|
* @internal Framework delivery metadata.
|
|
361
425
|
*/
|
|
362
426
|
interface RepositoryStateUpdateRoute<Id = unknown> extends RepositoryEventRoute<Id> {
|
|
@@ -401,13 +465,13 @@ export interface EntityInboxTarget {
|
|
|
401
465
|
replay(message: EntityInboxMessage, deliveryTenantId?: TenantId): EntityInboxReplay;
|
|
402
466
|
}
|
|
403
467
|
/**
|
|
404
|
-
*
|
|
468
|
+
* Operations the Bounded Context uses to deliver Entity Inbox messages.
|
|
405
469
|
*
|
|
406
470
|
* @internal
|
|
407
471
|
*/
|
|
408
472
|
export interface EntityInbox {
|
|
409
473
|
/**
|
|
410
|
-
* Returns the
|
|
474
|
+
* Returns the strategy that maps Entity Inbox targets to shards.
|
|
411
475
|
*
|
|
412
476
|
* @returns The immutable delivery strategy.
|
|
413
477
|
*/
|
|
@@ -471,7 +535,7 @@ export interface ProjectionInboxTarget {
|
|
|
471
535
|
replay(message: ProjectionInboxMessage, deliveryTenantId?: TenantId): Promise<void>;
|
|
472
536
|
}
|
|
473
537
|
/**
|
|
474
|
-
*
|
|
538
|
+
* Operations the Bounded Context uses to deliver Projection Inbox messages.
|
|
475
539
|
*
|
|
476
540
|
* @internal
|
|
477
541
|
*/
|
|
@@ -617,25 +681,108 @@ type RepositoryStateSubscribers = readonly RegisteredHandlerMetadata<StateSubscr
|
|
|
617
681
|
* Internal repository handlers operations.
|
|
618
682
|
*/
|
|
619
683
|
declare const RepositoryHandlers: {
|
|
684
|
+
/**
|
|
685
|
+
* Rejects outputs not declared by the invoked handler, even if a sibling declares them.
|
|
686
|
+
*
|
|
687
|
+
* @param handler Invoked handler declaration.
|
|
688
|
+
* @param signals Returned domain messages to validate.
|
|
689
|
+
*/
|
|
690
|
+
requireDeclaredOutputs(handler: HandlerMetadata, signals: readonly unknown[]): void;
|
|
691
|
+
/**
|
|
692
|
+
* Normalizes one or many handler metadata blocks to a frozen list.
|
|
693
|
+
*
|
|
694
|
+
* @param handlersOption Configured handler metadata.
|
|
695
|
+
* @returns Frozen handler metadata list.
|
|
696
|
+
*/
|
|
620
697
|
normalizeHandlers(handlersOption: RepositoryHandlersOption): readonly EntityHandlersMetadata[];
|
|
698
|
+
/**
|
|
699
|
+
* Groups Event-to-Command reactions by source Event type.
|
|
700
|
+
*
|
|
701
|
+
* @param handlers Entity handler metadata blocks.
|
|
702
|
+
* @returns Reactions indexed by Event type name.
|
|
703
|
+
*/
|
|
621
704
|
createCommandReactionMap(handlers: readonly EntityHandlersMetadata[]): ReadonlyMap<string, readonly RegisteredHandlerMetadata<CommandReactionHandlerMetadata>[]>;
|
|
705
|
+
/**
|
|
706
|
+
* Builds Event field filters for handlers grouped by Event type.
|
|
707
|
+
*
|
|
708
|
+
* @typeParam Value Handler registration carrying schema and filter metadata.
|
|
709
|
+
* @param byEvent Handler registrations indexed by Event type.
|
|
710
|
+
* @param stringifiers Field conversion registry for message-valued filters.
|
|
711
|
+
* @returns Compiled filter plans by Event type.
|
|
712
|
+
*/
|
|
622
713
|
createEventFilterPlans<Value extends {
|
|
623
714
|
readonly handler: {
|
|
624
715
|
readonly schema: DescriptorMessageSchema;
|
|
625
716
|
readonly where?: WhereOptions;
|
|
626
717
|
};
|
|
627
718
|
}>(byEvent: ReadonlyMap<string, readonly Value[]>, stringifiers: StringifierRegistry): ReadonlyMap<string, EventHandlerFilterPlan<Value>>;
|
|
719
|
+
/**
|
|
720
|
+
* Finds handlers for domestic or external Event origin.
|
|
721
|
+
*
|
|
722
|
+
* @typeParam Value Handler registration with origin metadata.
|
|
723
|
+
* @param values Candidate handler registrations.
|
|
724
|
+
* @param external Whether the source Event is external.
|
|
725
|
+
* @returns Frozen matching registration list.
|
|
726
|
+
*/
|
|
628
727
|
forOrigin<Value extends {
|
|
629
728
|
readonly handler: {
|
|
630
729
|
readonly origin: "domestic" | "external";
|
|
631
730
|
};
|
|
632
731
|
}>(values: readonly Value[], external: boolean): readonly Value[];
|
|
732
|
+
/**
|
|
733
|
+
* Maps readiness-selected handlers by registered message type.
|
|
734
|
+
*
|
|
735
|
+
* @typeParam Value Handler registration returned by readiness lookup.
|
|
736
|
+
* @param schemas Registered message schemas.
|
|
737
|
+
* @param find Selects handlers for one type name.
|
|
738
|
+
* @returns Handler lists indexed by message type name.
|
|
739
|
+
*/
|
|
633
740
|
readinessMap<Value>(schemas: readonly MessageSchema[], find: (typeName: string) => readonly Value[]): ReadonlyMap<string, readonly Value[]>;
|
|
741
|
+
/**
|
|
742
|
+
* Reads the declared output schemas for one handler.
|
|
743
|
+
*
|
|
744
|
+
* @param handler Command or Event handler declaration.
|
|
745
|
+
* @returns Generated schemas the handler may emit.
|
|
746
|
+
*/
|
|
634
747
|
handlerEmittedSchemas(handler: CommandAssignmentHandlerMetadata | import("../handler/handler-metadata.js").CommandSubstitutionHandlerMetadata | CommandReactionHandlerMetadata | EventReactionHandlerMetadata): readonly DescriptorMessageSchema[];
|
|
748
|
+
/**
|
|
749
|
+
* Reads the declared rejection schemas for a Command handler.
|
|
750
|
+
*
|
|
751
|
+
* @param handler Assignment or substitution declaration.
|
|
752
|
+
* @returns Generated rejection schemas the handler may throw.
|
|
753
|
+
*/
|
|
635
754
|
handlerThrownSchemas(handler: CommandAssignmentHandlerMetadata | import("../handler/handler-metadata.js").CommandSubstitutionHandlerMetadata): readonly DescriptorMessageSchema[];
|
|
755
|
+
/**
|
|
756
|
+
* Checks whether handler metadata was supplied as a list.
|
|
757
|
+
*
|
|
758
|
+
* @param value Configured handler metadata.
|
|
759
|
+
* @returns Whether it is a handler list.
|
|
760
|
+
*/
|
|
636
761
|
isHandlersArray(value: RepositoryHandlersOption): value is readonly EntityHandlersMetadata[];
|
|
762
|
+
/**
|
|
763
|
+
* Validates handler metadata against the Entity constructor and family.
|
|
764
|
+
*
|
|
765
|
+
* @param entityType Repository Entity constructor.
|
|
766
|
+
* @param metadata Descriptor-derived state metadata.
|
|
767
|
+
* @param handlers Handler metadata blocks to validate.
|
|
768
|
+
*/
|
|
637
769
|
validateHandlers(entityType: RepositoryEntityType, metadata: EntityMetadata, handlers: readonly EntityHandlersMetadata[]): void;
|
|
770
|
+
/**
|
|
771
|
+
* Returns unique generated schemas by type URL.
|
|
772
|
+
*
|
|
773
|
+
* @param schemas Candidate message schemas.
|
|
774
|
+
* @returns Frozen list retaining the last schema for each type URL.
|
|
775
|
+
*/
|
|
638
776
|
uniqueSchemas(schemas: readonly MessageSchema[]): readonly MessageSchema[];
|
|
777
|
+
/**
|
|
778
|
+
* Adds a value to a map entry, creating its list when absent.
|
|
779
|
+
*
|
|
780
|
+
* @typeParam Key Map key type.
|
|
781
|
+
* @typeParam Value Map value type.
|
|
782
|
+
* @param map Mutable map of value lists.
|
|
783
|
+
* @param key Entry key to update.
|
|
784
|
+
* @param value Value to append.
|
|
785
|
+
*/
|
|
639
786
|
pushMapValue<Key, Value>(map: Map<Key, Value[]>, key: Key, value: Value): void;
|
|
640
787
|
};
|
|
641
788
|
/**
|
|
@@ -645,7 +792,7 @@ declare const repositoryHistory: {
|
|
|
645
792
|
/**
|
|
646
793
|
* Creates a cache that extends a repository history only when a caller requests more entries.
|
|
647
794
|
*
|
|
648
|
-
* @typeParam Entry
|
|
795
|
+
* @typeParam Entry The history entry type.
|
|
649
796
|
* @param load Loads entries before an optional continuation version.
|
|
650
797
|
* @param versionOf Reads the optional version carried by an entry.
|
|
651
798
|
* @param options Selects strictly descending-version and complete-group behavior.
|