@cargolift-cdi/types 0.1.90 → 0.1.91

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,3 +1,4 @@
1
+ import { PayloadConditions } from "../interfaces/payload-condition.interface.js";
1
2
  /**
2
3
  * Eventos de integração (tms.driver) - Ocorre na integração de entrada (inbound) antes do roteamento.
3
4
  * Define expressões JSONata para transformar mensagens de eventos externos em formato JSON canônico interno.
@@ -9,9 +10,17 @@ export declare class IntegrationInbound {
9
10
  system: string;
10
11
  /** Evento (e.g., 'driver') */
11
12
  event: string;
12
- routingEvent: string;
13
13
  /** Ação (e.g., 'create', 'update', 'delete', etc */
14
14
  action: string;
15
+ /** Condições de roteamento de eventos baseadas no payload de entrada
16
+ * Direciona a integração para diferentes fluxos. Ex: 'driver' para 'people'
17
+ */
18
+ routingEvent: [
19
+ {
20
+ event: string;
21
+ condition: PayloadConditions;
22
+ }
23
+ ];
15
24
  /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
16
25
  version: number;
17
26
  /**Se a rota está ativa */
@@ -1 +1 @@
1
- {"version":3,"file":"integration-inbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-inbound.entity.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,qBAMa,kBAAkB;IAE7B,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,8BAA8B;IAE9B,KAAK,EAAG,MAAM,CAAC;IAGf,YAAY,EAAG,MAAM,CAAC;IAEtB,oDAAoD;IAEpD,MAAM,EAAG,MAAM,CAAC;IAEhB,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,0BAA0B;IAE1B,MAAM,EAAG,OAAO,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,0CAA0C;IAE1C,UAAU,CAAC,EAAE,M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E/B,4CAA4C;IAE5C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAInC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI9B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIxB,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC,oDAAoD;IAKpD,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -28,9 +28,12 @@ let IntegrationInbound = class IntegrationInbound {
28
28
  system;
29
29
  /** Evento (e.g., 'driver') */
30
30
  event;
31
- routingEvent;
32
31
  /** Ação (e.g., 'create', 'update', 'delete', etc */
33
32
  action;
33
+ /** Condições de roteamento de eventos baseadas no payload de entrada
34
+ * Direciona a integração para diferentes fluxos. Ex: 'driver' para 'people'
35
+ */
36
+ routingEvent;
34
37
  /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
35
38
  version;
36
39
  /**Se a rota está ativa */
@@ -64,12 +67,12 @@ __decorate([
64
67
  __decorate([
65
68
  Column({ type: "varchar", length: 80 })
66
69
  ], IntegrationInbound.prototype, "event", void 0);
67
- __decorate([
68
- Column({ type: "jsonb", length: 80 })
69
- ], IntegrationInbound.prototype, "routingEvent", void 0);
70
70
  __decorate([
71
71
  Column({ type: "varchar", length: 40 })
72
72
  ], IntegrationInbound.prototype, "action", void 0);
73
+ __decorate([
74
+ Column({ type: "jsonb", nullable: true })
75
+ ], IntegrationInbound.prototype, "routingEvent", void 0);
73
76
  __decorate([
74
77
  Column({ type: "int", default: 1 })
75
78
  ], IntegrationInbound.prototype, "version", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/types",
3
- "version": "0.1.90",
3
+ "version": "0.1.91",
4
4
  "description": "TypeScript types e interfaces comuns para projetos Cargolift CDI",
5
5
  "keywords": [
6
6
  "typescript",