@cargolift-cdi/types 0.1.78 → 0.1.80

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.
@@ -29,6 +29,8 @@ export declare class LogIntegrationInbound {
29
29
  status: IntegrationStatus;
30
30
  /** Motivo do status (mensagem curta) */
31
31
  statusReason?: string | null;
32
+ /** Quantidade de tentativas realizadas até o sucesso ou falha definitiva */
33
+ retries?: number | null;
32
34
  /** Cabeçalhos enviados ao destino após sanitização */
33
35
  headers?: string | null;
34
36
  /** Envelope da requisição */
@@ -39,14 +41,12 @@ export declare class LogIntegrationInbound {
39
41
  transformedPayload?: string | null;
40
42
  /** Payload após enriquecimento de regras do BRE */
41
43
  enrichedPayload?: string | null;
42
- /** Quantidade de tentativas realizadas até o sucesso ou falha definitiva */
43
- retries?: number | null;
44
44
  /** Mensagem completa do erro */
45
45
  errorMessage?: string | null;
46
46
  /** Stack completo quando disponível (mantido para investigações) */
47
47
  errorStack?: string | null;
48
48
  /** Classificação do erro para o mecanismo de DLQ/retry */
49
- errorClassification?: 'transient' | 'fatal' | 'business' | 'none';
49
+ errorClassification?: 'application' | 'business';
50
50
  /** Indica se este log veio de um replay manual ou DLQ */
51
51
  wasReplayedFromDlq: boolean;
52
52
  /** ID da tabela integration_inbound */
@@ -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;AAGjE;;;GAGG;AACH,qBAKa,qBAAqB;IAEhC,EAAE,EAAG,MAAM,CAAC;IAEZ,8CAA8C;IAE9C,MAAM,EAAG,MAAM,CAAC;IAEhB,0DAA0D;IAE1D,KAAK,EAAG,MAAM,CAAC;IAEf,qDAAqD;IAErD,MAAM,EAAG,MAAM,CAAC;IAEhB,qBAAqB;IAErB,aAAa,EAAG,MAAM,CAAC;IAEvB,+CAA+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AAE,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,0DAA0D;IAE1D,mBAAmB,CAAC,EAAE,aAAa,GAAG,UAAU,CAAC;IAEjD,yDAAyD;IAEzD,kBAAkB,EAAG,OAAO,CAAC;IAE7B,uCAAuC;IAEvC,SAAS,EAAG,MAAM,CAAC;IAGnB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -35,6 +35,8 @@ let LogIntegrationInbound = class LogIntegrationInbound {
35
35
  status;
36
36
  /** Motivo do status (mensagem curta) */
37
37
  statusReason;
38
+ /** Quantidade de tentativas realizadas até o sucesso ou falha definitiva */
39
+ retries;
38
40
  /** Cabeçalhos enviados ao destino após sanitização */
39
41
  headers;
40
42
  /** Envelope da requisição */
@@ -45,8 +47,6 @@ let LogIntegrationInbound = class LogIntegrationInbound {
45
47
  transformedPayload;
46
48
  /** Payload após enriquecimento de regras do BRE */
47
49
  enrichedPayload;
48
- /** Quantidade de tentativas realizadas até o sucesso ou falha definitiva */
49
- retries;
50
50
  /** Mensagem completa do erro */
51
51
  errorMessage;
52
52
  /** Stack completo quando disponível (mantido para investigações) */
@@ -99,6 +99,9 @@ __decorate([
99
99
  __decorate([
100
100
  Column({ type: 'varchar', length: 255, nullable: true })
101
101
  ], LogIntegrationInbound.prototype, "statusReason", void 0);
102
+ __decorate([
103
+ Column({ type: 'int', nullable: true })
104
+ ], LogIntegrationInbound.prototype, "retries", void 0);
102
105
  __decorate([
103
106
  Column({ type: 'text', nullable: true })
104
107
  ], LogIntegrationInbound.prototype, "headers", void 0);
@@ -114,9 +117,6 @@ __decorate([
114
117
  __decorate([
115
118
  Column({ type: 'text', nullable: true })
116
119
  ], LogIntegrationInbound.prototype, "enrichedPayload", void 0);
117
- __decorate([
118
- Column({ type: 'int', nullable: true })
119
- ], LogIntegrationInbound.prototype, "retries", void 0);
120
120
  __decorate([
121
121
  Column({ type: 'text', nullable: true })
122
122
  ], LogIntegrationInbound.prototype, "errorMessage", void 0);
@@ -124,7 +124,7 @@ __decorate([
124
124
  Column({ type: 'text', nullable: true })
125
125
  ], LogIntegrationInbound.prototype, "errorStack", void 0);
126
126
  __decorate([
127
- Column({ type: 'varchar', length: 20, nullable: true })
127
+ Column({ type: 'varchar', length: 11, nullable: true })
128
128
  ], LogIntegrationInbound.prototype, "errorClassification", void 0);
129
129
  __decorate([
130
130
  Column({ type: 'boolean', default: false })
@@ -1,8 +1,7 @@
1
- import { IntegrationStatus, TransportProtocol } from '../enum/integration.enums.js';
1
+ import { IntegrationStatus } from "../enum/integration.enums.js";
2
2
  /**
3
- * Entidade de diagnóstico de latência.
4
- * Armazena informações sobre a latência de operações, incluindo timestamps de início e fim,
5
- * além do ID de correlação para rastreamento.
3
+ * Mantém o histórico de chamadas de integração de entrada (inbound).
4
+ * Armazena o request e response para auditoria e troubleshooting.
6
5
  */
7
6
  export declare class LogIntegrationOutbound {
8
7
  id: string;
@@ -12,56 +11,45 @@ export declare class LogIntegrationOutbound {
12
11
  event: string;
13
12
  /** Ação (e.g., 'create', 'update', 'delete', etc) */
14
13
  action: string;
14
+ /** Correlation Id */
15
15
  correlationId: string;
16
- /** Timestamp de início da requisição */
17
- timestampStart: Date;
18
- /** Timestamp do último processamento ou da última tentativa */
19
- timestampLast?: Date | null;
16
+ /** Timestamp de início da requisição na API */
17
+ timestampStart?: Date | string;
18
+ /** Timestamp do início do processamento no ESB */
19
+ timestampProcess?: Date | null;
20
+ /** Timestamp final do processamento no ESB */
21
+ timestampEnd?: Date | null;
22
+ /** Duração total em milissegundos */
23
+ durationRequest?: number | null;
24
+ /** Duração do processamento em milissegundos no ESB */
25
+ durationProcessMs?: number | null;
20
26
  /** Duração total em milissegundos */
21
27
  durationMs?: number | null;
22
- /** Duração da última tentativa em milissegundos */
23
- durationLastMs?: number | null;
24
- /** Status final da operação */
28
+ /** Status final do processamento */
25
29
  status: IntegrationStatus;
30
+ /** Motivo do status (mensagem curta) */
26
31
  statusReason?: string | null;
27
- /** Transporte de saída: 'REST' | 'SOAP' | 'AMQP' | etc */
28
- transportProtocol: TransportProtocol;
29
- /** Método HTTP efetivamente disparado (GET/POST/PUT/...) */
30
- httpMethod?: string | null;
31
- /** Ação SOAP informada no envelope quando aplicável */
32
- soapAction?: string | null;
33
- /** URL final depois de aplicar templates, path params e query string */
34
- url?: string | null;
35
- /** Cabeçalhos enviados ao destino após sanitização */
36
- requestHeaders?: Record<string, string> | null;
37
- /** Query string resolvida (após merge com templates) */
38
- requestQuery?: Record<string, unknown> | null;
39
- /** Payload enviado na requisição */
40
- requestPayload?: string | null;
41
- /** Cabeçalhos recebidos da resposta */
42
- responseHeaders?: Record<string, string> | null;
43
- /** Payload recebido da resposta */
44
- responsePayload?: string;
45
- /** Código HTTP retornado pelo destino */
46
- httpStatusCode: number;
47
32
  /** Quantidade de tentativas realizadas até o sucesso ou falha definitiva */
48
33
  retries?: number | null;
49
- /** Categoria do erro técnico observado (ECONNRESET, TIMEOUT etc.) */
50
- errorType?: string | null;
51
- /** Mensagem de erro já sanitizada para suporte */
34
+ /** Cabeçalhos enviados ao destino após sanitização */
35
+ headers?: string | null;
36
+ /** Envelope da requisição */
37
+ envelope?: string | null;
38
+ /** Corpo sanitizado da requisição sem o envelope */
39
+ payload?: string | null;
40
+ /** Payload transformado em formato canônico após aplicação da transformação JSONata */
41
+ transformedPayload?: string | null;
42
+ /** Payload após enriquecimento de regras do BRE */
43
+ enrichedPayload?: string | null;
44
+ /** Mensagem completa do erro */
52
45
  errorMessage?: string | null;
53
- /** Stack completo quando disponível (mantido para investigações profundas) */
46
+ /** Stack completo quando disponível (mantido para investigações) */
54
47
  errorStack?: string | null;
55
48
  /** Classificação do erro para o mecanismo de DLQ/retry */
56
- errorClassification?: 'transient' | 'fatal' | 'business' | 'none';
49
+ errorClassification?: 'application' | 'business' | 'business_fatal' | 'application_fatal' | null;
57
50
  /** Indica se este log veio de um replay manual ou DLQ */
58
- wasReplayedFromDlq: boolean;
59
- /** Espaço para dados específicos do conector (OAuth, throttling, etc.) */
60
- metadata?: Record<string, any>;
61
- /** Identificador do registro outbound associado */
62
- outboundId: string;
63
- /** Identificador do endpoint utilizado */
64
- endpointId: string;
51
+ /** ID da tabela integration_inbound */
52
+ inboundId: string;
65
53
  createdAt: Date;
66
54
  updatedAt: Date;
67
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"log-integration-outbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/log-integration-outbound.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAGpF;;;;GAIG;AACH,qBAKa,sBAAsB;IAEjC,EAAE,EAAG,MAAM,CAAC;IAEZ,8CAA8C;IAE9C,MAAM,EAAG,MAAM,CAAC;IAEhB,0DAA0D;IAE1D,KAAK,EAAG,MAAM,CAAC;IAEf,qDAAqD;IAErD,MAAM,EAAG,MAAM,CAAC;IAGhB,aAAa,EAAG,MAAM,CAAC;IAEvB,wCAAwC;IAExC,cAAc,EAAG,IAAI,CAAC;IAEtB,+DAA+D;IAE/D,aAAa,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAE5B,qCAAqC;IAErC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,mDAAmD;IAEnD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,+BAA+B;IAE/B,MAAM,EAAG,iBAAiB,CAAC;IAG3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,0DAA0D;IAE1D,iBAAiB,EAAG,iBAAiB,CAAC;IAEtC,4DAA4D;IAE5D,UAAU,CAAC,EAAE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I,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,0DAA0D;IAE1D,mBAAmB,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,IAAI,CAAC;IAEjG,yDAAyD;IAIzD,uCAAuC;IAEvC,SAAS,EAAG,MAAM,CAAC;IAGnB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -4,70 +4,60 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
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
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
7
+ import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn, } from "typeorm";
8
8
  /**
9
- * Entidade de diagnóstico de latência.
10
- * Armazena informações sobre a latência de operações, incluindo timestamps de início e fim,
11
- * além do ID de correlação para rastreamento.
9
+ * Mantém o histórico de chamadas de integração de entrada (inbound).
10
+ * Armazena o request e response para auditoria e troubleshooting.
12
11
  */
13
12
  let LogIntegrationOutbound = class LogIntegrationOutbound {
14
- id;
13
+ id; // manter string no TS para bigint seguro
15
14
  /** Sistema de destino (e.g., 'erp', 'wms') */
16
15
  system;
17
16
  /** Evento (chave) (e.g., 'driver' or 'driver.created') */
18
17
  event;
19
18
  /** Ação (e.g., 'create', 'update', 'delete', etc) */
20
19
  action;
20
+ /** Correlation Id */
21
21
  correlationId;
22
- /** Timestamp de início da requisição */
22
+ /** Timestamp de início da requisição na API */
23
23
  timestampStart;
24
- /** Timestamp do último processamento ou da última tentativa */
25
- timestampLast;
24
+ /** Timestamp do início do processamento no ESB */
25
+ timestampProcess;
26
+ /** Timestamp final do processamento no ESB */
27
+ timestampEnd;
28
+ /** Duração total em milissegundos */
29
+ durationRequest;
30
+ /** Duração do processamento em milissegundos no ESB */
31
+ durationProcessMs;
26
32
  /** Duração total em milissegundos */
27
33
  durationMs;
28
- /** Duração da última tentativa em milissegundos */
29
- durationLastMs;
30
- /** Status final da operação */
34
+ /** Status final do processamento */
31
35
  status;
36
+ /** Motivo do status (mensagem curta) */
32
37
  statusReason;
33
- /** Transporte de saída: 'REST' | 'SOAP' | 'AMQP' | etc */
34
- transportProtocol;
35
- /** Método HTTP efetivamente disparado (GET/POST/PUT/...) */
36
- httpMethod;
37
- /** Ação SOAP informada no envelope quando aplicável */
38
- soapAction;
39
- /** URL final depois de aplicar templates, path params e query string */
40
- url;
41
- /** Cabeçalhos enviados ao destino após sanitização */
42
- requestHeaders;
43
- /** Query string resolvida (após merge com templates) */
44
- requestQuery;
45
- /** Payload enviado na requisição */
46
- requestPayload;
47
- /** Cabeçalhos recebidos da resposta */
48
- responseHeaders;
49
- /** Payload recebido da resposta */
50
- responsePayload;
51
- /** Código HTTP retornado pelo destino */
52
- httpStatusCode;
53
38
  /** Quantidade de tentativas realizadas até o sucesso ou falha definitiva */
54
39
  retries;
55
- /** Categoria do erro técnico observado (ECONNRESET, TIMEOUT etc.) */
56
- errorType;
57
- /** Mensagem de erro já sanitizada para suporte */
40
+ /** Cabeçalhos enviados ao destino após sanitização */
41
+ headers;
42
+ /** Envelope da requisição */
43
+ envelope;
44
+ /** Corpo sanitizado da requisição sem o envelope */
45
+ payload;
46
+ /** Payload transformado em formato canônico após aplicação da transformação JSONata */
47
+ transformedPayload;
48
+ /** Payload após enriquecimento de regras do BRE */
49
+ enrichedPayload;
50
+ /** Mensagem completa do erro */
58
51
  errorMessage;
59
- /** Stack completo quando disponível (mantido para investigações profundas) */
52
+ /** Stack completo quando disponível (mantido para investigações) */
60
53
  errorStack;
61
54
  /** Classificação do erro para o mecanismo de DLQ/retry */
62
55
  errorClassification;
63
56
  /** Indica se este log veio de um replay manual ou DLQ */
64
- wasReplayedFromDlq;
65
- /** Espaço para dados específicos do conector (OAuth, throttling, etc.) */
66
- metadata;
67
- /** Identificador do registro outbound associado */
68
- outboundId;
69
- /** Identificador do endpoint utilizado */
70
- endpointId;
57
+ // @Column({ type: 'boolean', default: false })
58
+ // wasReplayedFromDlq!: boolean;
59
+ /** ID da tabela integration_inbound */
60
+ inboundId; // manter string no TS para bigint seguro
71
61
  createdAt;
72
62
  updatedAt;
73
63
  };
@@ -87,59 +77,47 @@ __decorate([
87
77
  Column({ name: "correlation_id", type: "varchar", length: 36 })
88
78
  ], LogIntegrationOutbound.prototype, "correlationId", void 0);
89
79
  __decorate([
90
- Column({ name: "timestamp_start", type: "timestamptz" })
80
+ Column({ name: "timestamp_start", type: "timestamptz", nullable: true })
91
81
  ], LogIntegrationOutbound.prototype, "timestampStart", void 0);
92
82
  __decorate([
93
- Column({ name: "timestamp_last", type: "timestamptz", nullable: true })
94
- ], LogIntegrationOutbound.prototype, "timestampLast", void 0);
83
+ Column({ name: "timestamp_process", type: "timestamptz", nullable: true })
84
+ ], LogIntegrationOutbound.prototype, "timestampProcess", void 0);
85
+ __decorate([
86
+ Column({ name: "timestamp_end", type: "timestamptz", nullable: true })
87
+ ], LogIntegrationOutbound.prototype, "timestampEnd", void 0);
88
+ __decorate([
89
+ Column({ name: "duration_request_ms", type: "int", nullable: true })
90
+ ], LogIntegrationOutbound.prototype, "durationRequest", void 0);
91
+ __decorate([
92
+ Column({ name: "duration_process_ms", type: "int", nullable: true })
93
+ ], LogIntegrationOutbound.prototype, "durationProcessMs", void 0);
95
94
  __decorate([
96
95
  Column({ name: "duration_ms", type: "int", nullable: true })
97
96
  ], LogIntegrationOutbound.prototype, "durationMs", void 0);
98
97
  __decorate([
99
- Column({ name: "duration_last_ms", type: "int", nullable: true })
100
- ], LogIntegrationOutbound.prototype, "durationLastMs", void 0);
101
- __decorate([
102
- Column({ type: 'varchar', length: 10 })
98
+ Column({ type: 'varchar', length: 10, nullable: false })
103
99
  ], LogIntegrationOutbound.prototype, "status", void 0);
104
100
  __decorate([
105
101
  Column({ type: 'varchar', length: 255, nullable: true })
106
102
  ], LogIntegrationOutbound.prototype, "statusReason", void 0);
107
103
  __decorate([
108
- Column({ name: "transport_protocol", type: "varchar", length: 20 })
109
- ], LogIntegrationOutbound.prototype, "transportProtocol", void 0);
110
- __decorate([
111
- Column({ type: 'varchar', length: 10, nullable: true })
112
- ], LogIntegrationOutbound.prototype, "httpMethod", void 0);
113
- __decorate([
114
- Column({ type: 'varchar', length: 120, nullable: true })
115
- ], LogIntegrationOutbound.prototype, "soapAction", void 0);
104
+ Column({ type: 'int', nullable: true })
105
+ ], LogIntegrationOutbound.prototype, "retries", void 0);
116
106
  __decorate([
117
107
  Column({ type: 'text', nullable: true })
118
- ], LogIntegrationOutbound.prototype, "url", void 0);
119
- __decorate([
120
- Column({ type: 'json', nullable: true })
121
- ], LogIntegrationOutbound.prototype, "requestHeaders", void 0);
122
- __decorate([
123
- Column({ type: 'json', nullable: true })
124
- ], LogIntegrationOutbound.prototype, "requestQuery", void 0);
108
+ ], LogIntegrationOutbound.prototype, "headers", void 0);
125
109
  __decorate([
126
110
  Column({ type: 'text', nullable: true })
127
- ], LogIntegrationOutbound.prototype, "requestPayload", void 0);
128
- __decorate([
129
- Column({ type: 'json', nullable: true })
130
- ], LogIntegrationOutbound.prototype, "responseHeaders", void 0);
131
- __decorate([
132
- Column({ type: 'text' })
133
- ], LogIntegrationOutbound.prototype, "responsePayload", void 0);
111
+ ], LogIntegrationOutbound.prototype, "envelope", void 0);
134
112
  __decorate([
135
- Column({ type: 'int', nullable: true })
136
- ], LogIntegrationOutbound.prototype, "httpStatusCode", void 0);
113
+ Column({ type: 'text', nullable: true })
114
+ ], LogIntegrationOutbound.prototype, "payload", void 0);
137
115
  __decorate([
138
- Column({ type: 'int', nullable: true })
139
- ], LogIntegrationOutbound.prototype, "retries", void 0);
116
+ Column({ type: 'text', nullable: true })
117
+ ], LogIntegrationOutbound.prototype, "transformedPayload", void 0);
140
118
  __decorate([
141
- Column({ type: 'varchar', length: 120, nullable: true })
142
- ], LogIntegrationOutbound.prototype, "errorType", void 0);
119
+ Column({ type: 'text', nullable: true })
120
+ ], LogIntegrationOutbound.prototype, "enrichedPayload", void 0);
143
121
  __decorate([
144
122
  Column({ type: 'text', nullable: true })
145
123
  ], LogIntegrationOutbound.prototype, "errorMessage", void 0);
@@ -147,20 +125,11 @@ __decorate([
147
125
  Column({ type: 'text', nullable: true })
148
126
  ], LogIntegrationOutbound.prototype, "errorStack", void 0);
149
127
  __decorate([
150
- Column({ type: 'varchar', length: 20, nullable: true })
128
+ Column({ type: 'varchar', length: 11, nullable: true })
151
129
  ], LogIntegrationOutbound.prototype, "errorClassification", void 0);
152
130
  __decorate([
153
- Column({ type: 'boolean', default: false })
154
- ], LogIntegrationOutbound.prototype, "wasReplayedFromDlq", void 0);
155
- __decorate([
156
- Column({ type: 'json', nullable: true, default: () => "'{}'" })
157
- ], LogIntegrationOutbound.prototype, "metadata", void 0);
158
- __decorate([
159
- Column({ type: 'bigint' })
160
- ], LogIntegrationOutbound.prototype, "outboundId", void 0);
161
- __decorate([
162
- Column({ type: 'bigint' })
163
- ], LogIntegrationOutbound.prototype, "endpointId", void 0);
131
+ Column({ type: 'bigint', nullable: true })
132
+ ], LogIntegrationOutbound.prototype, "inboundId", void 0);
164
133
  __decorate([
165
134
  CreateDateColumn({ name: "created_at", type: "timestamptz" })
166
135
  ], LogIntegrationOutbound.prototype, "createdAt", void 0);
@@ -168,9 +137,10 @@ __decorate([
168
137
  UpdateDateColumn({ name: "updated_at", type: "timestamptz" })
169
138
  ], LogIntegrationOutbound.prototype, "updatedAt", void 0);
170
139
  LogIntegrationOutbound = __decorate([
171
- Entity({ name: 'log_integration_outbound' }),
140
+ Entity({ name: "log_integration_inbound" }),
141
+ Index(["id"], { unique: true }),
142
+ Index(["correlationId"], { unique: true }),
172
143
  Index(["system", "event", "action"]),
173
- Index(["correlationId"]),
174
144
  Index(["status", "updatedAt"]),
175
145
  Index(["system", "event", "updatedAt"])
176
146
  ], LogIntegrationOutbound);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/types",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "description": "TypeScript types e interfaces comuns para projetos Cargolift CDI",
5
5
  "keywords": [
6
6
  "typescript",