@cargolift-cdi/types 0.1.16 → 0.1.18

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.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Eventos de integração (tms.driver) - Ocorre na integração de entrada (inbound) antes do roteamento.
3
+ * Define expressões JSONata para transformar mensagens de eventos externos em formato JSON canônico interno.
4
+ * Também armazena configurações de regras global (BRE) associadas ao evento.
5
+ */
6
+ export declare class IntegrationInbound {
7
+ id: string;
8
+ /** Sistema de origem (e.g., 'erp') */
9
+ system: string;
10
+ /** Evento (e.g., 'driver') */
11
+ event: string;
12
+ /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
13
+ version: number;
14
+ /** Descrição opcional amigável ao usuário */
15
+ description?: string | null;
16
+ /** Pré-validação do payload de origem */
17
+ validation: Record<string, any>;
18
+ /** Expressão JSONata */
19
+ transformation: string;
20
+ /** Regra global (BRE RulesConfiguration) */
21
+ rules: Record<string, any>;
22
+ /**Se a rota está ativa */
23
+ active: boolean;
24
+ /** Opções adicionais (reservado para uso futuro) */
25
+ options?: Record<string, any> | null;
26
+ createdAt: Date;
27
+ updatedAt: Date;
28
+ }
29
+ //# sourceMappingURL=integration-inbound.entity.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Outbound routing definition per source key. One row per target (e.g., WMS, TMS).
3
+ */
4
+ export declare class IntegrationOutbound {
5
+ id: string;
6
+ /** Sistema de origem (e.g., 'tms') */
7
+ system: string;
8
+ /** Sistema de destino (e.g., 'erp', 'wms') */
9
+ targetSystem: string;
10
+ /** Evento (chave) (e.g., 'driver' or 'driver.created') */
11
+ event: string;
12
+ /** Versão da rota. Apenas a última versão pode estar ativa. Versões anteriores não podem sofrer modificações */
13
+ version: number;
14
+ /** Descrição */
15
+ description?: string | null;
16
+ /** Regras (BRE RulesConfiguration) */
17
+ rules: Record<string, any>;
18
+ /** Se a rota está ativa */
19
+ active: boolean;
20
+ /** Opções adicionais de roteamento (reservado para uso futuro) */
21
+ options?: Record<string, any> | null;
22
+ createdAt: Date;
23
+ updatedAt: Date;
24
+ }
25
+ //# sourceMappingURL=integration-outbound.entity.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,9 @@
1
+ export declare class IntegrationSystem {
2
+ /** Identificador único do sistema de integração */
3
+ id: string;
4
+ /** Nome do sistema de integração (e.g., 'erp', 'tms') */
5
+ system: string;
6
+ /** Se o sistema está ativo */
7
+ active: boolean;
8
+ }
9
+ //# sourceMappingURL=integration-system.entity.d.ts.map
@@ -0,0 +1 @@
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"}
package/dist/index.d.ts CHANGED
@@ -6,4 +6,7 @@ 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';
9
12
  //# 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"}
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"}
@@ -1,4 +1,4 @@
1
- import type envelopeContextInterface = require("./context-message.interface.js");
1
+ import type contextMessage = require("./context-message.interface.js");
2
2
  /**
3
3
  * Envelope (metadados) da mensagem publicada.
4
4
  */
@@ -9,9 +9,9 @@ export interface EnvelopeMessage {
9
9
  action?: string;
10
10
  method?: string;
11
11
  record_id?: string;
12
- source?: envelopeContextInterface.ContextSource;
13
12
  timestamp?: string;
14
- error?: envelopeContextInterface.ContextError;
13
+ source?: contextMessage.ContextSource;
14
+ error?: contextMessage.ContextError;
15
15
  extraData?: {
16
16
  [key: string]: any;
17
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rabbitmq-envelope-message.d.ts","sourceRoot":"","sources":["../src/rabbitmq-envelope-message.ts"],"names":[],"mappings":"AAAA,YAAY,wBAAwB,GAAG,QAAQ,gCAAgC,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,wBAAwB,CAAC,aAAa,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,wBAAwB,CAAC,YAAY,CAAC;IAC9C,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACpC"}
1
+ {"version":3,"file":"rabbitmq-envelope-message.d.ts","sourceRoot":"","sources":["../src/rabbitmq-envelope-message.ts"],"names":[],"mappings":"AAAA,YAAY,cAAc,GAAG,QAAQ,gCAAgC,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC;IACtC,KAAK,CAAC,EAAE,cAAc,CAAC,YAAY,CAAC;IACpC,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cargolift-cdi/types",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "TypeScript types e interfaces comuns para projetos Cargolift CDI",
5
5
  "keywords": [
6
6
  "typescript",
@@ -42,5 +42,8 @@
42
42
  "devDependencies": {
43
43
  "@types/node": "^24.3.1",
44
44
  "typescript": "^5.6.2"
45
+ },
46
+ "dependencies": {
47
+ "typeorm": "^0.3.27"
45
48
  }
46
49
  }