wsp-ms-core 1.0.78-beta → 1.0.78-beta-1

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/dist/index.d.mts CHANGED
@@ -51,18 +51,6 @@ declare class DateTime extends ValueObject<string> {
51
51
  static now(): DateTime;
52
52
  }
53
53
 
54
- declare abstract class BaseEvent {
55
- private readonly _version;
56
- private readonly _type;
57
- private readonly _payload;
58
- private readonly _occurredAt;
59
- protected constructor(version: string, type: string, payload: Record<string, unknown>);
60
- get version(): string;
61
- get type(): string;
62
- get payload(): Record<string, unknown>;
63
- get ocurredAt(): DateTime;
64
- }
65
-
66
54
  type UUIDVersion = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
67
55
  interface UUIDValidationOptions {
68
56
  /** Versiones permitidas (por defecto: 1–8) */
@@ -82,6 +70,20 @@ declare class UUID extends ValueObject<string> {
82
70
  static isValid(uuid: string, opts?: UUIDValidationOptions): boolean;
83
71
  }
84
72
 
73
+ declare abstract class BaseEvent {
74
+ protected readonly _tenantUuid: UUID;
75
+ protected readonly _version: string;
76
+ protected readonly _type: string;
77
+ protected readonly _payload: Record<string, unknown>;
78
+ protected readonly _occurredAt: DateTime;
79
+ protected constructor(tenantUuid: UUID, version: string, type: string, payload: Record<string, unknown>);
80
+ get tenantUuid(): UUID;
81
+ get version(): string;
82
+ get type(): string;
83
+ get payload(): Record<string, unknown>;
84
+ get ocurredAt(): DateTime;
85
+ }
86
+
85
87
  declare class ProcessStatus extends ValueObject<string> {
86
88
  static readonly SUPPORTED: readonly string[];
87
89
  static readonly PENDING: ProcessStatus;
@@ -182,7 +184,7 @@ declare class UsageError extends DomainError {
182
184
  declare class DomainEvent extends BaseEvent {
183
185
  protected readonly _aggregateUuid: UUID;
184
186
  protected readonly _aggregateType: string;
185
- protected constructor(version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
187
+ protected constructor(tenantUuid: UUID, version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
186
188
  get aggregateUuid(): UUID;
187
189
  get aggregateType(): string;
188
190
  }
@@ -376,7 +378,7 @@ interface EventBusRepository {
376
378
  declare class IntegrationEvent extends BaseEvent {
377
379
  protected readonly _aggregateUuid: UUID;
378
380
  protected readonly _aggregateType: string;
379
- protected constructor(version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
381
+ protected constructor(tenantUuid: UUID, version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
380
382
  get aggregateUuid(): UUID;
381
383
  get aggregateType(): string;
382
384
  }
package/dist/index.d.ts CHANGED
@@ -51,18 +51,6 @@ declare class DateTime extends ValueObject<string> {
51
51
  static now(): DateTime;
52
52
  }
53
53
 
54
- declare abstract class BaseEvent {
55
- private readonly _version;
56
- private readonly _type;
57
- private readonly _payload;
58
- private readonly _occurredAt;
59
- protected constructor(version: string, type: string, payload: Record<string, unknown>);
60
- get version(): string;
61
- get type(): string;
62
- get payload(): Record<string, unknown>;
63
- get ocurredAt(): DateTime;
64
- }
65
-
66
54
  type UUIDVersion = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
67
55
  interface UUIDValidationOptions {
68
56
  /** Versiones permitidas (por defecto: 1–8) */
@@ -82,6 +70,20 @@ declare class UUID extends ValueObject<string> {
82
70
  static isValid(uuid: string, opts?: UUIDValidationOptions): boolean;
83
71
  }
84
72
 
73
+ declare abstract class BaseEvent {
74
+ protected readonly _tenantUuid: UUID;
75
+ protected readonly _version: string;
76
+ protected readonly _type: string;
77
+ protected readonly _payload: Record<string, unknown>;
78
+ protected readonly _occurredAt: DateTime;
79
+ protected constructor(tenantUuid: UUID, version: string, type: string, payload: Record<string, unknown>);
80
+ get tenantUuid(): UUID;
81
+ get version(): string;
82
+ get type(): string;
83
+ get payload(): Record<string, unknown>;
84
+ get ocurredAt(): DateTime;
85
+ }
86
+
85
87
  declare class ProcessStatus extends ValueObject<string> {
86
88
  static readonly SUPPORTED: readonly string[];
87
89
  static readonly PENDING: ProcessStatus;
@@ -182,7 +184,7 @@ declare class UsageError extends DomainError {
182
184
  declare class DomainEvent extends BaseEvent {
183
185
  protected readonly _aggregateUuid: UUID;
184
186
  protected readonly _aggregateType: string;
185
- protected constructor(version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
187
+ protected constructor(tenantUuid: UUID, version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
186
188
  get aggregateUuid(): UUID;
187
189
  get aggregateType(): string;
188
190
  }
@@ -376,7 +378,7 @@ interface EventBusRepository {
376
378
  declare class IntegrationEvent extends BaseEvent {
377
379
  protected readonly _aggregateUuid: UUID;
378
380
  protected readonly _aggregateType: string;
379
- protected constructor(version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
381
+ protected constructor(tenantUuid: UUID, version: string, type: string, payload: Record<string, unknown>, aggregateUuid: UUID, aggregateType: string);
380
382
  get aggregateUuid(): UUID;
381
383
  get aggregateType(): string;
382
384
  }
package/dist/index.js CHANGED
@@ -168,12 +168,16 @@ var DateTime = _DateTime;
168
168
 
169
169
  // src/domain/contracts/BaseEvent.ts
170
170
  var BaseEvent = class {
171
- constructor(version, type, payload) {
171
+ constructor(tenantUuid, version, type, payload) {
172
+ this._tenantUuid = tenantUuid;
172
173
  this._version = version;
173
174
  this._type = type;
174
175
  this._payload = payload;
175
176
  this._occurredAt = DateTime.now();
176
177
  }
178
+ get tenantUuid() {
179
+ return this._tenantUuid;
180
+ }
177
181
  get version() {
178
182
  return this._version;
179
183
  }
@@ -261,8 +265,8 @@ var UsageError = class extends DomainError {
261
265
 
262
266
  // src/domain/events/DomainEvent.ts
263
267
  var DomainEvent = class extends BaseEvent {
264
- constructor(version, type, payload, aggregateUuid, aggregateType) {
265
- super(version, type, payload);
268
+ constructor(tenantUuid, version, type, payload, aggregateUuid, aggregateType) {
269
+ super(tenantUuid, version, type, payload);
266
270
  this._aggregateUuid = aggregateUuid;
267
271
  this._aggregateType = aggregateType;
268
272
  }
@@ -980,8 +984,8 @@ var UUID = _UUID;
980
984
 
981
985
  // src/application/contracts/IntegrationEvent.ts
982
986
  var IntegrationEvent = class extends BaseEvent {
983
- constructor(version, type, payload, aggregateUuid, aggregateType) {
984
- super(version, type, payload);
987
+ constructor(tenantUuid, version, type, payload, aggregateUuid, aggregateType) {
988
+ super(tenantUuid, version, type, payload);
985
989
  this._aggregateUuid = aggregateUuid;
986
990
  this._aggregateType = aggregateType;
987
991
  }