@cargolift-cdi/types 0.1.22 → 0.1.24

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.
Files changed (37) hide show
  1. package/dist/{entities → db/entities}/diagnostic-latency.entity.d.ts +3 -6
  2. package/dist/db/entities/diagnostic-latency.entity.d.ts.map +1 -0
  3. package/dist/{entities → db/entities}/diagnostic-latency.entity.js +12 -15
  4. package/dist/db/entities/integration-inbound.entity.d.ts.map +1 -0
  5. package/dist/db/entities/integration-outbound.entity.d.ts.map +1 -0
  6. package/dist/db/entities/integration-system.entity.d.ts.map +1 -0
  7. package/dist/db/repository/diagnostic-latency-repository.service.d.ts +19 -0
  8. package/dist/db/repository/diagnostic-latency-repository.service.d.ts.map +1 -0
  9. package/dist/db/repository/diagnostic-latency-repository.service.js +45 -0
  10. package/dist/{entities → db}/repository/integration-inbound-repository.service.d.ts +1 -1
  11. package/dist/db/repository/integration-inbound-repository.service.d.ts.map +1 -0
  12. package/dist/{entities → db}/repository/integration-inbound-repository.service.js +1 -1
  13. package/dist/{entities → db}/repository/integration-outbound-repository.service.d.ts +1 -1
  14. package/dist/db/repository/integration-outbound-repository.service.d.ts.map +1 -0
  15. package/dist/{entities → db}/repository/integration-outbound-repository.service.js +1 -1
  16. package/dist/index.d.ts +7 -7
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +8 -7
  19. package/package.json +1 -1
  20. package/dist/entities/diagnostic-latency.entity.d.ts.map +0 -1
  21. package/dist/entities/integration-inbound.entity.d.ts.map +0 -1
  22. package/dist/entities/integration-outbound.entity.d.ts.map +0 -1
  23. package/dist/entities/integration-system.entity.d.ts.map +0 -1
  24. package/dist/entities/repository/diagnostic-latency-repository.service.d.ts +0 -22
  25. package/dist/entities/repository/diagnostic-latency-repository.service.d.ts.map +0 -1
  26. package/dist/entities/repository/diagnostic-latency-repository.service.js +0 -75
  27. package/dist/entities/repository/integration-inbound-repository.entity.d.ts +0 -2
  28. package/dist/entities/repository/integration-inbound-repository.entity.d.ts.map +0 -1
  29. package/dist/entities/repository/integration-inbound-repository.entity.js +0 -1
  30. package/dist/entities/repository/integration-inbound-repository.service.d.ts.map +0 -1
  31. package/dist/entities/repository/integration-outbound-repository.service.d.ts.map +0 -1
  32. /package/dist/{entities → db/entities}/integration-inbound.entity.d.ts +0 -0
  33. /package/dist/{entities → db/entities}/integration-inbound.entity.js +0 -0
  34. /package/dist/{entities → db/entities}/integration-outbound.entity.d.ts +0 -0
  35. /package/dist/{entities → db/entities}/integration-outbound.entity.js +0 -0
  36. /package/dist/{entities → db/entities}/integration-system.entity.d.ts +0 -0
  37. /package/dist/{entities → db/entities}/integration-system.entity.js +0 -0
@@ -5,12 +5,9 @@
5
5
  */
6
6
  export declare class DiagnosticLatency {
7
7
  id: string;
8
- hit: number;
9
- /**
10
- * Histórico de ocorrências. Mantido como array JSON (jsonb) para facilitar append.
11
- */
12
- log: any[];
8
+ correlationId: string;
13
9
  timestamp_start: Date;
14
- timestamp_last: Date;
10
+ timestamp_end: Date;
11
+ latencyMs: number;
15
12
  }
16
13
  //# sourceMappingURL=diagnostic-latency.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-latency.entity.d.ts","sourceRoot":"","sources":["../../../src/db/entities/diagnostic-latency.entity.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBACa,iBAAiB;IAE5B,EAAE,EAAG,MAAM,CAAC;IAGZ,aAAa,EAAG,MAAM,CAAC;IAGvB,eAAe,EAAG,IAAI,CAAC;IAGvB,aAAa,EAAG,IAAI,CAAC;IAGrB,SAAS,EAAG,MAAM,CAAC;CACpB"}
@@ -12,29 +12,26 @@ import { Column, Entity, PrimaryColumn } from 'typeorm';
12
12
  */
13
13
  let DiagnosticLatency = class DiagnosticLatency {
14
14
  id;
15
- hit;
16
- /**
17
- * Histórico de ocorrências. Mantido como array JSON (jsonb) para facilitar append.
18
- */
19
- log;
15
+ correlationId;
20
16
  timestamp_start;
21
- timestamp_last;
17
+ timestamp_end;
18
+ latencyMs;
22
19
  };
23
20
  __decorate([
24
- PrimaryColumn({ type: 'varchar', length: 80 })
21
+ PrimaryColumn({ type: 'varchar', length: 36 })
25
22
  ], DiagnosticLatency.prototype, "id", void 0);
26
23
  __decorate([
27
- Column({ type: 'int', default: 1 })
28
- ], DiagnosticLatency.prototype, "hit", void 0);
24
+ Column({ type: 'int', default: 0 })
25
+ ], DiagnosticLatency.prototype, "correlationId", void 0);
29
26
  __decorate([
30
- Column({ type: 'jsonb', nullable: true, default: () => "'[]'::jsonb" })
31
- ], DiagnosticLatency.prototype, "log", void 0);
32
- __decorate([
33
- Column({ type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' })
27
+ Column({ type: 'timestamptz' })
34
28
  ], DiagnosticLatency.prototype, "timestamp_start", void 0);
35
29
  __decorate([
36
- Column({ type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' })
37
- ], DiagnosticLatency.prototype, "timestamp_last", void 0);
30
+ Column({ type: 'timestamptz' })
31
+ ], DiagnosticLatency.prototype, "timestamp_end", void 0);
32
+ __decorate([
33
+ Column({ type: 'int', default: 0 })
34
+ ], DiagnosticLatency.prototype, "latencyMs", void 0);
38
35
  DiagnosticLatency = __decorate([
39
36
  Entity({ name: 'diagnostic_latency' })
40
37
  ], DiagnosticLatency);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-inbound.entity.d.ts","sourceRoot":"","sources":["../../../src/db/entities/integration-inbound.entity.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qBAEa,kBAAkB;IAE7B,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,8BAA8B;IAE9B,KAAK,EAAG,MAAM,CAAC;IAEf,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,0CAA0C;IAE1C,UAAU,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC,yBAAyB;IAEzB,cAAc,EAAG,MAAM,CAAC;IAExB,4CAA4C;IAE5C,KAAK,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B,0BAA0B;IAE1B,MAAM,EAAG,OAAO,CAAC;IAEjB,oDAAoD;IAEpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAGrC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-outbound.entity.d.ts","sourceRoot":"","sources":["../../../src/db/entities/integration-outbound.entity.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,qBAEa,mBAAmB;IAE9B,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,8CAA8C;IAE9C,YAAY,EAAG,MAAM,CAAC;IAEtB,0DAA0D;IAE1D,KAAK,EAAG,MAAM,CAAC;IAEf,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,gBAAgB;IAEhB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,sCAAsC;IAEtC,KAAK,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B,2BAA2B;IAE3B,MAAM,EAAG,OAAO,CAAC;IAEjB,kEAAkE;IAElE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAGrC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-system.entity.d.ts","sourceRoot":"","sources":["../../../src/db/entities/integration-system.entity.ts"],"names":[],"mappings":"AAEA,qBACa,iBAAiB;IAC5B,mDAAmD;IAEnD,EAAE,EAAG,MAAM,CAAC;IAEZ,yDAAyD;IAGzD,MAAM,EAAG,MAAM,CAAC;IAEhB,8BAA8B;IAE9B,MAAM,EAAG,OAAO,CAAC;CAClB"}
@@ -0,0 +1,19 @@
1
+ import { Repository } from 'typeorm';
2
+ import { DiagnosticLatency } from '../entities/diagnostic-latency.entity.js';
3
+ /**
4
+ * Repositório de diagnóstico de latência.
5
+ * Responsável por criar/atualizar registros de latência associados a um id.
6
+ */
7
+ export declare class DiagnosticLatencyRepositoryService {
8
+ private readonly repo;
9
+ constructor(repo: Repository<DiagnosticLatency>);
10
+ /**
11
+ * Cria um novo registro de latência.
12
+ * @param id
13
+ * @param correlation_id
14
+ * @param timestamp_start
15
+ * @returns
16
+ */
17
+ create(id: string, correlation_id: string, timestamp_start: Date): Promise<DiagnosticLatency>;
18
+ }
19
+ //# sourceMappingURL=diagnostic-latency-repository.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-latency-repository.service.d.ts","sourceRoot":"","sources":["../../../src/db/repository/diagnostic-latency-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;;GAGG;AACH,qBACa,kCAAkC;IAG3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAGtD;;;;;;OAMG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAiBpG"}
@@ -0,0 +1,45 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
8
+ return function (target, key) { decorator(target, key, paramIndex); }
9
+ };
10
+ import { Injectable } from '@nestjs/common';
11
+ import { InjectRepository } from '@nestjs/typeorm';
12
+ import { DiagnosticLatency } from '../entities/diagnostic-latency.entity.js';
13
+ /**
14
+ * Repositório de diagnóstico de latência.
15
+ * Responsável por criar/atualizar registros de latência associados a um id.
16
+ */
17
+ let DiagnosticLatencyRepositoryService = class DiagnosticLatencyRepositoryService {
18
+ repo;
19
+ constructor(repo) {
20
+ this.repo = repo;
21
+ }
22
+ /**
23
+ * Cria um novo registro de latência.
24
+ * @param id
25
+ * @param correlation_id
26
+ * @param timestamp_start
27
+ * @returns
28
+ */
29
+ async create(id, correlation_id, timestamp_start) {
30
+ const now = new Date();
31
+ const entity = this.repo.create({
32
+ id,
33
+ correlationId: correlation_id,
34
+ timestamp_start,
35
+ timestamp_end: now,
36
+ latencyMs: now.getTime() - timestamp_start.getTime(),
37
+ });
38
+ return this.repo.save(entity);
39
+ }
40
+ };
41
+ DiagnosticLatencyRepositoryService = __decorate([
42
+ Injectable(),
43
+ __param(0, InjectRepository(DiagnosticLatency))
44
+ ], DiagnosticLatencyRepositoryService);
45
+ export { DiagnosticLatencyRepositoryService };
@@ -1,5 +1,5 @@
1
1
  import { Repository } from "typeorm";
2
- import { IntegrationInbound } from "../integration-inbound.entity.js";
2
+ 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>);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-inbound-repository.service.d.ts","sourceRoot":"","sources":["../../../src/db/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,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA+C7E"}
@@ -9,7 +9,7 @@ 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 { IntegrationInbound } from "../integration-inbound.entity.js";
12
+ import { IntegrationInbound } from "../entities/integration-inbound.entity.js";
13
13
  let InboundRepositoryService = class InboundRepositoryService {
14
14
  repo;
15
15
  constructor(repo) {
@@ -1,5 +1,5 @@
1
1
  import { Repository } from 'typeorm';
2
- import { IntegrationOutbound } from '../integration-outbound.entity.js';
2
+ import { IntegrationOutbound } from '../entities/integration-outbound.entity.js';
3
3
  export declare class OutboundRepositoryService {
4
4
  private readonly repo;
5
5
  constructor(repo: Repository<IntegrationOutbound>);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration-outbound-repository.service.d.ts","sourceRoot":"","sources":["../../../src/db/repository/integration-outbound-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAGjF,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAGlD,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAG/E"}
@@ -9,7 +9,7 @@ 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 { IntegrationOutbound } from '../integration-outbound.entity.js';
12
+ import { IntegrationOutbound } from '../entities/integration-outbound.entity.js';
13
13
  let OutboundRepositoryService = class OutboundRepositoryService {
14
14
  repo;
15
15
  constructor(repo) {
package/dist/index.d.ts CHANGED
@@ -6,11 +6,11 @@ export * from './rabbitmq.interfaces.js';
6
6
  export * from './rabbitmq-envelope-message.js';
7
7
  export * from './context-message.interface.js';
8
8
  export * from './publish-meta.interface.js';
9
- export * from './entities/integration-system.entity.js';
10
- export * from './entities/integration-inbound.entity.js';
11
- export * from './entities/integration-outbound.entity.js';
12
- export * from './entities/repository/integration-inbound-repository.service.js';
13
- export * from './entities/repository/integration-outbound-repository.service.js';
14
- export * from './entities/diagnostic-latency.entity.js';
15
- export * from './entities/repository/diagnostic-latency-repository.service.js';
9
+ export * from './db/entities/integration-system.entity.js';
10
+ export * from './db/entities/integration-inbound.entity.js';
11
+ export * from './db/entities/integration-outbound.entity.js';
12
+ export * from './db/entities/diagnostic-latency.entity.js';
13
+ export * from './db/repository/integration-inbound-repository.service.js';
14
+ export * from './db/repository/integration-outbound-repository.service.js';
15
+ export * from './db/repository/diagnostic-latency-repository.service.js';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iEAAiE,CAAC;AAChF,cAAc,kEAAkE,CAAC;AACjF,cAAc,yCAAyC,CAAC;AACxD,cAAc,gEAAgE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAG5C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,4DAA4D,CAAC;AAC3E,cAAc,0DAA0D,CAAC"}
package/dist/index.js CHANGED
@@ -6,10 +6,11 @@ export * from './rabbitmq.interfaces.js';
6
6
  export * from './rabbitmq-envelope-message.js';
7
7
  export * from './context-message.interface.js';
8
8
  export * from './publish-meta.interface.js';
9
- export * from './entities/integration-system.entity.js';
10
- export * from './entities/integration-inbound.entity.js';
11
- export * from './entities/integration-outbound.entity.js';
12
- export * from './entities/repository/integration-inbound-repository.service.js';
13
- export * from './entities/repository/integration-outbound-repository.service.js';
14
- export * from './entities/diagnostic-latency.entity.js';
15
- export * from './entities/repository/diagnostic-latency-repository.service.js';
9
+ // Entidades e repositórios TypeORM
10
+ export * from './db/entities/integration-system.entity.js';
11
+ export * from './db/entities/integration-inbound.entity.js';
12
+ export * from './db/entities/integration-outbound.entity.js';
13
+ export * from './db/entities/diagnostic-latency.entity.js';
14
+ export * from './db/repository/integration-inbound-repository.service.js';
15
+ export * from './db/repository/integration-outbound-repository.service.js';
16
+ export * from './db/repository/diagnostic-latency-repository.service.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/types",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "description": "TypeScript types e interfaces comuns para projetos Cargolift CDI",
5
5
  "keywords": [
6
6
  "typescript",
@@ -1 +0,0 @@
1
- {"version":3,"file":"diagnostic-latency.entity.d.ts","sourceRoot":"","sources":["../../src/entities/diagnostic-latency.entity.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,qBACa,iBAAiB;IAE5B,EAAE,EAAG,MAAM,CAAC;IAGZ,GAAG,EAAG,MAAM,CAAC;IAEb;;OAEG;IAEH,GAAG,EAAG,GAAG,EAAE,CAAC;IAGZ,eAAe,EAAG,IAAI,CAAC;IAGvB,cAAc,EAAG,IAAI,CAAC;CACvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration-inbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-inbound.entity.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,qBAEa,kBAAkB;IAE7B,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,8BAA8B;IAE9B,KAAK,EAAG,MAAM,CAAC;IAEf,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,6CAA6C;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,0CAA0C;IAE1C,UAAU,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEjC,yBAAyB;IAEzB,cAAc,EAAG,MAAM,CAAC;IAExB,4CAA4C;IAE5C,KAAK,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B,0BAA0B;IAE1B,MAAM,EAAG,OAAO,CAAC;IAEjB,oDAAoD;IAEpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAGrC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration-outbound.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-outbound.entity.ts"],"names":[],"mappings":"AASA;;GAEG;AACH,qBAEa,mBAAmB;IAE9B,EAAE,EAAG,MAAM,CAAC;IAEZ,sCAAsC;IAEtC,MAAM,EAAG,MAAM,CAAC;IAEhB,8CAA8C;IAE9C,YAAY,EAAG,MAAM,CAAC;IAEtB,0DAA0D;IAE1D,KAAK,EAAG,MAAM,CAAC;IAEf,gHAAgH;IAEhH,OAAO,EAAG,MAAM,CAAC;IAEjB,gBAAgB;IAEhB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,sCAAsC;IAEtC,KAAK,EAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE5B,2BAA2B;IAE3B,MAAM,EAAG,OAAO,CAAC;IAEjB,kEAAkE;IAElE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAGrC,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,IAAI,CAAC;CAClB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration-system.entity.d.ts","sourceRoot":"","sources":["../../src/entities/integration-system.entity.ts"],"names":[],"mappings":"AAEA,qBACa,iBAAiB;IAC5B,mDAAmD;IAEnD,EAAE,EAAG,MAAM,CAAC;IAEZ,yDAAyD;IAGzD,MAAM,EAAG,MAAM,CAAC;IAEhB,8BAA8B;IAE9B,MAAM,EAAG,OAAO,CAAC;CAClB"}
@@ -1,22 +0,0 @@
1
- import { Repository } from 'typeorm';
2
- import { DiagnosticLatency } from '../diagnostic-latency.entity.js';
3
- /**
4
- * Repositório de diagnóstico de latência.
5
- * Responsável por criar/atualizar registros de latência associados a um id.
6
- */
7
- export declare class DiagnosticLatencyRepositoryService {
8
- private readonly repo;
9
- constructor(repo: Repository<DiagnosticLatency>);
10
- /**
11
- * Upsert de latência: cria se não existir, senão incrementa hit e atualiza timestamp_last.
12
- * Opcionalmente adiciona entrada no histórico (log).
13
- * @param id Identificador único do fluxo / teste.
14
- * @param logEntry Objeto livre para compor histórico.
15
- */
16
- upsert(id: string, logEntry?: Record<string, any>): Promise<DiagnosticLatency>;
17
- /** Recupera registro pelo id. */
18
- get(id: string): Promise<DiagnosticLatency | null>;
19
- /** Reinicia os contadores e histórico para o id informado. */
20
- reset(id: string): Promise<DiagnosticLatency>;
21
- }
22
- //# sourceMappingURL=diagnostic-latency-repository.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diagnostic-latency-repository.service.d.ts","sourceRoot":"","sources":["../../../src/entities/repository/diagnostic-latency-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE;;;GAGG;AACH,qBACa,kCAAkC;IAG3C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAGtD;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAwBpF,iCAAiC;IAC3B,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAIxD,8DAA8D;IACxD,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAapD"}
@@ -1,75 +0,0 @@
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
- var __param = (this && this.__param) || function (paramIndex, decorator) {
8
- return function (target, key) { decorator(target, key, paramIndex); }
9
- };
10
- import { Injectable } from '@nestjs/common';
11
- import { InjectRepository } from '@nestjs/typeorm';
12
- import { DiagnosticLatency } from '../diagnostic-latency.entity.js';
13
- /**
14
- * Repositório de diagnóstico de latência.
15
- * Responsável por criar/atualizar registros de latência associados a um id.
16
- */
17
- let DiagnosticLatencyRepositoryService = class DiagnosticLatencyRepositoryService {
18
- repo;
19
- constructor(repo) {
20
- this.repo = repo;
21
- }
22
- /**
23
- * Upsert de latência: cria se não existir, senão incrementa hit e atualiza timestamp_last.
24
- * Opcionalmente adiciona entrada no histórico (log).
25
- * @param id Identificador único do fluxo / teste.
26
- * @param logEntry Objeto livre para compor histórico.
27
- */
28
- async upsert(id, logEntry) {
29
- let entity = await this.repo.findOne({ where: { id } });
30
- const now = new Date();
31
- if (entity) {
32
- entity.hit = (entity.hit || 0) + 1;
33
- entity.timestamp_last = now;
34
- if (logEntry) {
35
- if (!Array.isArray(entity.log))
36
- entity.log = [];
37
- entity.log.push(logEntry);
38
- }
39
- }
40
- else {
41
- entity = this.repo.create({
42
- id,
43
- hit: 1,
44
- log: logEntry ? [logEntry] : [],
45
- timestamp_start: now,
46
- timestamp_last: now,
47
- });
48
- }
49
- return this.repo.save(entity);
50
- }
51
- /** Recupera registro pelo id. */
52
- async get(id) {
53
- return this.repo.findOne({ where: { id } });
54
- }
55
- /** Reinicia os contadores e histórico para o id informado. */
56
- async reset(id) {
57
- let entity = await this.repo.findOne({ where: { id } });
58
- const now = new Date();
59
- if (entity) {
60
- entity.hit = 0;
61
- entity.log = [];
62
- entity.timestamp_start = now;
63
- entity.timestamp_last = now;
64
- }
65
- else {
66
- entity = this.repo.create({ id, hit: 0, log: [], timestamp_start: now, timestamp_last: now });
67
- }
68
- return this.repo.save(entity);
69
- }
70
- };
71
- DiagnosticLatencyRepositoryService = __decorate([
72
- Injectable(),
73
- __param(0, InjectRepository(DiagnosticLatency))
74
- ], DiagnosticLatencyRepositoryService);
75
- export { DiagnosticLatencyRepositoryService };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=integration-inbound-repository.entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration-inbound-repository.entity.d.ts","sourceRoot":"","sources":["../../../src/entities/repository/integration-inbound-repository.entity.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration-inbound-repository.service.d.ts","sourceRoot":"","sources":["../../../src/entities/repository/integration-inbound-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAGtE,qBACa,wBAAwB;IAGjC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAGjD,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA+C7E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"integration-outbound-repository.service.d.ts","sourceRoot":"","sources":["../../../src/entities/repository/integration-outbound-repository.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAGxE,qBACa,yBAAyB;IAGlC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU,CAAC,mBAAmB,CAAC;IAGlD,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAG/E"}