@cargolift-cdi/types 0.1.152 → 0.1.154
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-agent.entity.d.ts +12 -0
- package/dist/entities/integration-agent.entity.d.ts.map +1 -0
- package/dist/entities/{integration-system.entity.js → integration-agent.entity.js} +21 -21
- package/dist/entities/integration-endpoint.entity.d.ts +6 -6
- package/dist/entities/integration-endpoint.entity.d.ts.map +1 -1
- package/dist/entities/integration-endpoint.entity.js +18 -14
- package/dist/entities/integration-entity.entity.d.ts +22 -0
- package/dist/entities/integration-entity.entity.d.ts.map +1 -0
- package/dist/entities/{integration-event.entity.js → integration-entity.entity.js} +28 -28
- package/dist/entities/integration-inbound.entity.d.ts +29 -20
- package/dist/entities/integration-inbound.entity.d.ts.map +1 -1
- package/dist/entities/integration-inbound.entity.js +40 -29
- package/dist/entities/integration-outbound.entity.d.ts +24 -7
- package/dist/entities/integration-outbound.entity.d.ts.map +1 -1
- package/dist/entities/integration-outbound.entity.js +28 -23
- package/dist/entities/log-integration-inbound.entity.d.ts +10 -9
- package/dist/entities/log-integration-inbound.entity.d.ts.map +1 -1
- package/dist/entities/log-integration-inbound.entity.js +20 -16
- package/dist/entities/log-integration-outbound.entity.d.ts +3 -3
- package/dist/entities/log-integration-outbound.entity.d.ts.map +1 -1
- package/dist/entities/log-integration-outbound.entity.js +8 -8
- package/dist/enum/integration.enums.d.ts +6 -0
- package/dist/enum/integration.enums.d.ts.map +1 -1
- package/dist/enum/integration.enums.js +7 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/interfaces/envelope-message.interface.d.ts +2 -2
- package/dist/interfaces/envelope-message.interface.d.ts.map +1 -1
- package/dist/interfaces/integration.interface.d.ts.map +1 -1
- package/dist/repository/integration-agent-repository.service.d.ts +10 -0
- package/dist/repository/integration-agent-repository.service.d.ts.map +1 -0
- package/dist/repository/{integration-system-repository.service.js → integration-agent-repository.service.js} +10 -10
- package/dist/repository/integration-endpoint-repository.service.d.ts +1 -1
- package/dist/repository/integration-endpoint-repository.service.d.ts.map +1 -1
- package/dist/repository/integration-endpoint-repository.service.js +3 -3
- package/dist/repository/integration-entity-repository.service.d.ts +10 -0
- package/dist/repository/integration-entity-repository.service.d.ts.map +1 -0
- package/dist/repository/{integration-event-repository.service.js → integration-entity-repository.service.js} +10 -10
- package/dist/repository/integration-inbound-repository.service.d.ts +2 -2
- package/dist/repository/integration-inbound-repository.service.d.ts.map +1 -1
- package/dist/repository/integration-inbound-repository.service.js +22 -22
- package/dist/repository/integration-outbound-repository.service.d.ts +2 -2
- package/dist/repository/integration-outbound-repository.service.d.ts.map +1 -1
- package/dist/repository/integration-outbound-repository.service.js +6 -6
- package/package.json +1 -1
- package/dist/entities/integration-event.entity.d.ts +0 -22
- package/dist/entities/integration-event.entity.d.ts.map +0 -1
- package/dist/entities/integration-system.entity.d.ts +0 -12
- package/dist/entities/integration-system.entity.d.ts.map +0 -1
- package/dist/repository/integration-event-repository.service.d.ts +0 -10
- package/dist/repository/integration-event-repository.service.d.ts.map +0 -1
- package/dist/repository/integration-system-repository.service.d.ts +0 -10
- package/dist/repository/integration-system-repository.service.d.ts.map +0 -1
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
/**
|
|
8
|
-
*
|
|
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.
|
|
9
8
|
*
|
|
10
9
|
* Esta entidade mapeia uma rota de saída por chave de origem e destino, armazenando
|
|
11
|
-
* regras e metadados necessários para encaminhar
|
|
12
|
-
* Cada registro corresponde a um alvo (
|
|
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.
|
|
13
12
|
*
|
|
14
13
|
* @remarks
|
|
15
|
-
* - Há um índice único composto por (
|
|
14
|
+
* - Há um índice único composto por (agent, entity, action, targetAgent, version) garantindo que
|
|
16
15
|
* não existam duplicatas de rota para a mesma combinação.
|
|
17
16
|
* - Somente a versão mais recente de uma rota pode estar ativa; versões anteriores devem ser imutáveis.
|
|
18
17
|
*/
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
19
24
|
import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
|
|
20
25
|
let IntegrationOutbound = class IntegrationOutbound {
|
|
21
|
-
/** Identificador único do
|
|
26
|
+
/** Identificador único do agente de integração */
|
|
22
27
|
id; // manter string no TS para bigint seguro
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
|
|
28
|
+
/** Agente de origem (e.g., 'tms') */
|
|
29
|
+
agent;
|
|
30
|
+
/** Entidade (chave) (e.g., 'driver' or 'driver.created') */
|
|
31
|
+
entity;
|
|
27
32
|
/** Ação (e.g., 'create', 'update', 'delete', etc) */
|
|
28
33
|
action;
|
|
29
|
-
/**
|
|
30
|
-
|
|
34
|
+
/** Agente de destino (e.g., 'erp', 'wms') */
|
|
35
|
+
targetAgent;
|
|
31
36
|
/** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
|
|
32
37
|
version;
|
|
33
38
|
/** Se a rota está ativa */
|
|
@@ -47,16 +52,16 @@ __decorate([
|
|
|
47
52
|
], IntegrationOutbound.prototype, "id", void 0);
|
|
48
53
|
__decorate([
|
|
49
54
|
Column({ type: "varchar", length: 80 })
|
|
50
|
-
], IntegrationOutbound.prototype, "
|
|
55
|
+
], IntegrationOutbound.prototype, "agent", void 0);
|
|
51
56
|
__decorate([
|
|
52
57
|
Column({ type: "varchar", length: 80 })
|
|
53
|
-
], IntegrationOutbound.prototype, "
|
|
58
|
+
], IntegrationOutbound.prototype, "entity", void 0);
|
|
54
59
|
__decorate([
|
|
55
60
|
Column({ type: "varchar", length: 40 })
|
|
56
61
|
], IntegrationOutbound.prototype, "action", void 0);
|
|
57
62
|
__decorate([
|
|
58
|
-
Column({ name: "
|
|
59
|
-
], IntegrationOutbound.prototype, "
|
|
63
|
+
Column({ name: "target_agent", type: "varchar", length: 80 })
|
|
64
|
+
], IntegrationOutbound.prototype, "targetAgent", void 0);
|
|
60
65
|
__decorate([
|
|
61
66
|
Column({ type: "int", default: 1 })
|
|
62
67
|
], IntegrationOutbound.prototype, "version", void 0);
|
|
@@ -77,8 +82,8 @@ __decorate([
|
|
|
77
82
|
], IntegrationOutbound.prototype, "updatedAt", void 0);
|
|
78
83
|
IntegrationOutbound = __decorate([
|
|
79
84
|
Entity({ name: "integration_outbound" }),
|
|
80
|
-
Index(["
|
|
81
|
-
Index("uq_integration_outbound_active", ["
|
|
85
|
+
Index(["agent", "entity", "action", "targetAgent", "version"], { unique: true }),
|
|
86
|
+
Index("uq_integration_outbound_active", ["agent", "entity", "action", "targetAgent"], {
|
|
82
87
|
unique: true,
|
|
83
88
|
where: `"active" = true`,
|
|
84
89
|
})
|
|
@@ -6,14 +6,15 @@ import { ErrorSource, ErrorType } from "../enum/error-type.enum.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class LogIntegrationInbound {
|
|
8
8
|
id: string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
9
|
+
/** Agente de destino (e.g., 'erp', 'wms') */
|
|
10
|
+
agent: string;
|
|
11
|
+
/** Entidade (chave) (e.g., 'driver' or 'driver.created') */
|
|
12
|
+
entity: string;
|
|
13
|
+
method: string;
|
|
13
14
|
/** Ação (e.g., 'create', 'update', 'delete', etc) */
|
|
14
15
|
action: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
16
|
+
/** Entidade de origem (antes do roteamento) (e.g., 'driver' or 'driver.created') */
|
|
17
|
+
sourceEntity?: string | null;
|
|
17
18
|
/** Ação de origem (antes do roteamento) (e.g., 'create', 'update', 'delete', etc) */
|
|
18
19
|
sourceAction?: string | null;
|
|
19
20
|
/** Correlation Id */
|
|
@@ -24,9 +25,9 @@ export declare class LogIntegrationInbound {
|
|
|
24
25
|
statusReason?: string | null;
|
|
25
26
|
/**
|
|
26
27
|
* Modo de roteamento utilizado
|
|
27
|
-
* - 'direct': Roteia diretamente para
|
|
28
|
-
* - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para
|
|
29
|
-
* - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para
|
|
28
|
+
* - 'direct': Roteia diretamente para agentes de destino sem passar pelo ODS
|
|
29
|
+
* - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para agentes de destino
|
|
30
|
+
* - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para agentes de destino
|
|
30
31
|
*/
|
|
31
32
|
routingMode?: string | null;
|
|
32
33
|
/** Timestamp de início da requisição na API */
|
|
@@ -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,qBAOa,qBAAqB;IAEhC,EAAE,EAAG,MAAM,CAAC;IAEZ,
|
|
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,qBAOa,qBAAqB;IAEhC,EAAE,EAAG,MAAM,CAAC;IAEZ,6CAA6C;IAE7C,KAAK,EAAG,MAAM,CAAC;IAEf,4DAA4D;IAE5D,MAAM,EAAG,MAAM,CAAC;IAGhB,MAAM,EAAG,MAAM,CAAC;IAEhB,qDAAqD;IAErD,MAAM,EAAG,MAAM,CAAC;IAEhB,oFAAoF;IAEpF,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,qFAAqF;IAErF,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,qBAAqB;IAErB,aAAa,EAAG,MAAM,CAAC;IAEvB,oCAAoC;IAEpC,MAAM,EAAG,iBAAiB,CAAC;IAE3B,wCAAwC;IAExC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;;;OAKG;IAEH,WAAW,CAAC,EAAE,MAAM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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"}
|
|
@@ -11,14 +11,15 @@ import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, Update
|
|
|
11
11
|
*/
|
|
12
12
|
let LogIntegrationInbound = class LogIntegrationInbound {
|
|
13
13
|
id; // manter string no TS para bigint seguro
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
14
|
+
/** Agente de destino (e.g., 'erp', 'wms') */
|
|
15
|
+
agent;
|
|
16
|
+
/** Entidade (chave) (e.g., 'driver' or 'driver.created') */
|
|
17
|
+
entity;
|
|
18
|
+
method;
|
|
18
19
|
/** Ação (e.g., 'create', 'update', 'delete', etc) */
|
|
19
20
|
action;
|
|
20
|
-
/**
|
|
21
|
-
|
|
21
|
+
/** Entidade de origem (antes do roteamento) (e.g., 'driver' or 'driver.created') */
|
|
22
|
+
sourceEntity;
|
|
22
23
|
/** Ação de origem (antes do roteamento) (e.g., 'create', 'update', 'delete', etc) */
|
|
23
24
|
sourceAction;
|
|
24
25
|
/** Correlation Id */
|
|
@@ -29,9 +30,9 @@ let LogIntegrationInbound = class LogIntegrationInbound {
|
|
|
29
30
|
statusReason;
|
|
30
31
|
/**
|
|
31
32
|
* Modo de roteamento utilizado
|
|
32
|
-
* - 'direct': Roteia diretamente para
|
|
33
|
-
* - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para
|
|
34
|
-
* - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para
|
|
33
|
+
* - 'direct': Roteia diretamente para agentes de destino sem passar pelo ODS
|
|
34
|
+
* - 'ods': Roteia para o ODS (Operational Data Store) antes de enviar para agentes de destino
|
|
35
|
+
* - 'mdm': Roteia para fila de dados mestres (MDM) antes de enviar para agentes de destino
|
|
35
36
|
*/
|
|
36
37
|
routingMode;
|
|
37
38
|
/** Timestamp de início da requisição na API */
|
|
@@ -93,17 +94,20 @@ __decorate([
|
|
|
93
94
|
PrimaryGeneratedColumn("identity", { type: "bigint", generatedIdentity: "ALWAYS" })
|
|
94
95
|
], LogIntegrationInbound.prototype, "id", void 0);
|
|
95
96
|
__decorate([
|
|
96
|
-
Column({ name: "
|
|
97
|
-
], LogIntegrationInbound.prototype, "
|
|
97
|
+
Column({ name: "agent", type: "varchar", length: 80 })
|
|
98
|
+
], LogIntegrationInbound.prototype, "agent", void 0);
|
|
98
99
|
__decorate([
|
|
99
100
|
Column({ type: "varchar", length: 80 })
|
|
100
|
-
], LogIntegrationInbound.prototype, "
|
|
101
|
+
], LogIntegrationInbound.prototype, "entity", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
Column({ type: "varchar", length: 80 })
|
|
104
|
+
], LogIntegrationInbound.prototype, "method", void 0);
|
|
101
105
|
__decorate([
|
|
102
106
|
Column({ type: "varchar", length: 40 })
|
|
103
107
|
], LogIntegrationInbound.prototype, "action", void 0);
|
|
104
108
|
__decorate([
|
|
105
109
|
Column({ type: "varchar", length: 80, nullable: true })
|
|
106
|
-
], LogIntegrationInbound.prototype, "
|
|
110
|
+
], LogIntegrationInbound.prototype, "sourceEntity", void 0);
|
|
107
111
|
__decorate([
|
|
108
112
|
Column({ type: "varchar", length: 40, nullable: true })
|
|
109
113
|
], LogIntegrationInbound.prototype, "sourceAction", void 0);
|
|
@@ -195,9 +199,9 @@ LogIntegrationInbound = __decorate([
|
|
|
195
199
|
Entity({ name: "log_integration_inbound" }),
|
|
196
200
|
Index(["id"], { unique: true }),
|
|
197
201
|
Index(["correlationId"], { unique: true }),
|
|
198
|
-
Index(["
|
|
199
|
-
Index(["externalReference", "
|
|
202
|
+
Index(["agent", "entity", "action"]),
|
|
203
|
+
Index(["externalReference", "entity", "action"]),
|
|
200
204
|
Index(["status", "updatedAt"]),
|
|
201
|
-
Index(["
|
|
205
|
+
Index(["agent", "entity", "updatedAt"])
|
|
202
206
|
], LogIntegrationInbound);
|
|
203
207
|
export { LogIntegrationInbound };
|
|
@@ -7,9 +7,9 @@ import { ErrorSource, ErrorType } from "../enum/error-type.enum.js";
|
|
|
7
7
|
export declare class LogIntegrationOutbound {
|
|
8
8
|
id: string;
|
|
9
9
|
/** Sistema de destino (e.g., 'erp', 'wms') */
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
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
|
/** Correlation Id */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-integration-outbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/log-integration-outbound.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,qBAMa,sBAAsB;IAEjC,EAAE,EAAG,MAAM,CAAC;IAEZ,8CAA8C;IAE9C,
|
|
1
|
+
{"version":3,"file":"log-integration-outbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/log-integration-outbound.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,qBAMa,sBAAsB;IAEjC,EAAE,EAAG,MAAM,CAAC;IAEZ,8CAA8C;IAE9C,KAAK,EAAG,MA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C;IAE7B,8BAA8B;IAE9B,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAEjC,yDAAyD;IAIzD,uCAAuC;IAEvC,SAAS,EAAG,MAAM,CAAC;IAGnB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -12,9 +12,9 @@ import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, Update
|
|
|
12
12
|
let LogIntegrationOutbound = class LogIntegrationOutbound {
|
|
13
13
|
id; // manter string no TS para bigint seguro
|
|
14
14
|
/** Sistema de destino (e.g., 'erp', 'wms') */
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
15
|
+
agent;
|
|
16
|
+
/** Entidade (chave) (e.g., 'driver' or 'driver.created') */
|
|
17
|
+
entity;
|
|
18
18
|
/** Ação (e.g., 'create', 'update', 'delete', etc) */
|
|
19
19
|
action;
|
|
20
20
|
/** Correlation Id */
|
|
@@ -67,11 +67,11 @@ __decorate([
|
|
|
67
67
|
PrimaryGeneratedColumn("identity", { type: "bigint", generatedIdentity: "ALWAYS" })
|
|
68
68
|
], LogIntegrationOutbound.prototype, "id", void 0);
|
|
69
69
|
__decorate([
|
|
70
|
-
Column({ name: "
|
|
71
|
-
], LogIntegrationOutbound.prototype, "
|
|
70
|
+
Column({ name: "agent", type: "varchar", length: 80 })
|
|
71
|
+
], LogIntegrationOutbound.prototype, "agent", void 0);
|
|
72
72
|
__decorate([
|
|
73
73
|
Column({ type: "varchar", length: 80 })
|
|
74
|
-
], LogIntegrationOutbound.prototype, "
|
|
74
|
+
], LogIntegrationOutbound.prototype, "entity", void 0);
|
|
75
75
|
__decorate([
|
|
76
76
|
Column({ type: "varchar", length: 40 })
|
|
77
77
|
], LogIntegrationOutbound.prototype, "action", void 0);
|
|
@@ -145,8 +145,8 @@ LogIntegrationOutbound = __decorate([
|
|
|
145
145
|
Entity({ name: "log_integration_inbound" }),
|
|
146
146
|
Index(["id"], { unique: true }),
|
|
147
147
|
Index(["correlationId"], { unique: true }),
|
|
148
|
-
Index(["
|
|
148
|
+
Index(["agent", "entity", "action"]),
|
|
149
149
|
Index(["status", "updatedAt"]),
|
|
150
|
-
Index(["
|
|
150
|
+
Index(["agent", "entity", "updatedAt"])
|
|
151
151
|
], LogIntegrationOutbound);
|
|
152
152
|
export { LogIntegrationOutbound };
|
|
@@ -11,6 +11,12 @@ export declare enum HttpMethod {
|
|
|
11
11
|
PATCH = "PATCH",
|
|
12
12
|
DELETE = "DELETE"
|
|
13
13
|
}
|
|
14
|
+
export declare enum IntegrationActions {
|
|
15
|
+
CREATE = "create",
|
|
16
|
+
UPDATE = "update",
|
|
17
|
+
DELETE = "delete",
|
|
18
|
+
UPSERT = "upsert"
|
|
19
|
+
}
|
|
14
20
|
export declare enum AuthType {
|
|
15
21
|
NONE = "NONE",
|
|
16
22
|
API_KEY = "API_KEY",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.enums.d.ts","sourceRoot":"","sources":["../../src/enum/integration.enums.ts"],"names":[],"mappings":"AACA,oBAAY,iBAAiB;IAC3B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;
|
|
1
|
+
{"version":3,"file":"integration.enums.d.ts","sourceRoot":"","sources":["../../src/enum/integration.enums.ts"],"names":[],"mappings":"AACA,oBAAY,iBAAiB;IAC3B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,oBAAY,UAAU;IACpB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAGD,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,yBAAyB,8BAA8B;IACvD,eAAe,oBAAoB;CACpC;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB"}
|
|
@@ -14,6 +14,13 @@ export var HttpMethod;
|
|
|
14
14
|
HttpMethod["PATCH"] = "PATCH";
|
|
15
15
|
HttpMethod["DELETE"] = "DELETE";
|
|
16
16
|
})(HttpMethod || (HttpMethod = {}));
|
|
17
|
+
export var IntegrationActions;
|
|
18
|
+
(function (IntegrationActions) {
|
|
19
|
+
IntegrationActions["CREATE"] = "create";
|
|
20
|
+
IntegrationActions["UPDATE"] = "update";
|
|
21
|
+
IntegrationActions["DELETE"] = "delete";
|
|
22
|
+
IntegrationActions["UPSERT"] = "upsert";
|
|
23
|
+
})(IntegrationActions || (IntegrationActions = {}));
|
|
17
24
|
export var AuthType;
|
|
18
25
|
(function (AuthType) {
|
|
19
26
|
AuthType["NONE"] = "NONE";
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export * from './interfaces/publish-meta.interface.js';
|
|
|
9
9
|
export * from './interfaces/api-response.interface.js';
|
|
10
10
|
export * from './interfaces/integration.interface.js';
|
|
11
11
|
export * from './interfaces/payload-condition.interface.js';
|
|
12
|
-
export * from './entities/integration-
|
|
13
|
-
export * from './entities/integration-
|
|
12
|
+
export * from './entities/integration-agent.entity.js';
|
|
13
|
+
export * from './entities/integration-entity.entity.js';
|
|
14
14
|
export * from './entities/integration-inbound.entity.js';
|
|
15
15
|
export * from './entities/integration-outbound.entity.js';
|
|
16
16
|
export * from './entities/integration-endpoint.entity.js';
|
|
@@ -20,8 +20,8 @@ export * from './entities/log-integration-inbound.entity.js';
|
|
|
20
20
|
export * from './entities/log-integration-outbound.entity.js';
|
|
21
21
|
export * from './enum/integration.enums.js';
|
|
22
22
|
export * from './enum/error-type.enum.js';
|
|
23
|
-
export * from './repository/integration-
|
|
24
|
-
export * from './repository/integration-
|
|
23
|
+
export * from './repository/integration-agent-repository.service.js';
|
|
24
|
+
export * from './repository/integration-entity-repository.service.js';
|
|
25
25
|
export * from './repository/integration-inbound-repository.service.js';
|
|
26
26
|
export * from './repository/integration-outbound-repository.service.js';
|
|
27
27
|
export * from './repository/integration-endpoint-repository.service.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAG5D,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qCAAqC,CAAC;AACpD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAG5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC;AACxD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAG9D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAG1C,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wDAAwD,CAAC;AACvE,cAAc,yDAAyD,CAAC;AACxE,cAAc,yDAAyD,CAAC;AACxE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,8 +10,8 @@ export * from './interfaces/api-response.interface.js';
|
|
|
10
10
|
export * from './interfaces/integration.interface.js';
|
|
11
11
|
export * from './interfaces/payload-condition.interface.js';
|
|
12
12
|
// Entidades
|
|
13
|
-
export * from './entities/integration-
|
|
14
|
-
export * from './entities/integration-
|
|
13
|
+
export * from './entities/integration-agent.entity.js';
|
|
14
|
+
export * from './entities/integration-entity.entity.js';
|
|
15
15
|
export * from './entities/integration-inbound.entity.js';
|
|
16
16
|
export * from './entities/integration-outbound.entity.js';
|
|
17
17
|
export * from './entities/integration-endpoint.entity.js';
|
|
@@ -23,8 +23,8 @@ export * from './entities/log-integration-outbound.entity.js';
|
|
|
23
23
|
export * from './enum/integration.enums.js';
|
|
24
24
|
export * from './enum/error-type.enum.js';
|
|
25
25
|
// Repositórios
|
|
26
|
-
export * from './repository/integration-
|
|
27
|
-
export * from './repository/integration-
|
|
26
|
+
export * from './repository/integration-agent-repository.service.js';
|
|
27
|
+
export * from './repository/integration-entity-repository.service.js';
|
|
28
28
|
export * from './repository/integration-inbound-repository.service.js';
|
|
29
29
|
export * from './repository/integration-outbound-repository.service.js';
|
|
30
30
|
export * from './repository/integration-endpoint-repository.service.js';
|
|
@@ -5,8 +5,8 @@ import { ContextSource, ContextError } from "./context-message.interface.js";
|
|
|
5
5
|
export interface EnvelopeMessage {
|
|
6
6
|
correlation_id?: string;
|
|
7
7
|
eventType?: string;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
agent?: string;
|
|
9
|
+
entity?: string;
|
|
10
10
|
action?: string;
|
|
11
11
|
method?: string;
|
|
12
12
|
record_id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope-message.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/envelope-message.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG7E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"envelope-message.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/envelope-message.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG7E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACvC,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/integration.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/integration.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAItF,MAAM,WAAW,mCAAmC;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,mCAAmC,GAAG,mCAAmC,EAAE,CAAC;IACtF,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE;QACR,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;IASI;AACJ,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,WAAW,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;KAAE,CAAC;I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";
|
|
2
|
+
import { IntegrationAgent } from "../entities/integration-agent.entity.js";
|
|
3
|
+
export declare class AgentRepositoryService {
|
|
4
|
+
private readonly repo;
|
|
5
|
+
constructor(repo: Repository<IntegrationAgent>);
|
|
6
|
+
get(agent: string): Promise<IntegrationAgent | null>;
|
|
7
|
+
getAllActive(): Promise<IntegrationAgent[]>;
|
|
8
|
+
getByApiClientId(apiClientId: string): Promise<IntegrationAgent | null>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=integration-agent-repository.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-agent-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-agent-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,GAAG,IAAI,CAAC;IAKpD,YAAY,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAK3C,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAG9E"}
|
|
@@ -9,26 +9,26 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
9
9
|
};
|
|
10
10
|
import { Injectable } from "@nestjs/common";
|
|
11
11
|
import { InjectRepository } from "@nestjs/typeorm";
|
|
12
|
-
import {
|
|
13
|
-
let
|
|
12
|
+
import { IntegrationAgent } from "../entities/integration-agent.entity.js";
|
|
13
|
+
let AgentRepositoryService = class AgentRepositoryService {
|
|
14
14
|
repo;
|
|
15
15
|
constructor(repo) {
|
|
16
16
|
this.repo = repo;
|
|
17
17
|
}
|
|
18
|
-
async get(
|
|
19
|
-
return await this.repo.findOne({ where: {
|
|
18
|
+
async get(agent) {
|
|
19
|
+
return await this.repo.findOne({ where: { agent, active: true } });
|
|
20
20
|
}
|
|
21
|
-
// Busca todos os
|
|
21
|
+
// Busca todos os entidades ativos
|
|
22
22
|
async getAllActive() {
|
|
23
23
|
return await this.repo.find({ where: { active: true } });
|
|
24
24
|
}
|
|
25
|
-
// Busca
|
|
25
|
+
// Busca a entidade com base no clientId do KeyCloak
|
|
26
26
|
async getByApiClientId(apiClientId) {
|
|
27
27
|
return await this.repo.findOne({ where: { apiClientId, active: true } });
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
AgentRepositoryService = __decorate([
|
|
31
31
|
Injectable(),
|
|
32
|
-
__param(0, InjectRepository(
|
|
33
|
-
],
|
|
34
|
-
export {
|
|
32
|
+
__param(0, InjectRepository(IntegrationAgent))
|
|
33
|
+
], AgentRepositoryService);
|
|
34
|
+
export { AgentRepositoryService };
|
|
@@ -5,7 +5,7 @@ export declare class EndpointRepositoryService {
|
|
|
5
5
|
private readonly repo;
|
|
6
6
|
private readonly repoCredential;
|
|
7
7
|
constructor(repo: Repository<IntegrationEndpoint>, repoCredential: Repository<IntegrationCredential>);
|
|
8
|
-
find(
|
|
8
|
+
find(agent: string, entity: string, action: string): Promise<IntegrationEndpoint | null>;
|
|
9
9
|
getCredential(endpoint: IntegrationEndpoint): Promise<IntegrationCredential | null>;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=integration-endpoint-repository.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-endpoint-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-endpoint-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAGrF,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAErB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAFd,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAErC,cAAc,EAAE,UAAU,CAAC,qBAAqB,CAAC;IAG9D,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"integration-endpoint-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-endpoint-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAGrF,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAErB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAFd,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAErC,cAAc,EAAE,UAAU,CAAC,qBAAqB,CAAC;IAG9D,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC;IAqCxF,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;CAI1F"}
|
|
@@ -18,11 +18,11 @@ let EndpointRepositoryService = class EndpointRepositoryService {
|
|
|
18
18
|
this.repo = repo;
|
|
19
19
|
this.repoCredential = repoCredential;
|
|
20
20
|
}
|
|
21
|
-
async find(
|
|
21
|
+
async find(agent, entity, action) {
|
|
22
22
|
const qb = this.repo
|
|
23
23
|
.createQueryBuilder('integration_endpoint')
|
|
24
|
-
.where('integration_endpoint.
|
|
25
|
-
.andWhere('integration_endpoint.
|
|
24
|
+
.where('integration_endpoint.agent = :agent', { agent })
|
|
25
|
+
.andWhere('integration_endpoint.entity = :entity', { entity })
|
|
26
26
|
.andWhere('integration_endpoint.active = :active', { active: true })
|
|
27
27
|
.andWhere(`(
|
|
28
28
|
integration_endpoint.action = 'all' OR
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Repository } from "typeorm";
|
|
2
|
+
import { IntegrationEntity } from "../entities/integration-entity.entity.js";
|
|
3
|
+
export declare class EntityRepositoryService {
|
|
4
|
+
private readonly repo;
|
|
5
|
+
constructor(repo: Repository<IntegrationEntity>);
|
|
6
|
+
getFirstActive(entity: string): Promise<IntegrationEntity | null>;
|
|
7
|
+
getAllActive(): Promise<IntegrationEntity[]>;
|
|
8
|
+
getAllActiveByRoutingMode(routingMode: IntegrationEntity["routingMode"]): Promise<IntegrationEntity[]>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=integration-entity-repository.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration-entity-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-entity-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E,qBACa,uBAAuB;IAGhC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAGhD,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAKjE,YAAY,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAK5C,yBAAyB,CAAC,WAAW,EAAE,iBAAiB,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAG7G"}
|
|
@@ -9,26 +9,26 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
9
9
|
};
|
|
10
10
|
import { Injectable } from "@nestjs/common";
|
|
11
11
|
import { InjectRepository } from "@nestjs/typeorm";
|
|
12
|
-
import {
|
|
13
|
-
let
|
|
12
|
+
import { IntegrationEntity } from "../entities/integration-entity.entity.js";
|
|
13
|
+
let EntityRepositoryService = class EntityRepositoryService {
|
|
14
14
|
repo;
|
|
15
15
|
constructor(repo) {
|
|
16
16
|
this.repo = repo;
|
|
17
17
|
}
|
|
18
|
-
async getFirstActive(
|
|
19
|
-
return await this.repo.findOne({ where: {
|
|
18
|
+
async getFirstActive(entity) {
|
|
19
|
+
return await this.repo.findOne({ where: { entity, active: true }, order: { version: "DESC" } });
|
|
20
20
|
}
|
|
21
|
-
// Busca todos os
|
|
21
|
+
// Busca todos os entityos ativos
|
|
22
22
|
async getAllActive() {
|
|
23
23
|
return await this.repo.find({ where: { active: true } });
|
|
24
24
|
}
|
|
25
|
-
// Busca todos os
|
|
25
|
+
// Busca todos os entityos ativos
|
|
26
26
|
async getAllActiveByRoutingMode(routingMode) {
|
|
27
27
|
return await this.repo.find({ where: { active: true, routingMode } });
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
EntityRepositoryService = __decorate([
|
|
31
31
|
Injectable(),
|
|
32
|
-
__param(0, InjectRepository(
|
|
33
|
-
],
|
|
34
|
-
export {
|
|
32
|
+
__param(0, InjectRepository(IntegrationEntity))
|
|
33
|
+
], EntityRepositoryService);
|
|
34
|
+
export { EntityRepositoryService };
|
|
@@ -3,7 +3,7 @@ import { IntegrationInbound } from "../entities/integration-inbound.entity.js";
|
|
|
3
3
|
export declare class InboundRepositoryService {
|
|
4
4
|
private readonly repo;
|
|
5
5
|
constructor(repo: Repository<IntegrationInbound>);
|
|
6
|
-
get(
|
|
7
|
-
getFirstActive(
|
|
6
|
+
get(agent: string, entity: string, method: string): Promise<IntegrationInbound[]>;
|
|
7
|
+
getFirstActive(agent: string, entity: string, method: string): Promise<IntegrationInbound | null>;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=integration-inbound-repository.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-inbound-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-inbound-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAG/E,qBACa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAGjD,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"integration-inbound-repository.service.d.ts","sourceRoot":"","sources":["../../src/repository/integration-inbound-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAG/E,qBACa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAGjD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAmDjF,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;CAKxG"}
|