@cargolift-cdi/types 0.1.166 → 0.1.167
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/README.md +197 -41
- package/dist/entities/middleware/agent-credential.entity.d.ts +2 -7
- package/dist/entities/middleware/agent-credential.entity.d.ts.map +1 -1
- package/dist/entities/middleware/agent-credential.entity.js +0 -5
- package/dist/entities/middleware/agent-credential.entity.js.map +1 -1
- package/dist/entities/middleware/agent-endpoint.entity.d.ts +13 -10
- package/dist/entities/middleware/agent-endpoint.entity.d.ts.map +1 -1
- package/dist/entities/middleware/agent-endpoint.entity.js +44 -29
- package/dist/entities/middleware/agent-endpoint.entity.js.map +1 -1
- package/dist/entities/middleware/integration-agent.entity.d.ts +1 -1
- package/dist/entities/middleware/integration-agent.entity.d.ts.map +1 -1
- package/dist/entities/middleware/integration-agent.entity.js +12 -12
- package/dist/entities/middleware/integration-agent.entity.js.map +1 -1
- package/dist/enum/integration.enums.d.ts +3 -2
- package/dist/enum/integration.enums.d.ts.map +1 -1
- package/dist/enum/integration.enums.js +2 -1
- package/dist/enum/integration.enums.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/integration.interface.d.ts +12 -64
- package/dist/interfaces/integration.interface.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,72 +1,228 @@
|
|
|
1
1
|
# @cargolift-cdi/types
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Biblioteca compartilhada de **tipos, interfaces, enums e entidades TypeORM** do ecossistema Middleware Cargolift.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
# npm
|
|
9
|
-
npm install -D @cargolift-cdi/types
|
|
9
|
+
---
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
pnpm add -D @cargolift-cdi/types
|
|
11
|
+
## 📌 Objetivo
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
Este pacote centraliza os contratos de dados utilizados pelos serviços e libs do middleware, garantindo **padronização**, **consistência** e **baixo acoplamento** entre módulos.
|
|
14
|
+
|
|
15
|
+
No contexto do monorepo Middleware, ele apoia os princípios de resiliência, segurança, rastreabilidade e escalabilidade ao definir estruturas comuns para:
|
|
16
|
+
|
|
17
|
+
- mensagens de integração;
|
|
18
|
+
- entidades de persistência;
|
|
19
|
+
- enums de domínio;
|
|
20
|
+
- interfaces de payload e metadados.
|
|
21
|
+
|
|
22
|
+
Público-alvo:
|
|
23
|
+
Desenvolvedores internos do middleware.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## ✨ Funcionalidades
|
|
17
28
|
|
|
18
|
-
|
|
29
|
+
- **Contratos de mensageria:** interfaces para uso com RabbitMQ e envelopes de mensagem.
|
|
30
|
+
- **Modelos de domínio compartilhados:** entidades TypeORM para integrações, roteamento, rastreamento, MDM e auditoria.
|
|
31
|
+
- **Enums padronizados:** protocolos, métodos HTTP, autenticação, status de integração e tracking.
|
|
32
|
+
- **Superfície pública unificada:** exportações centralizadas via `src/index.ts`.
|
|
19
33
|
|
|
20
|
-
|
|
34
|
+
Diferenciais Técnicos:
|
|
35
|
+
Tipagem forte fim a fim, reaproveitamento entre serviços e redução de divergências de contrato.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 🔍 Detalhamento
|
|
40
|
+
|
|
41
|
+
### Contratos de Mensageria
|
|
42
|
+
|
|
43
|
+
Define interfaces para garantir tipagem de mensagens e canais durante publicação/consumo.
|
|
44
|
+
|
|
45
|
+
#### Exemplo de Uso
|
|
21
46
|
|
|
22
47
|
```ts
|
|
23
48
|
import type { RabbitMQMessage, RabbitMQChannel } from '@cargolift-cdi/types';
|
|
24
49
|
|
|
25
|
-
function handleMessage(msg: RabbitMQMessage, channel: RabbitMQChannel) {
|
|
50
|
+
export function handleMessage(msg: RabbitMQMessage, channel: RabbitMQChannel) {
|
|
26
51
|
const correlationId = msg.properties.headers['x-correlation-id'];
|
|
27
|
-
|
|
52
|
+
if (!correlationId) {
|
|
53
|
+
channel.ack(msg);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
28
57
|
channel.ack(msg);
|
|
29
58
|
}
|
|
30
59
|
```
|
|
31
60
|
|
|
32
|
-
|
|
61
|
+
Parâmetros:
|
|
62
|
+
`msg: RabbitMQMessage`.
|
|
63
|
+
`channel: RabbitMQChannel`.
|
|
64
|
+
|
|
65
|
+
Retorno:
|
|
66
|
+
`void`.
|
|
67
|
+
|
|
68
|
+
### Entidades de Integração e Governança
|
|
69
|
+
|
|
70
|
+
Disponibiliza entidades com decorators do TypeORM para persistência de integrações, agentes, endpoints, logs, snapshots, tracking e estruturas MDM.
|
|
71
|
+
|
|
72
|
+
#### Exemplo de Uso
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { IntegrationEntity } from '@cargolift-cdi/types';
|
|
76
|
+
|
|
77
|
+
const entity = new IntegrationEntity();
|
|
78
|
+
entity.entity = 'driver';
|
|
79
|
+
entity.version = 1;
|
|
80
|
+
entity.active = true;
|
|
81
|
+
entity.routingMode = 'mdm';
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Parâmetros:
|
|
85
|
+
Campos da entidade conforme o domínio (ex.: `entity`, `version`, `routingMode`).
|
|
86
|
+
|
|
87
|
+
Retorno:
|
|
88
|
+
Instância tipada para uso com repositórios TypeORM.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 🛠 Tecnologias e Dependências
|
|
93
|
+
|
|
94
|
+
<table>
|
|
95
|
+
<thead>
|
|
96
|
+
<tr>
|
|
97
|
+
<th>Tecnologia</th>
|
|
98
|
+
<th>Versão</th>
|
|
99
|
+
<th>Finalidade</th>
|
|
100
|
+
</tr>
|
|
101
|
+
</thead>
|
|
102
|
+
<tbody>
|
|
103
|
+
<tr>
|
|
104
|
+
<td>TypeScript</td>
|
|
105
|
+
<td>^5.6.2</td>
|
|
106
|
+
<td>Tipagem estática e geração de build ESM</td>
|
|
107
|
+
</tr>
|
|
108
|
+
<tr>
|
|
109
|
+
<td>TypeORM</td>
|
|
110
|
+
<td>^0.3.28</td>
|
|
111
|
+
<td>Decorators e modelagem de entidades compartilhadas</td>
|
|
112
|
+
</tr>
|
|
113
|
+
<tr>
|
|
114
|
+
<td>@types/node</td>
|
|
115
|
+
<td>^24.3.1</td>
|
|
116
|
+
<td>Tipos para APIs Node.js</td>
|
|
117
|
+
</tr>
|
|
118
|
+
</tbody>
|
|
119
|
+
</table>
|
|
120
|
+
|
|
121
|
+
**Dependências Internas (monorepo):**
|
|
122
|
+
Consumida por libs e serviços em `libs/*` e `services/*` do workspace middleware.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🚀 Instalação
|
|
127
|
+
|
|
128
|
+
### Pré-requisitos
|
|
129
|
+
|
|
130
|
+
- Node.js: >=18
|
|
131
|
+
- pnpm: recomendado para o monorepo
|
|
132
|
+
|
|
133
|
+
### Passos de Instalação
|
|
134
|
+
|
|
135
|
+
1. No monorepo, instale dependências na raiz:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
pnpm install
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
2. Para consumo externo (quando publicado), adicione o pacote:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
pnpm add @cargolift-cdi/types
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 💡 Como Usar
|
|
150
|
+
|
|
151
|
+
### Quickstart
|
|
33
152
|
|
|
34
153
|
```ts
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
154
|
+
import {
|
|
155
|
+
TransportProtocol,
|
|
156
|
+
IntegrationStatus,
|
|
157
|
+
type RabbitMQMessage,
|
|
158
|
+
} from '@cargolift-cdi/types';
|
|
159
|
+
|
|
160
|
+
const protocol = TransportProtocol.REST;
|
|
161
|
+
const status = IntegrationStatus.PENDING;
|
|
162
|
+
|
|
163
|
+
export function parseMessage(msg: RabbitMQMessage) {
|
|
164
|
+
return {
|
|
165
|
+
protocol,
|
|
166
|
+
status,
|
|
167
|
+
headers: msg.properties.headers,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Casos de Uso Comuns
|
|
173
|
+
|
|
174
|
+
- **Padronização de contratos de integração:** uso das interfaces e enums entre API Hub, ESB e conectores.
|
|
175
|
+
- **Persistência compartilhada:** reutilização das entidades TypeORM em serviços de domínio e governança.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 📁 Estrutura do Projeto
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
src/
|
|
183
|
+
├── entities/
|
|
184
|
+
│ ├── mdm/
|
|
185
|
+
│ ├── middleware/
|
|
186
|
+
│ └── shared/
|
|
187
|
+
├── enum/
|
|
188
|
+
├── interfaces/
|
|
189
|
+
└── index.ts
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
- **`src/entities/`**: Entidades TypeORM de domínio.
|
|
193
|
+
- **`src/enum/`**: Enumerações reutilizáveis.
|
|
194
|
+
- **`src/interfaces/`**: Interfaces para payloads, contexto e integração.
|
|
195
|
+
- **`src/index.ts`**: Superfície pública de exportação do pacote.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## 🧪 Build e Validação
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
pnpm --filter @cargolift-cdi/types build
|
|
48
203
|
```
|
|
49
204
|
|
|
50
|
-
|
|
205
|
+
Observações:
|
|
206
|
+
Este pacote gera artefatos em `dist/` e exporta tipos + código ESM.
|
|
51
207
|
|
|
52
|
-
|
|
208
|
+
---
|
|
53
209
|
|
|
54
|
-
|
|
55
|
-
- This package ships only `.d.ts` files. There is no runtime code.
|
|
56
|
-
- Prefer `import type` (TS 4.5+) so bundlers/Node don’t try to load a runtime module.
|
|
210
|
+
## 🤝 Contribuindo
|
|
57
211
|
|
|
58
|
-
|
|
212
|
+
Fluxo sugerido no monorepo:
|
|
59
213
|
|
|
60
|
-
|
|
61
|
-
|
|
214
|
+
1. Criar branch de feature/bugfix.
|
|
215
|
+
2. Aplicar alteração mantendo compatibilidade dos contratos públicos.
|
|
216
|
+
3. Executar build do pacote.
|
|
217
|
+
4. Abrir PR com descrição do impacto em contratos (`interfaces`, `entities`, `enum`).
|
|
62
218
|
|
|
63
|
-
|
|
219
|
+
Boas práticas:
|
|
64
220
|
|
|
65
|
-
|
|
66
|
-
|
|
221
|
+
- Evite mudanças breaking sem versionamento apropriado.
|
|
222
|
+
- Mantenha nomes e semântica alinhados ao domínio do middleware.
|
|
67
223
|
|
|
68
|
-
|
|
224
|
+
---
|
|
69
225
|
|
|
70
|
-
##
|
|
226
|
+
## 📄 Licença
|
|
71
227
|
|
|
72
228
|
MIT
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { AuthType } from '../../enum/integration.enums.js';
|
|
2
|
-
import {
|
|
2
|
+
import { CredentialConfig, CredentialSecrets } from '../../interfaces/integration.interface.js';
|
|
3
3
|
export declare class MiddlewareAgentCredential {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
6
|
active: boolean;
|
|
7
7
|
type: AuthType;
|
|
8
|
-
config?:
|
|
8
|
+
config?: CredentialConfig | null;
|
|
9
9
|
secrets?: CredentialSecrets | null;
|
|
10
|
-
rotation?: {
|
|
11
|
-
rotatedAt?: string;
|
|
12
|
-
expiresAt?: string;
|
|
13
|
-
notes?: string;
|
|
14
|
-
} | null;
|
|
15
10
|
createdAt: Date;
|
|
16
11
|
updatedAt: Date;
|
|
17
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-credential.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/middleware/agent-credential.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-credential.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/middleware/agent-credential.entity.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAGhG,qBAEa,yBAAyB;IAEpC,EAAE,EAAG,MAAM,CAAC;IAIZ,IAAI,EAAG,MAAM,CAAC;IAId,MAAM,EAAG,OAAO,CAAC;IAIjB,IAAI,EAAG,QAAQ,CAAC;IAOhB,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAOjC,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAGnC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -16,7 +16,6 @@ let MiddlewareAgentCredential = class MiddlewareAgentCredential {
|
|
|
16
16
|
type;
|
|
17
17
|
config;
|
|
18
18
|
secrets;
|
|
19
|
-
rotation;
|
|
20
19
|
createdAt;
|
|
21
20
|
updatedAt;
|
|
22
21
|
};
|
|
@@ -44,10 +43,6 @@ __decorate([
|
|
|
44
43
|
Column({ type: 'jsonb', nullable: true }),
|
|
45
44
|
__metadata("design:type", Object)
|
|
46
45
|
], MiddlewareAgentCredential.prototype, "secrets", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
Column({ type: 'jsonb', nullable: true }),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], MiddlewareAgentCredential.prototype, "rotation", void 0);
|
|
51
46
|
__decorate([
|
|
52
47
|
CreateDateColumn({ name: "created_at", type: "timestamptz" }),
|
|
53
48
|
__metadata("design:type", Date)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-credential.entity.js","sourceRoot":"","sources":["../../../src/entities/middleware/agent-credential.entity.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"agent-credential.entity.js","sourceRoot":"","sources":["../../../src/entities/middleware/agent-credential.entity.ts"],"names":[],"mappings":";;;;;;;;;AAyBA,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,KAAK,EACL,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAMpD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAEpC,EAAE,CAAU;IAIZ,IAAI,CAAU;IAId,MAAM,CAAW;IAIjB,IAAI,CAAY;IAOhB,MAAM,CAA2B;IAOjC,OAAO,CAA4B;IAGnC,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB,CAAA;AAjCC;IADC,sBAAsB,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC;;qDACxE;AAIZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;uDAC3B;AAId;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yDAC1B;AAIjB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uDACxB;AAOhB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACT;AAOjC;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACP;AAGnC;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;4DAAC;AAGjB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;4DAAC;AAlCN,yBAAyB;IAFrC,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;IACpC,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACrB,yBAAyB,CAmCrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TransportProtocol } from "../../enum/integration.enums.js";
|
|
2
|
-
import {
|
|
1
|
+
import { HttpMethod, TransportProtocol } from "../../enum/integration.enums.js";
|
|
2
|
+
import { EndpointTlsConfig, GraphqlEndpointConfig, HttpHeader, ResiliencePolicy, ResponseInterpreterRules } from "../../interfaces/integration.interface.js";
|
|
3
3
|
export declare class MiddlewareAgentEndpoint {
|
|
4
4
|
id: string;
|
|
5
5
|
agent: string;
|
|
@@ -8,16 +8,19 @@ export declare class MiddlewareAgentEndpoint {
|
|
|
8
8
|
version: number;
|
|
9
9
|
active: boolean;
|
|
10
10
|
transportProtocol: TransportProtocol;
|
|
11
|
-
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
method: HttpMethod;
|
|
13
|
+
path?: string | null;
|
|
14
|
+
contentType?: string | null;
|
|
15
|
+
headers?: HttpHeader | null;
|
|
16
|
+
queryParams?: Record<string, string> | null;
|
|
17
|
+
responseRules?: ResponseInterpreterRules | null;
|
|
18
|
+
retryableStatusCodes?: number[] | null;
|
|
19
|
+
timeoutMs?: number | null;
|
|
12
20
|
credentialId?: string | null;
|
|
13
21
|
tls?: EndpointTlsConfig | null;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
amqpConfig?: EndpointAMQPConfig | null;
|
|
17
|
-
retryPolicy?: RetryPolicy | null;
|
|
18
|
-
rateLimit?: RateLimit | null;
|
|
19
|
-
breakerPolicy?: BreakerPolicy | null;
|
|
20
|
-
maxConcurrentPerEndpoint?: number | null;
|
|
22
|
+
resilience?: ResiliencePolicy | null;
|
|
23
|
+
graphqlConfig?: GraphqlEndpointConfig | null;
|
|
21
24
|
createdAt: Date;
|
|
22
25
|
updatedAt: Date;
|
|
23
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-endpoint.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/middleware/agent-endpoint.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-endpoint.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/middleware/agent-endpoint.entity.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,UAAU,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAG7J,qBAKa,uBAAuB;IAElC,EAAE,EAAG,MAAM,CAAC;IAIZ,KAAK,EAAG,MAAM,CAAC;IAIf,MAAM,EAAG,MAAM,CAAC;IAIhB,MAAM,EAAG,MAAM,CAAC;IAGhB,OAAO,EAAG,MAAM,CAAC;IAGjB,MAAM,EAAG,OAAO,CAAC;IAMjB,iBAAiB,EAAG,iBAAiB,CAAC;IAItC,OAAO,EAAG,MAAM,CAAC;IAMjB,MAAM,EAAG,UAAU,CAAC;IAIpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIrB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAI5B,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAI5B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAI5C,aAAa,CAAC,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAIhD,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAIvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAM1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAM7B,GAAG,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAS/B,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAUrC,aAAa,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAK7C,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
|
|
11
|
-
import { TransportProtocol } from "../../enum/integration.enums.js";
|
|
11
|
+
import { HttpMethod, TransportProtocol } from "../../enum/integration.enums.js";
|
|
12
12
|
let MiddlewareAgentEndpoint = class MiddlewareAgentEndpoint {
|
|
13
13
|
id;
|
|
14
14
|
agent;
|
|
@@ -17,16 +17,19 @@ let MiddlewareAgentEndpoint = class MiddlewareAgentEndpoint {
|
|
|
17
17
|
version;
|
|
18
18
|
active;
|
|
19
19
|
transportProtocol;
|
|
20
|
-
|
|
20
|
+
baseUrl;
|
|
21
|
+
method;
|
|
22
|
+
path;
|
|
23
|
+
contentType;
|
|
24
|
+
headers;
|
|
25
|
+
queryParams;
|
|
26
|
+
responseRules;
|
|
27
|
+
retryableStatusCodes;
|
|
28
|
+
timeoutMs;
|
|
21
29
|
credentialId;
|
|
22
30
|
tls;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
amqpConfig;
|
|
26
|
-
retryPolicy;
|
|
27
|
-
rateLimit;
|
|
28
|
-
breakerPolicy;
|
|
29
|
-
maxConcurrentPerEndpoint;
|
|
31
|
+
resilience;
|
|
32
|
+
graphqlConfig;
|
|
30
33
|
createdAt;
|
|
31
34
|
updatedAt;
|
|
32
35
|
};
|
|
@@ -35,7 +38,7 @@ __decorate([
|
|
|
35
38
|
__metadata("design:type", String)
|
|
36
39
|
], MiddlewareAgentEndpoint.prototype, "id", void 0);
|
|
37
40
|
__decorate([
|
|
38
|
-
Column({
|
|
41
|
+
Column({ type: "varchar", length: 80 }),
|
|
39
42
|
__metadata("design:type", String)
|
|
40
43
|
], MiddlewareAgentEndpoint.prototype, "agent", void 0);
|
|
41
44
|
__decorate([
|
|
@@ -59,45 +62,57 @@ __decorate([
|
|
|
59
62
|
__metadata("design:type", String)
|
|
60
63
|
], MiddlewareAgentEndpoint.prototype, "transportProtocol", void 0);
|
|
61
64
|
__decorate([
|
|
62
|
-
Column({ type: "varchar", length: 500 }),
|
|
65
|
+
Column({ name: "base_url", type: "varchar", length: 500 }),
|
|
63
66
|
__metadata("design:type", String)
|
|
64
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
67
|
+
], MiddlewareAgentEndpoint.prototype, "baseUrl", void 0);
|
|
65
68
|
__decorate([
|
|
66
|
-
Column({ name: "
|
|
69
|
+
Column({ name: "http_method", type: "varchar", length: 10 }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], MiddlewareAgentEndpoint.prototype, "method", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
Column({ type: "varchar", length: 500, nullable: true }),
|
|
67
74
|
__metadata("design:type", Object)
|
|
68
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
75
|
+
], MiddlewareAgentEndpoint.prototype, "path", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
Column({ name: "content_type", type: "varchar", length: 100, nullable: true }),
|
|
78
|
+
__metadata("design:type", Object)
|
|
79
|
+
], MiddlewareAgentEndpoint.prototype, "contentType", void 0);
|
|
69
80
|
__decorate([
|
|
70
81
|
Column({ type: "jsonb", nullable: true }),
|
|
71
82
|
__metadata("design:type", Object)
|
|
72
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
83
|
+
], MiddlewareAgentEndpoint.prototype, "headers", void 0);
|
|
73
84
|
__decorate([
|
|
74
|
-
Column({ name: "
|
|
85
|
+
Column({ name: "query_params", type: "jsonb", nullable: true }),
|
|
75
86
|
__metadata("design:type", Object)
|
|
76
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
87
|
+
], MiddlewareAgentEndpoint.prototype, "queryParams", void 0);
|
|
77
88
|
__decorate([
|
|
78
|
-
Column({ name: "
|
|
89
|
+
Column({ name: "response_rules", type: "jsonb", nullable: true }),
|
|
79
90
|
__metadata("design:type", Object)
|
|
80
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
91
|
+
], MiddlewareAgentEndpoint.prototype, "responseRules", void 0);
|
|
81
92
|
__decorate([
|
|
82
|
-
Column({ name: "
|
|
93
|
+
Column({ name: "retryable_status_codes", type: "jsonb", nullable: true }),
|
|
83
94
|
__metadata("design:type", Object)
|
|
84
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
95
|
+
], MiddlewareAgentEndpoint.prototype, "retryableStatusCodes", void 0);
|
|
85
96
|
__decorate([
|
|
86
|
-
Column({ name: "
|
|
97
|
+
Column({ name: "timeout_ms", type: "int", nullable: true }),
|
|
87
98
|
__metadata("design:type", Object)
|
|
88
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
99
|
+
], MiddlewareAgentEndpoint.prototype, "timeoutMs", void 0);
|
|
89
100
|
__decorate([
|
|
90
|
-
Column({ name: "
|
|
101
|
+
Column({ name: "credential_id", type: "bigint", nullable: true }),
|
|
91
102
|
__metadata("design:type", Object)
|
|
92
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
103
|
+
], MiddlewareAgentEndpoint.prototype, "credentialId", void 0);
|
|
93
104
|
__decorate([
|
|
94
|
-
Column({
|
|
105
|
+
Column({ type: "jsonb", nullable: true }),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], MiddlewareAgentEndpoint.prototype, "tls", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
Column({ type: "jsonb", nullable: true }),
|
|
95
110
|
__metadata("design:type", Object)
|
|
96
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
111
|
+
], MiddlewareAgentEndpoint.prototype, "resilience", void 0);
|
|
97
112
|
__decorate([
|
|
98
|
-
Column({ name: "
|
|
113
|
+
Column({ name: "graphql_config", type: "jsonb", nullable: true }),
|
|
99
114
|
__metadata("design:type", Object)
|
|
100
|
-
], MiddlewareAgentEndpoint.prototype, "
|
|
115
|
+
], MiddlewareAgentEndpoint.prototype, "graphqlConfig", void 0);
|
|
101
116
|
__decorate([
|
|
102
117
|
CreateDateColumn({ name: "created_at", type: "timestamptz" }),
|
|
103
118
|
__metadata("design:type", Date)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-endpoint.entity.js","sourceRoot":"","sources":["../../../src/entities/middleware/agent-endpoint.entity.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"agent-endpoint.entity.js","sourceRoot":"","sources":["../../../src/entities/middleware/agent-endpoint.entity.ts"],"names":[],"mappings":";;;;;;;;;AAWA,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,KAAK,EACL,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AASzE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAElC,EAAE,CAAU;IAIZ,KAAK,CAAU;IAIf,MAAM,CAAU;IAIhB,MAAM,CAAU;IAGhB,OAAO,CAAU;IAGjB,MAAM,CAAW;IAMjB,iBAAiB,CAAqB;IAItC,OAAO,CAAU;IAMjB,MAAM,CAAc;IAIpB,IAAI,CAAiB;IAIrB,WAAW,CAAiB;IAI5B,OA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AAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;0DAAC;AAGjB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;0DAAC;AAvGN,uBAAuB;IALnC,MAAM,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAClC,KAAK,CAAC,0BAA0B,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE;QAC3E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,iBAAiB;KACzB,CAAC;GACW,uBAAuB,CAwGnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-agent.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/middleware/integration-agent.entity.ts"],"names":[],"mappings":"AAaA,qBAEa,
|
|
1
|
+
{"version":3,"file":"integration-agent.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/middleware/integration-agent.entity.ts"],"names":[],"mappings":"AAaA,qBAEa,eAAe;IAG1B,EAAE,EAAG,MAAM,CAAC;IAIZ,KAAK,EAAG,MAAM,CAAC;IAIf,MAAM,EAAG,OAAO,CAAC;IAIjB,SAAS,EAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;IAI5C,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { Column, Entity, PrimaryGeneratedColumn, Index, CreateDateColumn, UpdateDateColumn } from 'typeorm';
|
|
11
|
-
let
|
|
11
|
+
let MiddlewareAgent = class MiddlewareAgent {
|
|
12
12
|
id;
|
|
13
13
|
agent;
|
|
14
14
|
active;
|
|
@@ -20,34 +20,34 @@ let IntegrationAgent = class IntegrationAgent {
|
|
|
20
20
|
__decorate([
|
|
21
21
|
PrimaryGeneratedColumn("identity", { type: "bigint", generatedIdentity: "ALWAYS" }),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
|
-
],
|
|
23
|
+
], MiddlewareAgent.prototype, "id", void 0);
|
|
24
24
|
__decorate([
|
|
25
25
|
Column({ type: 'varchar', length: 80 }),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
|
-
],
|
|
27
|
+
], MiddlewareAgent.prototype, "agent", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
Column({ type: 'boolean', default: true }),
|
|
30
30
|
__metadata("design:type", Boolean)
|
|
31
|
-
],
|
|
31
|
+
], MiddlewareAgent.prototype, "active", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
Column({ type: 'varchar', length: 20, default: 'both' }),
|
|
34
34
|
__metadata("design:type", String)
|
|
35
|
-
],
|
|
35
|
+
], MiddlewareAgent.prototype, "direction", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
Column({ name: "api_client_id", type: 'varchar', length: 80, nullable: true }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
|
-
],
|
|
39
|
+
], MiddlewareAgent.prototype, "apiClientId", void 0);
|
|
40
40
|
__decorate([
|
|
41
41
|
CreateDateColumn({ name: "created_at", type: "timestamptz" }),
|
|
42
42
|
__metadata("design:type", Date)
|
|
43
|
-
],
|
|
43
|
+
], MiddlewareAgent.prototype, "createdAt", void 0);
|
|
44
44
|
__decorate([
|
|
45
45
|
UpdateDateColumn({ name: "updated_at", type: "timestamptz" }),
|
|
46
46
|
__metadata("design:type", Date)
|
|
47
|
-
],
|
|
48
|
-
|
|
49
|
-
Entity({ name: '
|
|
47
|
+
], MiddlewareAgent.prototype, "updatedAt", void 0);
|
|
48
|
+
MiddlewareAgent = __decorate([
|
|
49
|
+
Entity({ name: 'agent' }),
|
|
50
50
|
Index(["agent"], { unique: true })
|
|
51
|
-
],
|
|
52
|
-
export {
|
|
51
|
+
], MiddlewareAgent);
|
|
52
|
+
export { MiddlewareAgent };
|
|
53
53
|
//# sourceMappingURL=integration-agent.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-agent.entity.js","sourceRoot":"","sources":["../../../src/entities/middleware/integration-agent.entity.ts"],"names":[],"mappings":";;;;;;;;;AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIrG,IAAM,
|
|
1
|
+
{"version":3,"file":"integration-agent.entity.js","sourceRoot":"","sources":["../../../src/entities/middleware/integration-agent.entity.ts"],"names":[],"mappings":";;;;;;;;;AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIrG,IAAM,eAAe,GAArB,MAAM,eAAe;IAG1B,EAAE,CAAU;IAIZ,KAAK,CAAU;IAIf,MAAM,CAAW;IAIjB,SAAS,CAAmC;IAI5C,WAAW,CAAU;IAGrB,SAAS,CAAQ;IAGjB,SAAS,CAAQ;CAClB,CAAA;AAvBC;IADC,sBAAsB,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC;;2CACxE;AAIZ;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;8CACzB;AAIf;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;+CAC1B;AAIjB;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;;kDACb;AAI5C;IADC,MAAM,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDAC1D;AAGrB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;kDAAC;AAGjB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAClD,IAAI;kDAAC;AAzBN,eAAe;IAF3B,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IACzB,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACtB,eAAe,CA0B3B"}
|
|
@@ -17,13 +17,14 @@ export declare enum AuthType {
|
|
|
17
17
|
BASIC = "BASIC",
|
|
18
18
|
BEARER_STATIC = "BEARER_STATIC",
|
|
19
19
|
OAUTH2_CLIENT_CREDENTIALS = "OAUTH2_CLIENT_CREDENTIALS",
|
|
20
|
-
OAUTH2_PASSWORD = "OAUTH2_PASSWORD"
|
|
20
|
+
OAUTH2_PASSWORD = "OAUTH2_PASSWORD",
|
|
21
|
+
JWT = "JWT"
|
|
21
22
|
}
|
|
22
23
|
export declare enum IntegrationStatus {
|
|
23
24
|
PENDING = "pending",
|
|
24
25
|
SUCCESS = "success",
|
|
25
26
|
FAILED = "failed",
|
|
26
27
|
RETRYING = "retrying",
|
|
27
|
-
|
|
28
|
+
DISCARDED = "discarded"
|
|
28
29
|
}
|
|
29
30
|
//# sourceMappingURL=integration.enums.d.ts.map
|
|
@@ -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;AAGD,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,yBAAyB,8BAA8B;IACvD,eAAe,oBAAoB;
|
|
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;AAGD,oBAAY,QAAQ;IAClB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,yBAAyB,8BAA8B;IACvD,eAAe,oBAAoB;IACnC,GAAG,QAAQ;CACZ;AAED,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB"}
|
|
@@ -21,6 +21,7 @@ export var AuthType;
|
|
|
21
21
|
AuthType["BEARER_STATIC"] = "BEARER_STATIC";
|
|
22
22
|
AuthType["OAUTH2_CLIENT_CREDENTIALS"] = "OAUTH2_CLIENT_CREDENTIALS";
|
|
23
23
|
AuthType["OAUTH2_PASSWORD"] = "OAUTH2_PASSWORD";
|
|
24
|
+
AuthType["JWT"] = "JWT";
|
|
24
25
|
})(AuthType || (AuthType = {}));
|
|
25
26
|
export var IntegrationStatus;
|
|
26
27
|
(function (IntegrationStatus) {
|
|
@@ -28,6 +29,6 @@ export var IntegrationStatus;
|
|
|
28
29
|
IntegrationStatus["SUCCESS"] = "success";
|
|
29
30
|
IntegrationStatus["FAILED"] = "failed";
|
|
30
31
|
IntegrationStatus["RETRYING"] = "retrying";
|
|
31
|
-
IntegrationStatus["
|
|
32
|
+
IntegrationStatus["DISCARDED"] = "discarded";
|
|
32
33
|
})(IntegrationStatus || (IntegrationStatus = {}));
|
|
33
34
|
//# sourceMappingURL=integration.enums.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.enums.js","sourceRoot":"","sources":["../../src/enum/integration.enums.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAGD,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"integration.enums.js","sourceRoot":"","sources":["../../src/enum/integration.enums.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,wCAAmB,CAAA;IACnB,kCAAa,CAAA;AACf,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AAED,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAGD,MAAM,CAAN,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,yBAAa,CAAA;IACb,+BAAmB,CAAA;IACnB,2BAAe,CAAA;IACf,2CAA+B,CAAA;IAC/B,mEAAuD,CAAA;IACvD,+CAAmC,CAAA;IACnC,uBAAW,CAAA;AACb,CAAC,EARW,QAAQ,KAAR,QAAQ,QAQnB;AAED,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;AACzB,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ export * from './entities/middleware/integration-outbound-snapshot.entity.js';
|
|
|
16
16
|
export * from './entities/middleware/routing-inbound.entity.js';
|
|
17
17
|
export * from './entities/middleware/routing-outbound.entity.js';
|
|
18
18
|
export * from './entities/middleware/agent-endpoint.entity.js';
|
|
19
|
-
export * from './entities/middleware/agent-endpoint.entity.js';
|
|
20
19
|
export * from './entities/middleware/agent-credential.entity.js';
|
|
21
20
|
export * from './entities/middleware/diagnostic-latency.entity.js';
|
|
22
21
|
export * from './entities/middleware/log-routing-inbound.entity.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,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;AAC5D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AAInD,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,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;AAC5D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AAInD,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AAGrE,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AAGxD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,6 @@ export * from './entities/middleware/integration-outbound-snapshot.entity.js';
|
|
|
16
16
|
export * from './entities/middleware/routing-inbound.entity.js';
|
|
17
17
|
export * from './entities/middleware/routing-outbound.entity.js';
|
|
18
18
|
export * from './entities/middleware/agent-endpoint.entity.js';
|
|
19
|
-
export * from './entities/middleware/agent-endpoint.entity.js';
|
|
20
19
|
export * from './entities/middleware/agent-credential.entity.js';
|
|
21
20
|
export * from './entities/middleware/diagnostic-latency.entity.js';
|
|
22
21
|
export * from './entities/middleware/log-routing-inbound.entity.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,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;AAC5D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AAInD,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,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;AAC5D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AAInD,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,iDAAiD,CAAC;AAChE,cAAc,kDAAkD,CAAC;AACjE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AACpE,cAAc,sDAAsD,CAAC;AACrE,cAAc,yCAAyC,CAAC;AACxD,cAAc,sDAAsD,CAAC;AACrE,cAAc,sDAAsD,CAAC;AAGrE,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AAGxD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { HttpMethod } from "../enum/integration.enums.js";
|
|
2
1
|
import { PayloadConditionsValue } from "../interfaces/payload-condition.interface.js";
|
|
3
2
|
export type IntegrationActions = "create" | "update" | "upsert" | "delete" | "clean" | "view";
|
|
4
3
|
export interface ResponseInterpreterSuccessCondition {
|
|
@@ -18,31 +17,6 @@ export interface HttpHeader {
|
|
|
18
17
|
contentType?: string;
|
|
19
18
|
[key: string]: string | undefined;
|
|
20
19
|
}
|
|
21
|
-
export interface EndpointConfig {
|
|
22
|
-
timeoutMs?: number;
|
|
23
|
-
}
|
|
24
|
-
export interface HttpConfig {
|
|
25
|
-
method: HttpMethod;
|
|
26
|
-
path?: string;
|
|
27
|
-
header?: HttpHeader;
|
|
28
|
-
queryParams?: Record<string, string>;
|
|
29
|
-
responseInterpreter?: ResponseInterpreterRules;
|
|
30
|
-
compression?: {
|
|
31
|
-
type?: "gzip" | "deflate" | "br";
|
|
32
|
-
};
|
|
33
|
-
onError?: {
|
|
34
|
-
retryStatusCodes?: number[];
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface EndpointAMQPConfig {
|
|
38
|
-
topic?: string;
|
|
39
|
-
queue?: string;
|
|
40
|
-
exchange?: string;
|
|
41
|
-
routingKey?: string;
|
|
42
|
-
partitionKey?: string;
|
|
43
|
-
messageKey?: string;
|
|
44
|
-
properties?: Record<string, any>;
|
|
45
|
-
}
|
|
46
20
|
export interface EndpointTlsConfig {
|
|
47
21
|
rejectUnauthorized?: boolean;
|
|
48
22
|
ca?: string;
|
|
@@ -67,46 +41,20 @@ export interface BreakerPolicy {
|
|
|
67
41
|
openMs?: number;
|
|
68
42
|
halfOpenMaxAttempts?: number;
|
|
69
43
|
}
|
|
70
|
-
export interface
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
};
|
|
76
|
-
basic?: {
|
|
77
|
-
usernameField?: string;
|
|
78
|
-
};
|
|
79
|
-
bearer?: {
|
|
80
|
-
headerName?: string;
|
|
81
|
-
prefix?: string;
|
|
82
|
-
};
|
|
83
|
-
oauth2?: {
|
|
84
|
-
tokenUrl: string;
|
|
85
|
-
clientId: string;
|
|
86
|
-
scopes?: string[] | string;
|
|
87
|
-
audience?: string;
|
|
88
|
-
resource?: string;
|
|
89
|
-
authStyle?: "body" | "basic" | "bearer";
|
|
90
|
-
};
|
|
44
|
+
export interface ResiliencePolicy {
|
|
45
|
+
retry?: RetryPolicy;
|
|
46
|
+
rateLimit?: RateLimit;
|
|
47
|
+
breaker?: BreakerPolicy;
|
|
48
|
+
maxConcurrent?: number;
|
|
91
49
|
}
|
|
92
|
-
export interface
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
username: string;
|
|
98
|
-
password: string;
|
|
99
|
-
};
|
|
100
|
-
bearer?: {
|
|
101
|
-
token: string;
|
|
102
|
-
};
|
|
103
|
-
oauth2?: {
|
|
104
|
-
clientSecret: string;
|
|
105
|
-
username?: string;
|
|
106
|
-
password?: string;
|
|
107
|
-
privateKey?: string;
|
|
108
|
-
};
|
|
50
|
+
export interface GraphqlEndpointConfig {
|
|
51
|
+
query: string;
|
|
52
|
+
operationName?: string;
|
|
53
|
+
defaultVariables?: Record<string, unknown>;
|
|
54
|
+
variablesMapping?: string;
|
|
109
55
|
}
|
|
56
|
+
export type CredentialConfig = Record<string, unknown>;
|
|
57
|
+
export type CredentialSecrets = Record<string, unknown>;
|
|
110
58
|
export interface IntegrationInboundRouting {
|
|
111
59
|
route: string;
|
|
112
60
|
conditions?: PayloadConditionsValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/integration.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"integration.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/integration.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAK9F,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,iBAAiB;IAChC,kBAAkB,CAAC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