@cargolift-cdi/types 0.1.139 → 0.1.143

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.
@@ -14,7 +14,7 @@ export declare class IntegrationEvent {
14
14
  * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para sistemas de destino
15
15
  * - 'mdos': Roteia para fila de dados mestres (MDOS) antes de enviar para sistemas de destino
16
16
  */
17
- routingMode: "direct" | "ods" | "mdos";
17
+ routingMode?: string | null;
18
18
  /** Opções adicionais (reservado para uso futuro) */
19
19
  createdAt: Date;
20
20
  updatedAt: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"integration-event.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-event.entity.ts"],"names":[],"mappings":"AAcA,qBAMa,gBAAgB;IAE3B,EAAE,EAAG,MAAM,CAAC;IAEZ,8BAA8B;IAE9B,KAAK,EAAG,MAAM,CAAC;IAEf,kHAAkH;IAElH,OAAO,EAAG,MAAM,CAAC;IAEjB,4BAA4B;IAE5B,MAAM,EAAG,OAAO,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;;OAKG;IAEH,WAAW,EAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IAExC,oDAAoD;IAKpD,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
1
+ {"version":3,"file":"integration-event.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-event.entity.ts"],"names":[],"mappings":"AAcA,qBAMa,gBAAgB;IAE3B,EAAE,EAAG,MAAM,CAAC;IAEZ,8BAA8B;IAE9B,KAAK,EAAG,MAAM,CAAC;IAEf,kHAAkH;IAElH,OAAO,EAAG,MAAM,CAAC;IAEjB,4BAA4B;IAE5B,MAAM,EAAG,OAAO,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;;OAKG;IAEH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,oDAAoD;IAKpD,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -55,7 +55,7 @@ __decorate([
55
55
  Column({ type: "varchar", length: 500, nullable: true })
56
56
  ], IntegrationEvent.prototype, "description", void 0);
57
57
  __decorate([
58
- Column({ type: "varchar", length: 20, default: "ods" })
58
+ Column({ type: "varchar", length: 20, nullable: true })
59
59
  ], IntegrationEvent.prototype, "routingMode", void 0);
60
60
  __decorate([
61
61
  CreateDateColumn({ name: "created_at", type: "timestamptz" })
@@ -3,6 +3,6 @@ import { IntegrationEvent } from "../entities/integration-event.entity.js";
3
3
  export declare class EventRepositoryService {
4
4
  private readonly repo;
5
5
  constructor(repo: Repository<IntegrationEvent>);
6
- get(event: string): Promise<IntegrationEvent[]>;
6
+ getFirstActive(event: string): Promise<IntegrationEvent | null>;
7
7
  }
8
8
  //# sourceMappingURL=integration-event-repository.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"integration-event-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-event-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,qBACa,sBAAsB;IAG/B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAG/C,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAGtD"}
1
+ {"version":3,"file":"integration-event-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-event-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,qBACa,sBAAsB;IAG/B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAG/C,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAGtE"}
@@ -15,8 +15,8 @@ let EventRepositoryService = class EventRepositoryService {
15
15
  constructor(repo) {
16
16
  this.repo = repo;
17
17
  }
18
- async get(event) {
19
- return await this.repo.find({ where: { event, active: true }, order: { version: "DESC" } });
18
+ async getFirstActive(event) {
19
+ return await this.repo.findOne({ where: { event, active: true }, order: { version: "DESC" } });
20
20
  }
21
21
  };
22
22
  EventRepositoryService = __decorate([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/types",
3
- "version": "0.1.139",
3
+ "version": "0.1.143",
4
4
  "description": "TypeScript types e interfaces comuns para projetos Cargolift CDI",
5
5
  "keywords": [
6
6
  "typescript",