import { Constructor } from '@dolittle/types'; import { Abstract } from '@dolittle/sdk.dependencyinversion'; import { EventSourceIdLike } from '@dolittle/sdk.events'; import { AggregateRoot } from './AggregateRoot'; import { IAggregateRootOperations } from './IAggregateRootOperations'; /** * Defines a way to work with an {@link AggregateRoot}. * @template TAggregate */ export declare abstract class IAggregateOf { /** * Create a new {@link AggregateRoot} with a random {@link EventSourceId}. * @returns {IAggregateRootOperations} */ abstract create(): IAggregateRootOperations; /** * Gets an {@link AggregateRoot} with a given {@link EventSourceId}. * @param {EventSourceIdLike} eventSourceId - {@link EventSourceId} Of the {@link AggregateRoot}. * @returns {IAggregateRootOperations} */ abstract get(eventSourceId: EventSourceIdLike): IAggregateRootOperations; /** * Gets a {@link ServiceIdentifier} for an {@link AggregateRoot} type to inject an {@link IAggragateOf} from the service provider. * @param {Constructor} type - The type of the aggregate root. * @returns {Abstract} The service identifier to use for injection. */ static for(type: Constructor): Abstract>; } //# sourceMappingURL=IAggregateOf.d.ts.map