@seidor-cloud-produtos/orbit-backend-lib 2.0.99 → 2.0.101

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.
@@ -1,9 +1,14 @@
1
1
  import { AuthorizerHeaders } from '../../infra/http/handle-authorizer-headers';
2
2
  import { Entity } from '../entities/entity';
3
3
  import DomainEvent from './domain-event';
4
+ export interface ConsistencyEventMessage {
5
+ eventName: string;
6
+ origin: AuthorizerHeaders;
7
+ payload: Record<string, unknown>;
8
+ }
4
9
  export default class ConsistencyEvent implements DomainEvent {
5
10
  readonly eventDate: Date;
6
11
  readonly name: string;
7
- readonly input: Record<string, unknown>;
12
+ readonly input: ConsistencyEventMessage;
8
13
  constructor(entity: Entity<any>, authorizerHeaders: AuthorizerHeaders, eventName: string);
9
14
  }
@@ -7,6 +7,7 @@ class ConsistencyEvent {
7
7
  constructor(entity, authorizerHeaders, eventName) {
8
8
  this.name = eventName;
9
9
  this.input = {
10
+ eventName,
10
11
  origin: authorizerHeaders,
11
12
  payload: entity.toEventDispatchObject(),
12
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "2.0.99",
3
+ "version": "2.0.101",
4
4
  "description": "Internal lib for backend components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",