@cargolift-cdi/types 0.1.56 → 0.1.58
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/db/entities/integration/integration-endpoint.d.ts +2 -14
- package/dist/db/entities/integration/integration-endpoint.d.ts.map +1 -1
- package/dist/db/entities/integration/integration-endpoint.js +2 -53
- package/dist/db/entities/integration/integration.interface.d.ts +5 -7
- package/dist/db/entities/integration/integration.interface.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { TransportProtocol } from "../../../enum/integration.enums.js";
|
|
|
2
2
|
import { EndpointBreakerPolicy, EndpointHttpConfig, EndpointQueueConfig, EndpointRateLimitConfig, EndpointRetryPolicy, EndpointTlsConfig } from "./integration.interface.js";
|
|
3
3
|
/**
|
|
4
4
|
* Definição de roteamento de saída por chave (evento) e destino.
|
|
5
|
-
* Agora inclui também as configurações de Target/Delivery (protocolo, endpoint,
|
|
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;
|
|
@@ -37,17 +37,7 @@ export declare class IntegrationEndpoint {
|
|
|
37
37
|
*/
|
|
38
38
|
tls?: EndpointTlsConfig | null;
|
|
39
39
|
/**
|
|
40
|
-
* Config HTTP específica (quando transport = '
|
|
41
|
-
* {
|
|
42
|
-
* method: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE',
|
|
43
|
-
* pathTemplate?: string, // ex.: /v1/drivers/{{id}}
|
|
44
|
-
* headersTemplate?: Record<string, string>, // valores podem conter templates
|
|
45
|
-
* queryTemplate?: Record<string, any>,
|
|
46
|
-
* bodyTemplate?: any, // JSONata/Liquid/Handlebars
|
|
47
|
-
* contentType?: 'application/json' | 'application/xml' | 'text/plain' | string,
|
|
48
|
-
* timeoutMs?: number,
|
|
49
|
-
* compression?: { type?: 'gzip' | 'deflate' | 'br' }
|
|
50
|
-
* }
|
|
40
|
+
* Config HTTP específica (quando transport = 'REST'):
|
|
51
41
|
*/
|
|
52
42
|
httpConfig?: EndpointHttpConfig | null;
|
|
53
43
|
/**
|
|
@@ -55,9 +45,7 @@ export declare class IntegrationEndpoint {
|
|
|
55
45
|
* {
|
|
56
46
|
* topic?: string, queue?: string, exchange?: string, routingKey?: string,
|
|
57
47
|
* partitionKey?: string, messageKey?: string,
|
|
58
|
-
* headersTemplate?: Record<string, string>,
|
|
59
48
|
* properties?: Record<string, any>, // amqp/kafka props
|
|
60
|
-
* payloadTemplate?: any
|
|
61
49
|
* }
|
|
62
50
|
*/
|
|
63
51
|
queueConfig?: EndpointQueueConfig | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-endpoint.d.ts","sourceRoot":"","sources":["../../../../src/db/entities/integration/integration-endpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration-endpoint.d.ts","sourceRoot":"","sources":["../../../../src/db/entities/integration/integration-endpoint.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG7K;;;GAGG;AACH,qBAKa,mBAAmB;IAE9B,EAAE,EAAG,MAAM,CAAC;IAGZ,8CAA8C;IAE9C,MAAM,EAAG,MAAM,CAAC;IAEhB,0DAA0D;IAE1D,KAAK,EAAG,MAAM,CAAC;IAEf,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;IAK/B;;OAEG;IAEH,UAAU,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEvC;;;;;;;OAOG;IAEH,WAAW,CAAC,EAAE,mBAAmB,GAAE,IAAI,CAAC;IAGxC;;;OAGG;IAEH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEzC;;;OAGG;IAEH,SAAS,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAE3C;;;OAGG;IAEH,aAAa,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAE7C;;;;OAIG;IAEH,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzC;;;OAGG;IAOH,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAElB"}
|
|
@@ -30,53 +30,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
30
30
|
* - SQS/PubSub: ARN, tópico ou projeto+tópico
|
|
31
31
|
*
|
|
32
32
|
* @property httpConfig Configurações específicas quando transportProtocol é HTTP/REST.
|
|
33
|
-
* Estrutura típica:
|
|
34
|
-
* {
|
|
35
|
-
* method?: 'POST'|'PUT'|'PATCH'|'GET'|'DELETE',
|
|
36
|
-
* pathTemplate?: string, // ex.: /v1/drivers/{{id}}
|
|
37
|
-
* headersTemplate?: Record<string,string>,
|
|
38
|
-
* queryTemplate?: Record<string,any>,
|
|
39
|
-
* bodyTemplate?: any, // JSONata / Liquid / Handlebars
|
|
40
|
-
* contentType?: string, // ex.: 'application/json'
|
|
41
|
-
* timeoutMs?: number,
|
|
42
|
-
* compression?: { type?: 'gzip'|'deflate'|'br' }
|
|
43
|
-
* }
|
|
44
33
|
*
|
|
45
34
|
* @property queueConfig Configurações para filas/streams quando transportProtocol é AMQP/Kafka/SQS/PubSub.
|
|
46
|
-
* Estrutura típica:
|
|
47
|
-
* {
|
|
48
|
-
* topic?: string,
|
|
49
|
-
* queue?: string,
|
|
50
|
-
* exchange?: string,
|
|
51
|
-
* routingKey?: string,
|
|
52
|
-
* partitionKey?: string,
|
|
53
|
-
* messageKey?: string,
|
|
54
|
-
* headersTemplate?: Record<string,string>,
|
|
55
|
-
* properties?: Record<string,any>, // propriedades específicas do broker
|
|
56
|
-
* payloadTemplate?: any
|
|
57
|
-
* }
|
|
58
35
|
*
|
|
59
|
-
* @example Exemplo de httpConfig:
|
|
60
|
-
* {
|
|
61
|
-
* method: 'POST',
|
|
62
|
-
* pathTemplate: '/v1/drivers/{{id}}',
|
|
63
|
-
* headersTemplate: { 'Authorization': 'Bearer {{token}}', 'Content-Type': 'application/json' },
|
|
64
|
-
* bodyTemplate: { id: '{{id}}', name: '{{name}}' },
|
|
65
|
-
* timeoutMs: 5000
|
|
66
|
-
* }
|
|
67
|
-
*
|
|
68
|
-
* @example Exemplo de queueConfig para Kafka:
|
|
69
|
-
* {
|
|
70
|
-
* topic: 'drivers.created',
|
|
71
|
-
* partitionKey: '{{id}}',
|
|
72
|
-
* headersTemplate: { correlationId: '{{correlationId}}' },
|
|
73
|
-
* payloadTemplate: { id: '{{id}}', payload: '{{payload}}' }
|
|
74
|
-
* }
|
|
75
36
|
*/
|
|
76
37
|
import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
|
|
77
38
|
/**
|
|
78
39
|
* Definição de roteamento de saída por chave (evento) e destino.
|
|
79
|
-
* Agora inclui também as configurações de Target/Delivery (protocolo, endpoint,
|
|
40
|
+
* Agora inclui também as configurações de Target/Delivery (protocolo, endpoint, políticas, etc.).
|
|
80
41
|
*/
|
|
81
42
|
let IntegrationEndpoint = class IntegrationEndpoint {
|
|
82
43
|
id; // manter string no TS para bigint seguro
|
|
@@ -113,17 +74,7 @@ let IntegrationEndpoint = class IntegrationEndpoint {
|
|
|
113
74
|
// @Column({ name: "http_method", type: "varchar", length: 10, default: 'POST', nullable: true })
|
|
114
75
|
// httpMethod!: HttpMethod | null;
|
|
115
76
|
/**
|
|
116
|
-
* Config HTTP específica (quando transport = '
|
|
117
|
-
* {
|
|
118
|
-
* method: 'POST' | 'PUT' | 'PATCH' | 'GET' | 'DELETE',
|
|
119
|
-
* pathTemplate?: string, // ex.: /v1/drivers/{{id}}
|
|
120
|
-
* headersTemplate?: Record<string, string>, // valores podem conter templates
|
|
121
|
-
* queryTemplate?: Record<string, any>,
|
|
122
|
-
* bodyTemplate?: any, // JSONata/Liquid/Handlebars
|
|
123
|
-
* contentType?: 'application/json' | 'application/xml' | 'text/plain' | string,
|
|
124
|
-
* timeoutMs?: number,
|
|
125
|
-
* compression?: { type?: 'gzip' | 'deflate' | 'br' }
|
|
126
|
-
* }
|
|
77
|
+
* Config HTTP específica (quando transport = 'REST'):
|
|
127
78
|
*/
|
|
128
79
|
httpConfig;
|
|
129
80
|
/**
|
|
@@ -131,9 +82,7 @@ let IntegrationEndpoint = class IntegrationEndpoint {
|
|
|
131
82
|
* {
|
|
132
83
|
* topic?: string, queue?: string, exchange?: string, routingKey?: string,
|
|
133
84
|
* partitionKey?: string, messageKey?: string,
|
|
134
|
-
* headersTemplate?: Record<string, string>,
|
|
135
85
|
* properties?: Record<string, any>, // amqp/kafka props
|
|
136
|
-
* payloadTemplate?: any
|
|
137
86
|
* }
|
|
138
87
|
*/
|
|
139
88
|
queueConfig;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HttpMethod } from "../../../enum/integration.enums.js";
|
|
2
|
+
export interface HttpHeader {
|
|
3
|
+
contentType?: string;
|
|
4
|
+
[key: string]: string | undefined;
|
|
5
|
+
}
|
|
2
6
|
export interface EndpointHttpConfig {
|
|
3
7
|
method: HttpMethod;
|
|
4
|
-
|
|
5
|
-
headersTemplate?: Record<string, string>;
|
|
6
|
-
queryTemplate?: Record<string, any>;
|
|
7
|
-
bodyTemplate?: any;
|
|
8
|
-
contentType?: string;
|
|
8
|
+
header?: HttpHeader;
|
|
9
9
|
timeoutMs?: number;
|
|
10
10
|
compression?: {
|
|
11
11
|
type?: 'gzip' | 'deflate' | 'br';
|
|
@@ -18,9 +18,7 @@ export interface EndpointQueueConfig {
|
|
|
18
18
|
routingKey?: string;
|
|
19
19
|
partitionKey?: string;
|
|
20
20
|
messageKey?: string;
|
|
21
|
-
headersTemplate?: Record<string, string>;
|
|
22
21
|
properties?: Record<string, any>;
|
|
23
|
-
payloadTemplate?: any;
|
|
24
22
|
}
|
|
25
23
|
export interface EndpointTlsConfig {
|
|
26
24
|
rejectUnauthorized?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.interface.d.ts","sourceRoot":"","sources":["../../../../src/db/entities/integration/integration.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"integration.interface.d.ts","sourceRoot":"","sources":["../../../../src/db/entities/integration/integration.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;IAKpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAA;KAAE,CAAC;CACpD;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;I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