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.
- package/dist/dao/departamentos-elastic.d.ts +7 -0
- package/dist/dao/departamentos-elastic.js +35 -0
- package/dist/dao/model/departamento-model.d.ts +6 -0
- package/dist/dao/model/departamento-model.js +12 -0
- package/dist/dao/model/general-models.d.ts +11 -1
- package/dist/dao/model/usuario-model.d.ts +3 -0
- package/dist/dao/model/usuario-model.js +2 -0
- package/package.json +1 -1
|
@@ -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,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
|
|
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
|
*/
|
|
@@ -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;
|