@cargolift-cdi/types 0.1.137 → 0.1.139
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/entities/integration-inbound.entity.d.ts +9 -2
- package/dist/entities/integration-inbound.entity.d.ts.map +1 -1
- package/dist/entities/integration-inbound.entity.js +18 -5
- package/dist/entities/log-integration-inbound.entity.d.ts +15 -3
- package/dist/entities/log-integration-inbound.entity.d.ts.map +1 -1
- package/dist/entities/log-integration-inbound.entity.js +22 -7
- package/package.json +1 -1
|
@@ -12,12 +12,19 @@ export declare class IntegrationInbound {
|
|
|
12
12
|
event: string;
|
|
13
13
|
/** Ação (e.g., 'create', 'update', 'delete', etc */
|
|
14
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
|
+
* - 'mdos': Roteia para fila de dados mestres (MDOS) antes de enviar para sistemas de destino
|
|
19
|
+
* - 'default': Usa o modo definido no evento (integration_event)
|
|
20
|
+
*/
|
|
21
|
+
overrideRoutingMode?: "default" | "direct" | "ods" | "mdos" | null;
|
|
15
22
|
/** Condições de roteamento de ações (action) baseadas no payload de canônico
|
|
16
23
|
* Direciona a integração para diferentes eventos de outbound (saída). Ex: 'driver' para 'people'
|
|
17
|
-
|
|
24
|
+
*/
|
|
18
25
|
routingOutboundEvent?: IntegrationInboundRouting[];
|
|
19
26
|
/** Condições de definição para ações (action) baseadas no payload canônico
|
|
20
|
-
|
|
27
|
+
* Direciona a integração para diferentes ações de outbound (saída). Ex: 'POST' para 'CREATE', 'PUT' para 'UPDATE'
|
|
21
28
|
*/
|
|
22
29
|
routingOutboundAction?: IntegrationInboundRouting[];
|
|
23
30
|
/** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-inbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-inbound.entity.ts"],"names":[],"mappings":"
|
|
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,MAAM,GAAG,IAAI,CAAC;IAEnE;;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,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC,oDAAoD;IAKpD,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -5,6 +5,9 @@ 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 IntegrationInbound - Define configurações de integração de entrada (inbound)
|
|
9
|
+
* @author Israel A. Possoli
|
|
10
|
+
* @date 2026-01-06
|
|
8
11
|
* Representa uma rota de integração de entrada (inbound) que descreve como eventos externos
|
|
9
12
|
* devem ser validados, transformados e aplicados às regras globais antes do roteamento interno.
|
|
10
13
|
*
|
|
@@ -30,12 +33,19 @@ let IntegrationInbound = class IntegrationInbound {
|
|
|
30
33
|
event;
|
|
31
34
|
/** Ação (e.g., 'create', 'update', 'delete', etc */
|
|
32
35
|
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
|
+
* - 'mdos': Roteia para fila de dados mestres (MDOS) antes de enviar para sistemas de destino
|
|
40
|
+
* - 'default': Usa o modo definido no evento (integration_event)
|
|
41
|
+
*/
|
|
42
|
+
overrideRoutingMode;
|
|
33
43
|
/** Condições de roteamento de ações (action) baseadas no payload de canônico
|
|
34
44
|
* Direciona a integração para diferentes eventos de outbound (saída). Ex: 'driver' para 'people'
|
|
35
|
-
|
|
45
|
+
*/
|
|
36
46
|
routingOutboundEvent;
|
|
37
47
|
/** Condições de definição para ações (action) baseadas no payload canônico
|
|
38
|
-
|
|
48
|
+
* Direciona a integração para diferentes ações de outbound (saída). Ex: 'POST' para 'CREATE', 'PUT' para 'UPDATE'
|
|
39
49
|
*/
|
|
40
50
|
routingOutboundAction;
|
|
41
51
|
/** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
|
|
@@ -74,6 +84,9 @@ __decorate([
|
|
|
74
84
|
__decorate([
|
|
75
85
|
Column({ type: "varchar", length: 40 })
|
|
76
86
|
], IntegrationInbound.prototype, "action", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
Column({ type: "varchar", length: 20, nullable: true })
|
|
89
|
+
], IntegrationInbound.prototype, "overrideRoutingMode", void 0);
|
|
77
90
|
__decorate([
|
|
78
91
|
Column({ type: "jsonb", nullable: true })
|
|
79
92
|
], IntegrationInbound.prototype, "routingOutboundEvent", void 0);
|
|
@@ -99,13 +112,13 @@ __decorate([
|
|
|
99
112
|
Column({ type: "jsonb", nullable: true })
|
|
100
113
|
], IntegrationInbound.prototype, "rules", void 0);
|
|
101
114
|
__decorate([
|
|
102
|
-
Column({ type:
|
|
115
|
+
Column({ type: "text", nullable: true })
|
|
103
116
|
], IntegrationInbound.prototype, "refExtraction", void 0);
|
|
104
117
|
__decorate([
|
|
105
|
-
Column({ type:
|
|
118
|
+
Column({ type: "varchar", nullable: true })
|
|
106
119
|
], IntegrationInbound.prototype, "refType", void 0);
|
|
107
120
|
__decorate([
|
|
108
|
-
Column({ type:
|
|
121
|
+
Column({ type: "text", nullable: true })
|
|
109
122
|
], IntegrationInbound.prototype, "additionalRefsExtraction", void 0);
|
|
110
123
|
__decorate([
|
|
111
124
|
CreateDateColumn({ name: "created_at", type: "timestamptz" })
|
|
@@ -22,6 +22,13 @@ export declare class LogIntegrationInbound {
|
|
|
22
22
|
status: IntegrationStatus;
|
|
23
23
|
/** Motivo do status (mensagem curta) */
|
|
24
24
|
statusReason?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Modo de roteamento utilizado
|
|
27
|
+
* - 'direct': Roteia diretamente para sistemas de destino sem passar pelo ODS
|
|
28
|
+
* - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para sistemas de destino
|
|
29
|
+
* - 'mdos': Roteia para fila de dados mestres (MDOS) antes de enviar para sistemas de destino
|
|
30
|
+
*/
|
|
31
|
+
routingMode?: "direct" | "ods" | "mdos" | null;
|
|
25
32
|
/** Timestamp de início da requisição na API */
|
|
26
33
|
timestampStart?: Date | string;
|
|
27
34
|
/** Timestamp do início do processamento no ESB */
|
|
@@ -59,9 +66,14 @@ export declare class LogIntegrationInbound {
|
|
|
59
66
|
/** Mensagens de avisos e alertas não críticas */
|
|
60
67
|
warns?: string | null;
|
|
61
68
|
/** Indica se este log veio de um replay manual ou DLQ */
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
externalReference?: string | null;
|
|
70
|
+
externalReferenceType?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* Referências externas adicionais associadas em formato JSON (e.g., múltiplos códigos relacionados)
|
|
73
|
+
* Formato: Chave-Valor (Tipo-Referência)
|
|
74
|
+
* Exemplo: { "cte": "000123", "cnpj": "12345678000199" }
|
|
75
|
+
*/
|
|
76
|
+
additionalExternalReferences?: Record<string, any> | null;
|
|
65
77
|
/** ID da tabela integration_inbound */
|
|
66
78
|
inboundId: string;
|
|
67
79
|
createdAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-integration-inbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/log-integration-inbound.entity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGpE;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"log-integration-inbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/log-integration-inbound.entity.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAGpE;;;GAGG;AACH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pD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,uFAAuF;IAEvF,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC,mDAAmD;IAEnD,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,gCAAgC;IAEhC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,oEAAoE;IAEpE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,6BAA6B;IAE7B,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAE7B,8BAA8B;IAE9B,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAEjC,iDAAiD;IAEjD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,yDAAyD;IAMzD,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIlC,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtC;;;;OAIG;IAGH,4BAA4B,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAE1D,uCAAuC;IAEvC,SAAS,EAAG,MAAM,CAAC;IAGnB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -27,6 +27,13 @@ let LogIntegrationInbound = class LogIntegrationInbound {
|
|
|
27
27
|
status;
|
|
28
28
|
/** Motivo do status (mensagem curta) */
|
|
29
29
|
statusReason;
|
|
30
|
+
/**
|
|
31
|
+
* Modo de roteamento utilizado
|
|
32
|
+
* - 'direct': Roteia diretamente para sistemas de destino sem passar pelo ODS
|
|
33
|
+
* - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para sistemas de destino
|
|
34
|
+
* - 'mdos': Roteia para fila de dados mestres (MDOS) antes de enviar para sistemas de destino
|
|
35
|
+
*/
|
|
36
|
+
routingMode;
|
|
30
37
|
/** Timestamp de início da requisição na API */
|
|
31
38
|
timestampStart;
|
|
32
39
|
/** Timestamp do início do processamento no ESB */
|
|
@@ -67,12 +74,16 @@ let LogIntegrationInbound = class LogIntegrationInbound {
|
|
|
67
74
|
// @Column({ type: 'boolean', default: false })
|
|
68
75
|
// wasReplayedFromDlq!: boolean;
|
|
69
76
|
// Referência externa associada (código do cadastro, número do documento, etc)
|
|
70
|
-
|
|
77
|
+
externalReference;
|
|
71
78
|
// Tipo da referência externa ('cpf', 'número do cte', etc)
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
externalReferenceType;
|
|
80
|
+
/**
|
|
81
|
+
* Referências externas adicionais associadas em formato JSON (e.g., múltiplos códigos relacionados)
|
|
82
|
+
* Formato: Chave-Valor (Tipo-Referência)
|
|
83
|
+
* Exemplo: { "cte": "000123", "cnpj": "12345678000199" }
|
|
84
|
+
*/
|
|
74
85
|
// TODO: Criar migration para índice GIN
|
|
75
|
-
|
|
86
|
+
additionalExternalReferences;
|
|
76
87
|
/** ID da tabela integration_inbound */
|
|
77
88
|
inboundId; // manter string no TS para bigint seguro
|
|
78
89
|
createdAt;
|
|
@@ -105,6 +116,9 @@ __decorate([
|
|
|
105
116
|
__decorate([
|
|
106
117
|
Column({ type: 'varchar', length: 255, nullable: true })
|
|
107
118
|
], LogIntegrationInbound.prototype, "statusReason", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
Column({ type: "varchar", length: 20, nullable: true })
|
|
121
|
+
], LogIntegrationInbound.prototype, "routingMode", void 0);
|
|
108
122
|
__decorate([
|
|
109
123
|
Column({ name: "timestamp_start", type: "timestamptz", nullable: true })
|
|
110
124
|
], LogIntegrationInbound.prototype, "timestampStart", void 0);
|
|
@@ -161,13 +175,13 @@ __decorate([
|
|
|
161
175
|
], LogIntegrationInbound.prototype, "warns", void 0);
|
|
162
176
|
__decorate([
|
|
163
177
|
Column({ type: 'varchar', length: 100, nullable: true })
|
|
164
|
-
], LogIntegrationInbound.prototype, "
|
|
178
|
+
], LogIntegrationInbound.prototype, "externalReference", void 0);
|
|
165
179
|
__decorate([
|
|
166
180
|
Column({ type: 'varchar', length: 100, nullable: true })
|
|
167
|
-
], LogIntegrationInbound.prototype, "
|
|
181
|
+
], LogIntegrationInbound.prototype, "externalReferenceType", void 0);
|
|
168
182
|
__decorate([
|
|
169
183
|
Column({ type: 'jsonb', nullable: true })
|
|
170
|
-
], LogIntegrationInbound.prototype, "
|
|
184
|
+
], LogIntegrationInbound.prototype, "additionalExternalReferences", void 0);
|
|
171
185
|
__decorate([
|
|
172
186
|
Column({ type: 'bigint', nullable: true })
|
|
173
187
|
], LogIntegrationInbound.prototype, "inboundId", void 0);
|
|
@@ -182,6 +196,7 @@ LogIntegrationInbound = __decorate([
|
|
|
182
196
|
Index(["id"], { unique: true }),
|
|
183
197
|
Index(["correlationId"], { unique: true }),
|
|
184
198
|
Index(["system", "event", "action"]),
|
|
199
|
+
Index(["externalReference", "event", "action"]),
|
|
185
200
|
Index(["status", "updatedAt"]),
|
|
186
201
|
Index(["system", "event", "updatedAt"])
|
|
187
202
|
], LogIntegrationInbound);
|