flit-modulo-exportacoes 2.0.68 → 2.0.69

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.
@@ -4,4 +4,8 @@ import { SourceTipoMovimentoEContador } from './model/tipo-movimento-econtador-m
4
4
  export declare class TiposMovimentosEContadorElastic extends ElasticBase<SourceTipoMovimentoEContador> {
5
5
  private internalGetTiposMovimentosEContadorElastic;
6
6
  getTiposMovimentosEContadorElastic(contaId: string): Promise<Array<SearchHit<SourceTipoMovimentoEContador>>>;
7
+ getTipoMovimentoEContadorElastic({ contaId, tipoMovimentoEContadorId }: {
8
+ contaId: string;
9
+ tipoMovimentoEContadorId: string;
10
+ }): Promise<SearchHit<SourceTipoMovimentoEContador> | null>;
7
11
  }
@@ -31,5 +31,30 @@ class TiposMovimentosEContadorElastic extends elastic_base_1.ElasticBase {
31
31
  async getTiposMovimentosEContadorElastic(contaId) {
32
32
  return await this.retornaTodosDadosPaginacaoElastic(await this.internalGetTiposMovimentosEContadorElastic(contaId));
33
33
  }
34
+ async getTipoMovimentoEContadorElastic({ contaId, tipoMovimentoEContadorId }) {
35
+ const tipoMovimentoEContador = await this.elasticClient.search({
36
+ size: 1,
37
+ index: 'contas_tiposmovimentosecontador',
38
+ query: {
39
+ bool: {
40
+ must: [{
41
+ match: {
42
+ excluido: false
43
+ }
44
+ }, {
45
+ match: {
46
+ i_parent_id: contaId
47
+ }
48
+ }, {
49
+ match: {
50
+ i_id: tipoMovimentoEContadorId
51
+ }
52
+ }]
53
+ }
54
+ },
55
+ _source: Object.keys(new tipo_movimento_econtador_model_1.SourceTipoMovimentoEContador({}))
56
+ });
57
+ return tipoMovimentoEContador?.hits?.hits?.length > 0 ? tipoMovimentoEContador?.hits?.hits[0] : null;
58
+ }
34
59
  }
35
60
  exports.TiposMovimentosEContadorElastic = TiposMovimentosEContadorElastic;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flit-modulo-exportacoes",
3
- "version": "2.0.68",
3
+ "version": "2.0.69",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "directories": {