flit-modulo-exportacoes 2.0.58 → 2.0.60

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.
@@ -1,7 +1,8 @@
1
+ import { TipoEventoExportacao } from './general-models';
1
2
  export declare class SourceEventosExportacao {
2
3
  forma_envio_faltas: string;
3
4
  eventos: {
4
- [key: string]: string;
5
+ [key in TipoEventoExportacao]: string;
5
6
  };
6
7
  constructor(eventoExportacao: Partial<SourceEventosExportacao>);
7
8
  }
@@ -106,7 +106,8 @@ export declare enum EnumFormaExportacaoAlterdata {
106
106
  * @interface PayloadExportacaoAlterdata
107
107
  */
108
108
  export interface PayloadExportacaoAlterdata extends PayloadExportacaoPadrao {
109
- forma_exportacao_alterdata: EnumFormaExportacaoAlterdata;
109
+ tipo_movimento_econtador_id?: string;
110
+ forma_exportacao_alterdata?: EnumFormaExportacaoAlterdata;
110
111
  }
111
112
  /**
112
113
  * Interface do modelo do payload das funções de exportação.
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare function calcularValoresExportacao({ contaId, dataFinal, dataInic
17
17
  jornadas: Array<SearchHit<SourceJornada>>;
18
18
  eventosExportacao: Array<TipoEventoExportacao>;
19
19
  parametrosIntegracao: {
20
- [key: string]: string;
20
+ [key in TipoEventoExportacao]: string;
21
21
  };
22
22
  }): Promise<ValoresEventosExportacao>;
23
23
  export declare function retornaValorEvento(tipoEvento: TipoEventoExportacao, valoresEventos: ValoresEventosExportacao): ValorEventoExportacao | ValorEventoExportacaoFalta;
package/dist/index.js CHANGED
@@ -172,10 +172,7 @@ function aplicarFatorConversaoValoresEventos(valoresEventos) {
172
172
  };
173
173
  }
174
174
  function exportarHorasExtrasEvento({ tipoEventoExportacao, eventosExportacao, parametrosIntegracao }) {
175
- if ((parametrosIntegracao ?? {})[tipoEventoExportacao]) {
176
- return eventosExportacao.includes(tipoEventoExportacao);
177
- }
178
- return false;
175
+ return Boolean((parametrosIntegracao ?? {})[tipoEventoExportacao]) && eventosExportacao.includes(tipoEventoExportacao);
179
176
  }
180
177
  async function calcularValoresExportacao({ contaId, dataFinal, dataInicial, elasticClient, empresas, jornadas, eventosExportacao, parametrosIntegracao }) {
181
178
  const feriados = await new feriados_elastic_1.FeriadosElastic(elasticClient).getFeriadosElastic({
@@ -1,10 +1,12 @@
1
- import { ValoresEventosExportacao } from './dao/model/general-models';
1
+ import { TipoEventoExportacao, ValoresEventosExportacao } from './dao/model/general-models';
2
2
  export declare class UnificacaoEventosRepetidos {
3
3
  private adicionarEvento;
4
4
  private agruparArray;
5
5
  private processarValoresCodigosRepetidos;
6
- unificarEventosComCodigosRepetidos({ parametrosIntegracao, valoresEventos }: {
7
- parametrosIntegracao: any;
6
+ unificarEventosComCodigosRepetidos({ valoresEventos, parametrosIntegracao }: {
8
7
  valoresEventos: ValoresEventosExportacao;
8
+ parametrosIntegracao: {
9
+ [key in TipoEventoExportacao]: string;
10
+ };
9
11
  }): void;
10
12
  }
@@ -18,7 +18,7 @@ class UnificacaoEventosRepetidos {
18
18
  [item[campo]]: [...(acc[item[campo]] ?? []), item]
19
19
  }), {});
20
20
  }
21
- processarValoresCodigosRepetidos({ valoresEventos, eventosAgrupados }) {
21
+ processarValoresCodigosRepetidos({ eventosAgrupados, valoresEventos }) {
22
22
  let somatorioHoras = 0;
23
23
  let somatorioMinutos = 0;
24
24
  for (let index = 0; index < eventosAgrupados.length; index++) {
@@ -308,7 +308,7 @@ class UnificacaoEventosRepetidos {
308
308
  break;
309
309
  }
310
310
  }
311
- unificarEventosComCodigosRepetidos({ parametrosIntegracao, valoresEventos }) {
311
+ unificarEventosComCodigosRepetidos({ valoresEventos, parametrosIntegracao }) {
312
312
  const codigosEventos = new Array();
313
313
  for (const tipoEvento of Object.values(Object.freeze(general_models_1.TipoEventoExportacao))) {
314
314
  this.adicionarEvento({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-modulo-exportacoes",
3
- "version": "2.0.58",
3
+ "version": "2.0.60",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": {