@credithub/harlan-components 1.81.5 → 1.81.6
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/components/dossie/generativeAi/dataUtils.js +15 -0
- package/lib/cjs/index.js +27 -12
- package/lib/esm/index.js +27 -12
- package/package.json +1 -1
|
@@ -20,6 +20,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
24
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
|
+
if (ar || !(i in from)) {
|
|
26
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
27
|
+
ar[i] = from[i];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
|
+
};
|
|
23
32
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
24
33
|
import { normalizeName, similarNames } from '../../../utils/similarNames';
|
|
25
34
|
import { safeStringify } from './responseUtils';
|
|
@@ -91,6 +100,12 @@ export var selectRelevantData = function (data) {
|
|
|
91
100
|
var _a, _b, _c, _d, _e, _f;
|
|
92
101
|
var _g = data || {}, protestosDeCredito = _g.protestos, chequesSemFundo = _g.ccf, dividasPublicas = _g.dividasPublicas, contasBancarias = _g.bankAccounts, dadosDeChequesSemFundo = _g.ccfData, dividas = _g.divida, _h = _g.dossie, dossie = _h === void 0 ? {} : _h, liminar = _g.liminar, socios = _g.partners, dadosPessoasExpostasPoliticamente = _g.pepData, detalhesProcessosJuridicos = _g.processosJuridicosData, dadosReclameAqui = _g.reclameAqui, relatoriosRefinBoaVista = _g.refinBoaVista, relatoriosRefinSerasa = _g.refinSerasa, dadosScore = _g.scoreData, relatoriosSCR = _g.scr, registrosDeVeiculos = _g.veiculos, ResumoDosDados = _g.documentHistory;
|
|
93
102
|
var _j = ResumoDosDados !== null && ResumoDosDados !== void 0 ? ResumoDosDados : {}, _omit = _j.protestoLiminar, ResumoDosDadosSafe = __rest(_j, ["protestoLiminar"]);
|
|
103
|
+
if ((ResumoDosDadosSafe === null || ResumoDosDadosSafe === void 0 ? void 0 : ResumoDosDadosSafe.protestoHistory) &&
|
|
104
|
+
Array.isArray(ResumoDosDadosSafe.protestoHistory) &&
|
|
105
|
+
ResumoDosDadosSafe.protestoHistory.length) {
|
|
106
|
+
var latest = __spreadArray([], ResumoDosDadosSafe.protestoHistory, true).sort(function (a, b) { return new Date(b.data).getTime() - new Date(a.data).getTime(); })[0];
|
|
107
|
+
ResumoDosDadosSafe.protestoHistory = [latest];
|
|
108
|
+
}
|
|
94
109
|
var tipoPessoa = ((_b = (_a = dossie === null || dossie === void 0 ? void 0 : dossie.carousel) === null || _a === void 0 ? void 0 : _a.document) === null || _b === void 0 ? void 0 : _b.replace(/\D/g, '').length) === 11
|
|
95
110
|
? 'Pessoa Física'
|
|
96
111
|
: 'Pessoa Jurídica';
|