@cargolift-cdi/types 0.1.151 → 0.1.153

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 (54) hide show
  1. package/dist/entities/integration-agent.entity.d.ts +12 -0
  2. package/dist/entities/integration-agent.entity.d.ts.map +1 -0
  3. package/dist/entities/{integration-system.entity.js → integration-agent.entity.js} +21 -21
  4. package/dist/entities/integration-endpoint.entity.d.ts +6 -6
  5. package/dist/entities/integration-endpoint.entity.d.ts.map +1 -1
  6. package/dist/entities/integration-endpoint.entity.js +18 -14
  7. package/dist/entities/integration-entity.entity.d.ts +22 -0
  8. package/dist/entities/integration-entity.entity.d.ts.map +1 -0
  9. package/dist/entities/{integration-event.entity.js → integration-entity.entity.js} +28 -28
  10. package/dist/entities/integration-inbound.entity.d.ts +29 -20
  11. package/dist/entities/integration-inbound.entity.d.ts.map +1 -1
  12. package/dist/entities/integration-inbound.entity.js +40 -29
  13. package/dist/entities/integration-outbound.entity.d.ts +24 -7
  14. package/dist/entities/integration-outbound.entity.d.ts.map +1 -1
  15. package/dist/entities/integration-outbound.entity.js +28 -23
  16. package/dist/entities/log-integration-inbound.entity.d.ts +9 -9
  17. package/dist/entities/log-integration-inbound.entity.d.ts.map +1 -1
  18. package/dist/entities/log-integration-inbound.entity.js +16 -16
  19. package/dist/entities/log-integration-outbound.entity.d.ts +3 -3
  20. package/dist/entities/log-integration-outbound.entity.d.ts.map +1 -1
  21. package/dist/entities/log-integration-outbound.entity.js +8 -8
  22. package/dist/enum/integration.enums.d.ts +6 -0
  23. package/dist/enum/integration.enums.d.ts.map +1 -1
  24. package/dist/enum/integration.enums.js +7 -0
  25. package/dist/index.d.ts +4 -3
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +4 -3
  28. package/dist/interfaces/envelope-message.interface.d.ts +2 -2
  29. package/dist/interfaces/envelope-message.interface.d.ts.map +1 -1
  30. package/dist/interfaces/integration.interface.d.ts.map +1 -1
  31. package/dist/repository/integration-agent-repository.service.d.ts +10 -0
  32. package/dist/repository/integration-agent-repository.service.d.ts.map +1 -0
  33. package/dist/repository/{integration-system-repository.service.js → integration-agent-repository.service.js} +10 -10
  34. package/dist/repository/integration-endpoint-repository.service.d.ts +1 -1
  35. package/dist/repository/integration-endpoint-repository.service.d.ts.map +1 -1
  36. package/dist/repository/integration-endpoint-repository.service.js +3 -3
  37. package/dist/repository/integration-entity-repository.service.d.ts +10 -0
  38. package/dist/repository/integration-entity-repository.service.d.ts.map +1 -0
  39. package/dist/repository/{integration-event-repository.service.js → integration-entity-repository.service.js} +10 -10
  40. package/dist/repository/integration-inbound-repository.service.d.ts +2 -2
  41. package/dist/repository/integration-inbound-repository.service.d.ts.map +1 -1
  42. package/dist/repository/integration-inbound-repository.service.js +22 -22
  43. package/dist/repository/integration-outbound-repository.service.d.ts +2 -2
  44. package/dist/repository/integration-outbound-repository.service.d.ts.map +1 -1
  45. package/dist/repository/integration-outbound-repository.service.js +6 -6
  46. package/package.json +1 -1
  47. package/dist/entities/integration-event.entity.d.ts +0 -22
  48. package/dist/entities/integration-event.entity.d.ts.map +0 -1
  49. package/dist/entities/integration-system.entity.d.ts +0 -12
  50. package/dist/entities/integration-system.entity.d.ts.map +0 -1
  51. package/dist/repository/integration-event-repository.service.d.ts +0 -10
  52. package/dist/repository/integration-event-repository.service.d.ts.map +0 -1
  53. package/dist/repository/integration-system-repository.service.d.ts +0 -10
  54. package/dist/repository/integration-system-repository.service.d.ts.map +0 -1
@@ -0,0 +1,12 @@
1
+ export declare class IntegrationAgent {
2
+ /** Identificador único do agente de integração */
3
+ id: string;
4
+ /** Nome do agente de integração (e.g., 'erp', 'tms') */
5
+ agent: string;
6
+ /** Se o agente está ativo */
7
+ active: boolean;
8
+ apiClientId?: string;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
12
+ //# sourceMappingURL=integration-agent.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-agent.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-agent.entity.ts"],"names":[],"mappings":"AAaA,qBAEa,gBAAgB;IAC3B,kDAAkD;IAElD,EAAE,EAAG,MAAM,CAAC;IAEZ,wDAAwD;IAExD,KAAK,EAAG,MAAM,CAAC;IAEf,6BAA6B;IAE7B,MAAM,EAAG,OAAO,CAAC;IAIjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -5,23 +5,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  /**
8
- * Representa um sistema de integração registrado na aplicação.
8
+ * Representa um agente de integração registrado na aplicação.
9
9
  *
10
- * Cada instância mapeia uma linha da tabela "integration_system".
10
+ * Cada instância mapeia uma linha da tabela "integration_agent".
11
11
  *
12
- * @property id Identificador único do sistema de integração (armazenado como bigint no banco). Mantém-se como string no TypeScript para evitar perda de precisão com bigints.
13
- * @property system Nome único do sistema de integração (ex.: 'erp', 'tms'). Campo varchar com até 80 caracteres.
14
- * @property active Flag que indica se o sistema está ativo. Valor booleano; padrão: true.
12
+ * @property id Identificador único do agente de integração (armazenado como bigint no banco). Mantém-se como string no TypeScript para evitar perda de precisão com bigints.
13
+ * @property agent Nome único do agente de integração (ex.: 'erp', 'tms'). Campo varchar com até 80 caracteres.
14
+ * @property active Flag que indica se o agente está ativo. Valor booleano; padrão: true.
15
15
  * @property createdAt Carimbo de data/hora de criação (timestamptz).
16
16
  * @property updatedAt Carimbo de data/hora da última atualização (timestamptz).
17
17
  */
18
18
  import { Column, Entity, PrimaryGeneratedColumn, Index, CreateDateColumn, UpdateDateColumn } from 'typeorm';
19
- let IntegrationSystem = class IntegrationSystem {
20
- /** Identificador único do sistema de integração */
19
+ let IntegrationAgent = class IntegrationAgent {
20
+ /** Identificador único do agente de integração */
21
21
  id; // manter string no TS para bigint seguro
22
- /** Nome do sistema de integração (e.g., 'erp', 'tms') */
23
- system;
24
- /** Se o sistema está ativo */
22
+ /** Nome do agente de integração (e.g., 'erp', 'tms') */
23
+ agent;
24
+ /** Se o agente está ativo */
25
25
  active;
26
26
  // Nome do usuário (clientId) no KeyCloak para consumir API do middleware
27
27
  apiClientId;
@@ -30,24 +30,24 @@ let IntegrationSystem = class IntegrationSystem {
30
30
  };
31
31
  __decorate([
32
32
  PrimaryGeneratedColumn("identity", { type: "bigint", generatedIdentity: "ALWAYS" })
33
- ], IntegrationSystem.prototype, "id", void 0);
33
+ ], IntegrationAgent.prototype, "id", void 0);
34
34
  __decorate([
35
35
  Column({ type: 'varchar', length: 80 })
36
- ], IntegrationSystem.prototype, "system", void 0);
36
+ ], IntegrationAgent.prototype, "agent", void 0);
37
37
  __decorate([
38
38
  Column({ type: 'boolean', default: true })
39
- ], IntegrationSystem.prototype, "active", void 0);
39
+ ], IntegrationAgent.prototype, "active", void 0);
40
40
  __decorate([
41
41
  Column({ type: 'varchar', length: 80, nullable: true })
42
- ], IntegrationSystem.prototype, "apiClientId", void 0);
42
+ ], IntegrationAgent.prototype, "apiClientId", void 0);
43
43
  __decorate([
44
44
  CreateDateColumn({ name: "created_at", type: "timestamptz" })
45
- ], IntegrationSystem.prototype, "createdAt", void 0);
45
+ ], IntegrationAgent.prototype, "createdAt", void 0);
46
46
  __decorate([
47
47
  UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
48
- ], IntegrationSystem.prototype, "updatedAt", void 0);
49
- IntegrationSystem = __decorate([
50
- Entity({ name: 'integration_system' }),
51
- Index(["system"], { unique: true })
52
- ], IntegrationSystem);
53
- export { IntegrationSystem };
48
+ ], IntegrationAgent.prototype, "updatedAt", void 0);
49
+ IntegrationAgent = __decorate([
50
+ Entity({ name: 'integration_agent' }),
51
+ Index(["agent"], { unique: true })
52
+ ], IntegrationAgent);
53
+ export { IntegrationAgent };
@@ -1,15 +1,15 @@
1
1
  import { TransportProtocol } from "../enum/integration.enums.js";
2
2
  import { BreakerPolicy, EndpointConfig, EndpointQueueConfig, EndpointTlsConfig, HttpConfig, RateLimit, RetryPolicy } from "../interfaces/integration.interface.js";
3
3
  /**
4
- * Definição de roteamento de saída por chave (evento) e destino.
4
+ * Definição de roteamento de saída por chave (entity) e destino.
5
5
  * Agora inclui também as configurações de Target/Delivery (protocolo, endpoint, políticas, etc.).
6
6
  */
7
7
  export declare class IntegrationEndpoint {
8
8
  id: string;
9
- /** Sistema de destino (e.g., 'erp', 'wms') */
10
- system: string;
11
- /** Evento (chave) (e.g., 'driver' or 'driver.created') */
12
- event: string;
9
+ /** Agente de destino (e.g., 'erp', 'wms') */
10
+ agent: string;
11
+ /** Entidade (chave) (e.g., 'driver' or 'driver.created') */
12
+ entity: string;
13
13
  /** Ação (e.g., 'create', 'update', 'delete', etc) */
14
14
  action: string;
15
15
  version: number;
@@ -60,7 +60,7 @@ export declare class IntegrationEndpoint {
60
60
  retryPolicy?: RetryPolicy | null;
61
61
  /**
62
62
  * Rate limiting por rota:
63
- * { limit: 100, intervalMs: 1000, burst?: 50, key?: 'targetSystem' | 'endpoint' | 'custom' }
63
+ * { limit: 100, intervalMs: 1000, burst?: 50, key?: 'targetAgent' | 'endpoint' | 'custom' }
64
64
  */
65
65
  rateLimit?: RateLimit | null;
66
66
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"integration-endpoint.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-endpoint.entity.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAGnK;;;GAGG;AACH,qBAKa,mBAAmB;IAE9B,EAAE,EAAG,MAAM,CAAC;IAGZ,8CAA8C;IAE9C,MAAM,EAAG,MAAM,CAAC;IAEhB,0DAA0D;I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B,EAAE,EAAG,MAAM,CAAC;IAGZ,6CAA6C;IAE7C,KAAK,EAAG,MAAM,CAAC;IAEf,4DAA4D;IAE5D,MAAM,EAAG,MAAM,CAAC;IAEhB,qDAAqD;IAErD,MAAM,EAAG,MAAM,CAAC;IAGhB,OAAO,EAAG,MAAM,CAAC;IAGjB,MAAM,EAAG,OAAO,CAAC;IAEjB,qGAAqG;IAErG;;OAEG;IAEH,iBAAiB,EAAG,iBAAiB,CAAC;IAEtC;;;;;;OAMG;IAEH,QAAQ,EAAG,MAAM,CAAC;IAElB;;OAEG;IAEH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IAEH,GAAG,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAE/B;;OAEG;IAEH,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAK/B;;OAEG;IAEH,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAE/B;;;;;;;OAOG;IAEH,WAAW,CAAC,EAAE,mBAAmB,GAAE,IAAI,CAAC;IAGxC;;;OAGG;IAEH,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IAEH,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IAEH,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAErC;;;;OAIG;IAEH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;OAGG;IAOH,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAElB"}
@@ -5,19 +5,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  /**
8
- * Definição de roteamento e configuração de entrega/saída para eventos de integração (Outbound).
8
+ * @fileoverview Entidade IntegrationOutbound - Define configurações de integração de saída (outbound)
9
+ * @author Israel A. Possoli
10
+ * @date 2026-01-06 *
11
+
12
+ * Definição de roteamento e configuração de entrega/saída para entidades de integração (Outbound).
9
13
  *
10
- * Representa uma rota/endpoint de destino para um evento específico, incluindo
14
+ * Representa uma rota/endpoint de destino para uma entidade específica, incluindo
11
15
  * informações de transporte, endpoint, credenciais, políticas de retry, rate-limiting,
12
16
  * circuit breaker, idempotência e configurações específicas por protocolo (HTTP, filas/streams).
13
17
  *
14
18
  * Observações importantes:
15
- * - A combinação (system, event, action) é única. Há também um índice condicional que garante
19
+ * - A combinação (agent, entity, action) é única. Há também um índice condicional que garante
16
20
  * unicidade quando active = true (ou seja, apenas uma rota ativa por chave).
17
21
  * - O campo `id` é um bigint no banco — no TypeScript é mantido como string para segurança.
18
22
  *
19
23
  * @remarks
20
- * - Esta entidade centraliza tanto o roteamento (por sistema/evento/ação) quanto as políticas e
24
+ * - Esta entidade centraliza tanto o roteamento (por agent/entity/action) quanto as políticas e
21
25
  * configurações de entrega, permitindo múltiplos tipos de transporte e adaptações por destino.
22
26
  * - Campos JSONB (httpConfig, queueConfig, tls, retryPolicy, rateLimit, breakerPolicy, idempotency)
23
27
  * devem seguir os formatos esperados pelo componente de entrega para serem interpretados corretamente.*
@@ -36,15 +40,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
36
40
  */
37
41
  import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
38
42
  /**
39
- * Definição de roteamento de saída por chave (evento) e destino.
43
+ * Definição de roteamento de saída por chave (entity) e destino.
40
44
  * Agora inclui também as configurações de Target/Delivery (protocolo, endpoint, políticas, etc.).
41
45
  */
42
46
  let IntegrationEndpoint = class IntegrationEndpoint {
43
47
  id; // manter string no TS para bigint seguro
44
- /** Sistema de destino (e.g., 'erp', 'wms') */
45
- system;
46
- /** Evento (chave) (e.g., 'driver' or 'driver.created') */
47
- event;
48
+ /** Agente de destino (e.g., 'erp', 'wms') */
49
+ agent;
50
+ /** Entidade (chave) (e.g., 'driver' or 'driver.created') */
51
+ entity;
48
52
  /** Ação (e.g., 'create', 'update', 'delete', etc) */
49
53
  action;
50
54
  version;
@@ -97,7 +101,7 @@ let IntegrationEndpoint = class IntegrationEndpoint {
97
101
  retryPolicy;
98
102
  /**
99
103
  * Rate limiting por rota:
100
- * { limit: 100, intervalMs: 1000, burst?: 50, key?: 'targetSystem' | 'endpoint' | 'custom' }
104
+ * { limit: 100, intervalMs: 1000, burst?: 50, key?: 'targetAgent' | 'endpoint' | 'custom' }
101
105
  */
102
106
  rateLimit;
103
107
  /**
@@ -126,11 +130,11 @@ __decorate([
126
130
  PrimaryGeneratedColumn("identity", { type: "bigint", generatedIdentity: "ALWAYS" })
127
131
  ], IntegrationEndpoint.prototype, "id", void 0);
128
132
  __decorate([
129
- Column({ name: "target_system", type: "varchar", length: 80 })
130
- ], IntegrationEndpoint.prototype, "system", void 0);
133
+ Column({ name: "target_agent", type: "varchar", length: 80 })
134
+ ], IntegrationEndpoint.prototype, "agent", void 0);
131
135
  __decorate([
132
136
  Column({ type: "varchar", length: 80 })
133
- ], IntegrationEndpoint.prototype, "event", void 0);
137
+ ], IntegrationEndpoint.prototype, "entity", void 0);
134
138
  __decorate([
135
139
  Column({ type: "varchar", length: 40 })
136
140
  ], IntegrationEndpoint.prototype, "action", void 0);
@@ -181,7 +185,7 @@ __decorate([
181
185
  ], IntegrationEndpoint.prototype, "updatedAt", void 0);
182
186
  IntegrationEndpoint = __decorate([
183
187
  Entity({ name: "integration_endpoint" }),
184
- Index("uq_integration_endpoint_active", ["system", "event", "action"], {
188
+ Index("uq_integration_endpoint_active", ["agent", "entity", "action"], {
185
189
  unique: true,
186
190
  where: `"active" = true`,
187
191
  })
@@ -0,0 +1,22 @@
1
+ export declare class IntegrationEntity {
2
+ id: string;
3
+ /** Entidade (e.g., 'driver') */
4
+ entity: string;
5
+ /** Versão da entidade. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
6
+ version: number;
7
+ /**Se a entidade está ativa */
8
+ active: boolean;
9
+ /** Descrição opcional amigável ao usuário */
10
+ description?: string | null;
11
+ /**
12
+ * Modo de roteamento da entidade
13
+ * - 'direct': Roteia diretamente para entidades de destino sem passar pelo ODS
14
+ * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para entidades de destino
15
+ * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para entidades de destino
16
+ */
17
+ routingMode: "direct" | "ods" | "mdm";
18
+ /** Opções adicionais (reservado para uso futuro) */
19
+ createdAt: Date;
20
+ updatedAt: Date;
21
+ }
22
+ //# sourceMappingURL=integration-entity.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-entity.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-entity.entity.ts"],"names":[],"mappings":"AAcA,qBAMa,iBAAiB;IAE5B,EAAE,EAAG,MAAM,CAAC;IAEZ,gCAAgC;IAEhC,MAAM,EAAG,MAAM,CAAC;IAEhB,oHAAoH;IAEpH,OAAO,EAAG,MAAM,CAAC;IAEjB,8BAA8B;IAE9B,MAAM,EAAG,OAAO,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;;;;OAKG;IAEH,WAAW,EAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;IAEvC,oDAAoD;IAKpD,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -5,32 +5,32 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  /**
8
- * @fileoverview Entidade IntegrationEvent - Define eventos de integração e modos de roteamento.
8
+ * @fileoverview Entidade de integração - Define entidades de integração e modos de roteamento.
9
9
  * @author Israel A. Possoli
10
10
  * @date 2026-01-19
11
11
  *
12
12
  * @remarks
13
- * - Cada combinação (event, version) é única.
14
- * - Apenas uma versão por (event) pode estar ativa ao mesmo tempo.
13
+ * - Cada combinação (entity, version) é única.
14
+ * - Apenas uma versão por (entity) pode estar ativa ao mesmo tempo.
15
15
  * - Versões anteriores devem ser imutáveis após a publicação de novas versões.
16
- * - O modo de roteamento define como o evento será processado dentro do middleware (direto, via ODS ou via MDM).
16
+ * - O modo de roteamento define como a entidade será processada dentro do middleware (direto, via ODS ou via MDM).
17
17
  */
18
18
  import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
19
- let IntegrationEvent = class IntegrationEvent {
19
+ let IntegrationEntity = class IntegrationEntity {
20
20
  id; // manter string no TS para bigint seguro
21
- /** Evento (e.g., 'driver') */
22
- event;
23
- /** Versão do evento. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
21
+ /** Entidade (e.g., 'driver') */
22
+ entity;
23
+ /** Versão da entidade. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
24
24
  version;
25
- /**Se a evento está ativa */
25
+ /**Se a entidade está ativa */
26
26
  active;
27
27
  /** Descrição opcional amigável ao usuário */
28
28
  description;
29
29
  /**
30
- * Modo de roteamento do evento
31
- * - 'direct': Roteia diretamente para sistemas de destino sem passar pelo ODS
32
- * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para sistemas de destino
33
- * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para sistemas de destino
30
+ * Modo de roteamento da entidade
31
+ * - 'direct': Roteia diretamente para entidades de destino sem passar pelo ODS
32
+ * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para entidades de destino
33
+ * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para entidades de destino
34
34
  */
35
35
  routingMode;
36
36
  /** Opções adicionais (reservado para uso futuro) */
@@ -41,34 +41,34 @@ let IntegrationEvent = class IntegrationEvent {
41
41
  };
42
42
  __decorate([
43
43
  PrimaryGeneratedColumn("identity", { type: "bigint", generatedIdentity: "ALWAYS" })
44
- ], IntegrationEvent.prototype, "id", void 0);
44
+ ], IntegrationEntity.prototype, "id", void 0);
45
45
  __decorate([
46
46
  Column({ type: "varchar", length: 80 })
47
- ], IntegrationEvent.prototype, "event", void 0);
47
+ ], IntegrationEntity.prototype, "entity", void 0);
48
48
  __decorate([
49
49
  Column({ type: "int", default: 1 })
50
- ], IntegrationEvent.prototype, "version", void 0);
50
+ ], IntegrationEntity.prototype, "version", void 0);
51
51
  __decorate([
52
52
  Column({ type: "boolean", default: true })
53
- ], IntegrationEvent.prototype, "active", void 0);
53
+ ], IntegrationEntity.prototype, "active", void 0);
54
54
  __decorate([
55
55
  Column({ type: "varchar", length: 500, nullable: true })
56
- ], IntegrationEvent.prototype, "description", void 0);
56
+ ], IntegrationEntity.prototype, "description", void 0);
57
57
  __decorate([
58
- Column({ type: "varchar", length: 20, default: "ods" })
59
- ], IntegrationEvent.prototype, "routingMode", void 0);
58
+ Column({ type: "varchar", length: 20 })
59
+ ], IntegrationEntity.prototype, "routingMode", void 0);
60
60
  __decorate([
61
61
  CreateDateColumn({ name: "created_at", type: "timestamptz" })
62
- ], IntegrationEvent.prototype, "createdAt", void 0);
62
+ ], IntegrationEntity.prototype, "createdAt", void 0);
63
63
  __decorate([
64
64
  UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
65
- ], IntegrationEvent.prototype, "updatedAt", void 0);
66
- IntegrationEvent = __decorate([
67
- Entity({ name: "integration_event" }),
68
- Index(["event", "version"], { unique: true }),
69
- Index("uq_integration_event_active", ["event"], {
65
+ ], IntegrationEntity.prototype, "updatedAt", void 0);
66
+ IntegrationEntity = __decorate([
67
+ Entity({ name: "integration_entity" }),
68
+ Index(["entity", "version"], { unique: true }),
69
+ Index("uq_integration_entity_active", ["entity"], {
70
70
  unique: true,
71
71
  where: `"active" = true`,
72
72
  })
73
- ], IntegrationEvent);
74
- export { IntegrationEvent };
73
+ ], IntegrationEntity);
74
+ export { IntegrationEntity };
@@ -1,32 +1,41 @@
1
1
  import { IntegrationInboundRouting } from "../interfaces/integration.interface.js";
2
+ import { IntegrationActions } from "../enum/integration.enums.js";
2
3
  /**
3
- * Eventos de integração (tms.driver) - Ocorre na integração de entrada (inbound) antes do roteamento.
4
- * Define expressões JSONata para transformar mensagens de eventos externos em formato JSON canônico interno.
5
- * Também armazena configurações de regras global (BRE) associadas ao evento.
4
+ * Perfil de rotas de integração de entrada (inbound) para validação, transformação e roteamento.
5
+ * Utilize agent + entity + action no IntegrationEntity para referenciar estas rotas.
6
6
  */
7
7
  export declare class IntegrationInbound {
8
8
  id: string;
9
- /** Sistema de origem (e.g., 'erp') */
10
- system: string;
11
- /** Evento (e.g., 'driver') */
12
- event: string;
13
- /** Ação (e.g., 'create', 'update', 'delete', etc */
14
- action: string;
15
- /** Modo de roteamento que sobrescreve o modo definido no evento (integration_event)
16
- * - 'direct': Roteia diretamente para sistemas de destino sem passar pelo ODS
17
- * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para sistemas de destino
18
- * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para sistemas de destino
19
- * - 'default': Usa o modo definido no evento (integration_event)
9
+ /** Agente de integração de origem (e.g., 'erp') */
10
+ agent: string;
11
+ /** Entidade - Representa o que está sendo integrado. (e.g., 'driver', 'cte', etc) */
12
+ entity: string;
13
+ /** Método HTTP (e.g., 'GET', 'POST', 'PUT', 'DELETE', etc), será usado para identificar qual a ação que será executada
14
+ * Pode ser usado para diferenciar ações em um mesmo endpoint de integração. Ex: 'POST' para 'CREATE', 'PUT' para 'UPDATE', etc.
15
+ * Também pode ser usado para roteamento condicional baseado no método HTTP, caso um mesma entidade de integração receba chamadas com métodos diferentes.
16
+ * Exemplo: um endpoint de integração que recebe tanto 'POST' para criar um cadastro quanto 'PUT' para atualizar o cadastro, ambos mapeados para a mesma entidade 'driver' mas com ações diferentes ('create' e 'update', por exemplo).
17
+ * Pode-se usar vários métodos para a mesma ação, caso queira mapear 'POST' e 'PUT' para a ação 'upsert', por exemplo. Neste caso, o campo method pode conter uma lista de métodos HTTP (ex: "POST, PUT") e a lógica de roteamento deve considerar isso.
18
+ */
19
+ method: string;
20
+ /** Ação dentro do middleware (e.g., 'create', 'update', 'delete', etc) */
21
+ action: IntegrationActions;
22
+ /** Modo de roteamento que sobrescreve o modo definido na entidade (integration_entity)
23
+ * - 'direct': Roteia diretamente para os agentes de destino sem passar pelo ODS
24
+ * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para os agentes de destino
25
+ * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para os agentes de destino
26
+ * - 'default': Usa o modo definido na entidade (integration_entity)
20
27
  */
21
28
  overrideRoutingMode?: "default" | "direct" | "ods" | "mdm" | null;
22
- /** Condições de roteamento de ações (action) baseadas no payload de canônico
23
- * Direciona a integração para diferentes eventos de outbound (saída). Ex: 'driver' para 'people'
29
+ /** Condições de definição para entidades (entity) baseadas no payload canônico.
30
+ * Sobrepõe a entidade definida no campo 'entity' para roteamento condicional baseado no conteúdo do payload. Ex: Uma integração de pessoa física (people) quando no payload tiver um campo "type" com valor "driver", então a entidade será 'driver' ao invés de 'people'
31
+ * Útil para casos onde o mesmo endpoint de integração recebe chamadas com a mesma combinação de método HTTP e entidade, mas a entidade a ser processada depende do conteúdo do payload.
24
32
  */
25
- routingOutboundEvent?: IntegrationInboundRouting[];
26
- /** Condições de definição para ações (action) baseadas no payload canônico
27
- * Direciona a integração para diferentes ações de outbound (saída). Ex: 'POST' para 'CREATE', 'PUT' para 'UPDATE'
33
+ routingEntity?: IntegrationInboundRouting[];
34
+ /** Condições de definição para ações (action) baseadas no payload canônico.
35
+ * Sobrepõe a ação definida no campo 'action' para roteamento condicional baseado no conteúdo do payload. Ex: Se o payload tiver um campo "operation" com valor "update", então a ação será 'update' ao invés de 'create', mesmo que o método HTTP seja 'POST'.
36
+ * Útil para casos onde o mesmo endpoint de integração recebe chamadas com a mesma combinação de método HTTP e entidade, mas a ação a ser executada depende do conteúdo do payload.
28
37
  */
29
- routingOutboundAction?: IntegrationInboundRouting[];
38
+ routingAction?: IntegrationInboundRouting[];
30
39
  /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
31
40
  version: number;
32
41
  /**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":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF;;;;GAIG;AACH,qBAMa,kBAAkB;IAE7B,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,8BAA8B;IAE9B,KAAK,EAAG,MAAM,CAAC;IAEf,oDAAoD;IAEpD,MAAM,EAAG,MAAM,CAAC;IAEhB;;;;;MAKE;IAEF,mBAAmB,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,CAAC;IAElE;;OAEG;IAEH,oBAAoB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAEnD;;OAEG;IAEH,qBAAqB,CAAC,EAAE,yBAAyB,EAAE,CAAC;IAEpD,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,0BAA0B;IAE1B,MAAM,EAAG,OAAO,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,yFAAyF;IAEzF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAExC,yFAAyF;IAEzF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,8FAA8F;IAE9F,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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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"}
@@ -8,12 +8,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  * @fileoverview Entidade IntegrationInbound - Define configurações de integração de entrada (inbound)
9
9
  * @author Israel A. Possoli
10
10
  * @date 2026-01-06
11
- * Representa uma rota de integração de entrada (inbound) que descreve como eventos externos
12
- * devem ser validados, transformados e aplicados às regras globais antes do roteamento interno.
11
+ * Representa uma rota de integração de entrada (inbound) que descreve como entidades externas (o que está sendo integrado)
12
+ * devem ser validados, transformados e aplicados às regras globais antes do roteamento dentro do ESB para o MDM, ODS ou agentes de destino.
13
13
  *
14
14
  * @remarks
15
- * - Cada combinação (system, event, action, version) é única.
16
- * - Apenas uma versão por (system, event, action) pode estar ativa ao mesmo tempo.
15
+ * - Cada combinação (agent, entity, action, version) é única.
16
+ * - Apenas uma versão por (agent, entity, action) pode estar ativa ao mesmo tempo.
17
17
  * - Versões anteriores devem ser imutáveis após a publicação de novas versões.
18
18
  * - Transformações usam expressões JSONata para mapear payloads externos ao formato canônico interno.
19
19
  *
@@ -21,33 +21,41 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
21
21
  */
22
22
  import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
23
23
  /**
24
- * Eventos de integração (tms.driver) - Ocorre na integração de entrada (inbound) antes do roteamento.
25
- * Define expressões JSONata para transformar mensagens de eventos externos em formato JSON canônico interno.
26
- * Também armazena configurações de regras global (BRE) associadas ao evento.
24
+ * Perfil de rotas de integração de entrada (inbound) para validação, transformação e roteamento.
25
+ * Utilize agent + entity + action no IntegrationEntity para referenciar estas rotas.
27
26
  */
28
27
  let IntegrationInbound = class IntegrationInbound {
29
28
  id; // manter string no TS para bigint seguro
30
- /** Sistema de origem (e.g., 'erp') */
31
- system;
32
- /** Evento (e.g., 'driver') */
33
- event;
34
- /** Ação (e.g., 'create', 'update', 'delete', etc */
29
+ /** Agente de integração de origem (e.g., 'erp') */
30
+ agent;
31
+ /** Entidade - Representa o que está sendo integrado. (e.g., 'driver', 'cte', etc) */
32
+ entity;
33
+ /** Método HTTP (e.g., 'GET', 'POST', 'PUT', 'DELETE', etc), será usado para identificar qual a ação que será executada
34
+ * Pode ser usado para diferenciar ações em um mesmo endpoint de integração. Ex: 'POST' para 'CREATE', 'PUT' para 'UPDATE', etc.
35
+ * Também pode ser usado para roteamento condicional baseado no método HTTP, caso um mesma entidade de integração receba chamadas com métodos diferentes.
36
+ * Exemplo: um endpoint de integração que recebe tanto 'POST' para criar um cadastro quanto 'PUT' para atualizar o cadastro, ambos mapeados para a mesma entidade 'driver' mas com ações diferentes ('create' e 'update', por exemplo).
37
+ * Pode-se usar vários métodos para a mesma ação, caso queira mapear 'POST' e 'PUT' para a ação 'upsert', por exemplo. Neste caso, o campo method pode conter uma lista de métodos HTTP (ex: "POST, PUT") e a lógica de roteamento deve considerar isso.
38
+ */
39
+ method;
40
+ /** Ação dentro do middleware (e.g., 'create', 'update', 'delete', etc) */
35
41
  action;
36
- /** Modo de roteamento que sobrescreve o modo definido no evento (integration_event)
37
- * - 'direct': Roteia diretamente para sistemas de destino sem passar pelo ODS
38
- * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para sistemas de destino
39
- * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para sistemas de destino
40
- * - 'default': Usa o modo definido no evento (integration_event)
42
+ /** Modo de roteamento que sobrescreve o modo definido na entidade (integration_entity)
43
+ * - 'direct': Roteia diretamente para os agentes de destino sem passar pelo ODS
44
+ * - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para os agentes de destino
45
+ * - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para os agentes de destino
46
+ * - 'default': Usa o modo definido na entidade (integration_entity)
41
47
  */
42
48
  overrideRoutingMode;
43
- /** Condições de roteamento de ações (action) baseadas no payload de canônico
44
- * Direciona a integração para diferentes eventos de outbound (saída). Ex: 'driver' para 'people'
49
+ /** Condições de definição para entidades (entity) baseadas no payload canônico.
50
+ * Sobrepõe a entidade definida no campo 'entity' para roteamento condicional baseado no conteúdo do payload. Ex: Uma integração de pessoa física (people) quando no payload tiver um campo "type" com valor "driver", então a entidade será 'driver' ao invés de 'people'
51
+ * Útil para casos onde o mesmo endpoint de integração recebe chamadas com a mesma combinação de método HTTP e entidade, mas a entidade a ser processada depende do conteúdo do payload.
45
52
  */
46
- routingOutboundEvent;
47
- /** Condições de definição para ações (action) baseadas no payload canônico
48
- * Direciona a integração para diferentes ações de outbound (saída). Ex: 'POST' para 'CREATE', 'PUT' para 'UPDATE'
53
+ routingEntity;
54
+ /** Condições de definição para ações (action) baseadas no payload canônico.
55
+ * Sobrepõe a ação definida no campo 'action' para roteamento condicional baseado no conteúdo do payload. Ex: Se o payload tiver um campo "operation" com valor "update", então a ação será 'update' ao invés de 'create', mesmo que o método HTTP seja 'POST'.
56
+ * Útil para casos onde o mesmo endpoint de integração recebe chamadas com a mesma combinação de método HTTP e entidade, mas a ação a ser executada depende do conteúdo do payload.
49
57
  */
50
- routingOutboundAction;
58
+ routingAction;
51
59
  /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
52
60
  version;
53
61
  /**Se a rota está ativa */
@@ -77,10 +85,13 @@ __decorate([
77
85
  ], IntegrationInbound.prototype, "id", void 0);
78
86
  __decorate([
79
87
  Column({ type: "varchar", length: 80 })
80
- ], IntegrationInbound.prototype, "system", void 0);
88
+ ], IntegrationInbound.prototype, "agent", void 0);
89
+ __decorate([
90
+ Column({ type: "varchar", length: 80 })
91
+ ], IntegrationInbound.prototype, "entity", void 0);
81
92
  __decorate([
82
93
  Column({ type: "varchar", length: 80 })
83
- ], IntegrationInbound.prototype, "event", void 0);
94
+ ], IntegrationInbound.prototype, "method", void 0);
84
95
  __decorate([
85
96
  Column({ type: "varchar", length: 40 })
86
97
  ], IntegrationInbound.prototype, "action", void 0);
@@ -89,10 +100,10 @@ __decorate([
89
100
  ], IntegrationInbound.prototype, "overrideRoutingMode", void 0);
90
101
  __decorate([
91
102
  Column({ type: "jsonb", nullable: true })
92
- ], IntegrationInbound.prototype, "routingOutboundEvent", void 0);
103
+ ], IntegrationInbound.prototype, "routingEntity", void 0);
93
104
  __decorate([
94
105
  Column({ type: "jsonb", nullable: true })
95
- ], IntegrationInbound.prototype, "routingOutboundAction", void 0);
106
+ ], IntegrationInbound.prototype, "routingAction", void 0);
96
107
  __decorate([
97
108
  Column({ type: "int", default: 1 })
98
109
  ], IntegrationInbound.prototype, "version", void 0);
@@ -128,8 +139,8 @@ __decorate([
128
139
  ], IntegrationInbound.prototype, "updatedAt", void 0);
129
140
  IntegrationInbound = __decorate([
130
141
  Entity({ name: "integration_inbound" }),
131
- Index(["system", "event", "action", "version"], { unique: true }),
132
- Index("uq_integration_inbound_active", ["system", "event", "action"], {
142
+ Index(["agent", "entity", "action", "version"], { unique: true }),
143
+ Index("uq_integration_inbound_active", ["agent", "entity", "action"], {
133
144
  unique: true,
134
145
  where: `"active" = true`,
135
146
  })
@@ -1,14 +1,31 @@
1
+ /**
2
+ * @fileoverview Entidade IntegrationOutbound - Define configurações de integração de saída (outbound)
3
+ * @author Israel A. Possoli
4
+ * @date 2026-01-06 *
5
+ *
6
+ * Representa a definição de roteamento outbound para integração entre agentes.
7
+ * Cada registro define uma rota de saída para uma agente e entidade específica , versão e regras associadas.
8
+ *
9
+ * Esta entidade mapeia uma rota de saída por chave de origem e destino, armazenando
10
+ * regras e metadados necessários para encaminhar entidades (por exemplo, do TMS para o WMS).
11
+ * Cada registro corresponde a um alvo (targetAgent) para uma agente específica e versão.
12
+ *
13
+ * @remarks
14
+ * - Há um índice único composto por (agent, entity, action, targetAgent, version) garantindo que
15
+ * não existam duplicatas de rota para a mesma combinação.
16
+ * - Somente a versão mais recente de uma rota pode estar ativa; versões anteriores devem ser imutáveis.
17
+ */
1
18
  export declare class IntegrationOutbound {
2
- /** Identificador único do sistema de integração */
19
+ /** Identificador único do agente de integração */
3
20
  id: string;
4
- /** Sistema de origem (e.g., 'tms') */
5
- system: string;
6
- /** Evento (chave) (e.g., 'driver' or 'driver.created') */
7
- event: string;
21
+ /** Agente de origem (e.g., 'tms') */
22
+ agent: string;
23
+ /** Entidade (chave) (e.g., 'driver' or 'driver.created') */
24
+ entity: string;
8
25
  /** Ação (e.g., 'create', 'update', 'delete', etc) */
9
26
  action: string;
10
- /** Sistema de destino (e.g., 'erp', 'wms') */
11
- targetSystem: string;
27
+ /** Agente de destino (e.g., 'erp', 'wms') */
28
+ targetAgent: string;
12
29
  /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
13
30
  version: number;
14
31
  /** Se a rota está ativa */
@@ -1 +1 @@
1
- {"version":3,"file":"integration-outbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-outbound.entity.ts"],"names":[],"mappings":"AAuBA,qBAMa,mBAAmB;IAC9B,mDAAmD;IAEnD,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,0DAA0D;IAE1D,KAAK,EAAG,MAAM,CAAC;IAEf,qDAAqD;IAErD,MAAM,EAAG,MAAM,CAAC;IAEhB,8CAA8C;IAE9C,YAAY,EAAG,MAAM,CAAC;IAGtB,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,2BAA2B;IAE3B,MAAM,EAAG,OAAO,CAAC;IAGjB,gBAAgB;IAEhB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,sCAAsC;IAEtC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B,oDAAoD;IAKpD,SAA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