flit-modulo-exportacoes 2.0.61 → 2.0.63

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,7 @@
1
+ import { ElasticBase } from './elastic-base';
2
+ import { SourceDepartamento } from './model/departamento-model';
3
+ import { SearchHit } from '@elastic/elasticsearch/lib/api/types';
4
+ export declare class DepartamentosElastic extends ElasticBase<SourceDepartamento> {
5
+ private internalGetDepartamentosElastic;
6
+ getDepartamentosElastic(contaId: string): Promise<Array<SearchHit<SourceDepartamento>>>;
7
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DepartamentosElastic = void 0;
4
+ const elastic_base_1 = require("./elastic-base");
5
+ const departamento_model_1 = require("./model/departamento-model");
6
+ class DepartamentosElastic extends elastic_base_1.ElasticBase {
7
+ async internalGetDepartamentosElastic(contaId) {
8
+ return await this.elasticClient.search({
9
+ scroll: '1m',
10
+ sort: [{
11
+ data: 'asc'
12
+ }],
13
+ index: 'contas_departamentos',
14
+ size: this.totalRegistrosFiltradosElastic,
15
+ _source: Object.keys(new departamento_model_1.SourceDepartamento({})),
16
+ query: {
17
+ bool: {
18
+ must: [{
19
+ match: {
20
+ excluido: false
21
+ }
22
+ }, {
23
+ match: {
24
+ i_parent_id: contaId
25
+ }
26
+ }]
27
+ }
28
+ }
29
+ });
30
+ }
31
+ async getDepartamentosElastic(contaId) {
32
+ return await this.retornaTodosDadosPaginacaoElastic(await this.internalGetDepartamentosElastic(contaId));
33
+ }
34
+ }
35
+ exports.DepartamentosElastic = DepartamentosElastic;
@@ -0,0 +1,6 @@
1
+ import { DadosIntegracao } from './general-models';
2
+ export declare class SourceDepartamento {
3
+ i_id: string;
4
+ integracao: DadosIntegracao;
5
+ constructor(departamento: Partial<SourceDepartamento>);
6
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SourceDepartamento = void 0;
4
+ class SourceDepartamento {
5
+ i_id;
6
+ integracao;
7
+ constructor(departamento) {
8
+ this.i_id = departamento.i_id;
9
+ this.integracao = departamento.integracao;
10
+ }
11
+ }
12
+ exports.SourceDepartamento = SourceDepartamento;
@@ -110,7 +110,17 @@ export interface PayloadExportacaoAlterdata extends PayloadExportacaoPadrao {
110
110
  forma_exportacao_alterdata?: EnumFormaExportacaoAlterdata;
111
111
  }
112
112
  /**
113
- * Interface do modelo do payload das funções de exportação.
113
+ * Interface do modelo do payload da função de envio dos movimentos do Flit para o eContador.
114
+ *
115
+ * @interface PayloadEnvioEventosEContador
116
+ */
117
+ export interface PayloadEnvioEventosEContador {
118
+ empresa_id: string;
119
+ token_api_econtador: string;
120
+ movimentacoes: Array<MovimentoEnvioEContador>;
121
+ }
122
+ /**
123
+ * Interface do modelo dos dados de exportação da empresa.
114
124
  *
115
125
  * @interface DadosEmpresaExportacao
116
126
  */
@@ -3,6 +3,9 @@ export declare class SourceUsuario {
3
3
  pis: string;
4
4
  cpf: string;
5
5
  i_id: string;
6
+ departamento_ref?: {
7
+ i_id: string;
8
+ };
6
9
  parametros: {
7
10
  codigo_externo: string;
8
11
  };
@@ -5,6 +5,7 @@ class SourceUsuario {
5
5
  pis;
6
6
  cpf;
7
7
  i_id;
8
+ departamento_ref;
8
9
  parametros;
9
10
  integracao;
10
11
  constructor(usuario) {
@@ -13,6 +14,7 @@ class SourceUsuario {
13
14
  this.i_id = usuario.i_id;
14
15
  this.parametros = usuario.parametros;
15
16
  this.integracao = usuario.integracao;
17
+ this.departamento_ref = usuario.departamento_ref;
16
18
  }
17
19
  }
18
20
  exports.SourceUsuario = SourceUsuario;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-modulo-exportacoes",
3
- "version": "2.0.61",
3
+ "version": "2.0.63",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": {