@velony/domain 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -121,7 +121,7 @@ class OrderId extends Id<string> {
121
121
  }
122
122
 
123
123
  class OrderPlacedEvent extends DomainEvent<{ total: number }> {
124
- static readonly type = 'order.placed';
124
+ public readonly type = 'order.placed';
125
125
 
126
126
  constructor(aggregateId: string, total: number) {
127
127
  super(aggregateId, { total });
@@ -161,7 +161,7 @@ interface UserRegisteredPayload {
161
161
  }
162
162
 
163
163
  class UserRegisteredEvent extends DomainEvent<UserRegisteredPayload> {
164
- static readonly type = 'user.registered';
164
+ public readonly type = 'user.registered';
165
165
 
166
166
  constructor(aggregateId: string, email: string, name: string) {
167
167
  super(aggregateId, { email, name });
@@ -214,15 +214,15 @@ StoragePath.create('files//data'); // Error: Storage path contains invalid doubl
214
214
 
215
215
  ### `AggregateRoot<TIdentifier>`
216
216
  - Extends `Entity<TIdentifier>`
217
- - `pullDomainEvents(): DomainEvent<any>[]` - Retrieve and clear events
218
- - `pushDomainEvent(event: DomainEvent<any>): void` - Add event (protected)
217
+ - `pullDomainEvents(): DomainEvent<any, any>[]` - Retrieve and clear events
218
+ - `pushDomainEvent(event: DomainEvent<any, any>): void` - Add event (protected)
219
219
 
220
220
  ### `DomainEvent<TPayload>`
221
221
  - `id: string` - Unique event ID (UUIDv7)
222
222
  - `aggregateId: string` - ID of the aggregate that produced the event
223
223
  - `payload: TPayload` - Event-specific data
224
224
  - `occurredAt: Date` - Timestamp of occurrence
225
- - `type: string` - Event type identifier
225
+ - `type: string` - Event type identifier (abstract, must be implemented)
226
226
 
227
227
  ## License
228
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velony/domain",
3
- "version": "1.1.2",
3
+ "version": "2.0.0",
4
4
  "description": "TypeScript library providing core building blocks for Domain-Driven Design (DDD) applications",
5
5
  "keywords": [
6
6
  "ddd",