sigo-package 1.2.138 → 1.2.139
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/index.d.mts +26 -4
- package/dist/index.d.ts +26 -4
- package/dist/index.js +50 -2
- package/dist/index.mjs +49 -2
- package/package.json +6 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, CodigoNombreDTO } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, CodigoNombreDTO, SystemOptionEntity } from 'sigo-entities';
|
|
3
|
+
import { ClassConstructor } from 'class-transformer';
|
|
3
4
|
|
|
4
5
|
interface IenvSIGO$1 {
|
|
5
6
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -479,7 +480,7 @@ interface Funcion {
|
|
|
479
480
|
(ManoObra: any, Reserva: any, StockPersonal: any[], ResumenPreLiquidado: ResumenLiquidacionesTypeChile): void;
|
|
480
481
|
}
|
|
481
482
|
|
|
482
|
-
interface IParams {
|
|
483
|
+
interface IParams$1 {
|
|
483
484
|
manoObra: ManoObraENTITY;
|
|
484
485
|
trabajos: TrabajoENTITY[];
|
|
485
486
|
obra: ObraChile9512ENTITY;
|
|
@@ -489,7 +490,7 @@ interface IParams {
|
|
|
489
490
|
interface IenvSIGO {
|
|
490
491
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
491
492
|
}
|
|
492
|
-
declare const ActualizarDataTrabajos: ({ manoObra, trabajos, obra, ContratoOT, envSIGO }: IParams) => void;
|
|
493
|
+
declare const ActualizarDataTrabajos: ({ manoObra, trabajos, obra, ContratoOT, envSIGO }: IParams$1) => void;
|
|
493
494
|
|
|
494
495
|
declare enum EstadoEspecialidad9612 {
|
|
495
496
|
ACTIVO = "ACTIVO",
|
|
@@ -786,4 +787,25 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
786
787
|
|
|
787
788
|
declare const parseDuplicateKeyError: (message: string) => string | null;
|
|
788
789
|
|
|
789
|
-
|
|
790
|
+
interface RouteDetails {
|
|
791
|
+
args?: string[];
|
|
792
|
+
route: string;
|
|
793
|
+
}
|
|
794
|
+
interface RouteInfo {
|
|
795
|
+
controller: string;
|
|
796
|
+
endpoints: RouteDetails[];
|
|
797
|
+
}
|
|
798
|
+
interface IParams {
|
|
799
|
+
rootPath: string;
|
|
800
|
+
prefix: string;
|
|
801
|
+
dataDB: SystemOptionEntity[];
|
|
802
|
+
rawData: RouteInfo[];
|
|
803
|
+
UnprocessableEntityException: ClassConstructor<Error>;
|
|
804
|
+
root?: boolean;
|
|
805
|
+
}
|
|
806
|
+
declare function builSystemOption(params: IParams): Promise<{
|
|
807
|
+
_ids: string[];
|
|
808
|
+
newData: SystemOptionEntity[];
|
|
809
|
+
}>;
|
|
810
|
+
|
|
811
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, validateNoLookup };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as sigo_entities from 'sigo-entities';
|
|
2
|
-
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, CodigoNombreDTO } from 'sigo-entities';
|
|
2
|
+
import { ManoObraENTITY, ReservaENTITY, ItemDetalleLogisticaDTO, CodigoNombreUMDTO, PrecioContratistaMOAL04ENTITY, ManoObraGlobalENTITY, ValorizacionManoObraDTO, PrecioContratistaMOAL02ENTITY, HomePassDTO, FlujoDocDTO, NodoDocDTO, DocumentacionPEXENTITY, PrecioEspecialidadENTITY, ObraChile9512ENTITY, TrabajoAlemaniaENTITY, ValorizacionAlemaniaDTO, ValorizacionDTO, StockPersonalENTITY, StockAlmacenENTITY, ConsumoMaterialAlemaniaENTITY, ValorizacionesDTO, PrecioContratistaMaterialENTITY, TrabajoENTITY, ActividadesDTO, PreciosVigentesDTO, ContratoOTENTITY, DetalleChileValorizacionMODTO, PrecioMaterialENTITY, CodigoNombreDTO, SystemOptionEntity } from 'sigo-entities';
|
|
3
|
+
import { ClassConstructor } from 'class-transformer';
|
|
3
4
|
|
|
4
5
|
interface IenvSIGO$1 {
|
|
5
6
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
@@ -479,7 +480,7 @@ interface Funcion {
|
|
|
479
480
|
(ManoObra: any, Reserva: any, StockPersonal: any[], ResumenPreLiquidado: ResumenLiquidacionesTypeChile): void;
|
|
480
481
|
}
|
|
481
482
|
|
|
482
|
-
interface IParams {
|
|
483
|
+
interface IParams$1 {
|
|
483
484
|
manoObra: ManoObraENTITY;
|
|
484
485
|
trabajos: TrabajoENTITY[];
|
|
485
486
|
obra: ObraChile9512ENTITY;
|
|
@@ -489,7 +490,7 @@ interface IParams {
|
|
|
489
490
|
interface IenvSIGO {
|
|
490
491
|
SISTEMAS_VALORIZACION_MANO_OBRA: string[];
|
|
491
492
|
}
|
|
492
|
-
declare const ActualizarDataTrabajos: ({ manoObra, trabajos, obra, ContratoOT, envSIGO }: IParams) => void;
|
|
493
|
+
declare const ActualizarDataTrabajos: ({ manoObra, trabajos, obra, ContratoOT, envSIGO }: IParams$1) => void;
|
|
493
494
|
|
|
494
495
|
declare enum EstadoEspecialidad9612 {
|
|
495
496
|
ACTIVO = "ACTIVO",
|
|
@@ -786,4 +787,25 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
786
787
|
|
|
787
788
|
declare const parseDuplicateKeyError: (message: string) => string | null;
|
|
788
789
|
|
|
789
|
-
|
|
790
|
+
interface RouteDetails {
|
|
791
|
+
args?: string[];
|
|
792
|
+
route: string;
|
|
793
|
+
}
|
|
794
|
+
interface RouteInfo {
|
|
795
|
+
controller: string;
|
|
796
|
+
endpoints: RouteDetails[];
|
|
797
|
+
}
|
|
798
|
+
interface IParams {
|
|
799
|
+
rootPath: string;
|
|
800
|
+
prefix: string;
|
|
801
|
+
dataDB: SystemOptionEntity[];
|
|
802
|
+
rawData: RouteInfo[];
|
|
803
|
+
UnprocessableEntityException: ClassConstructor<Error>;
|
|
804
|
+
root?: boolean;
|
|
805
|
+
}
|
|
806
|
+
declare function builSystemOption(params: IParams): Promise<{
|
|
807
|
+
_ids: string[];
|
|
808
|
+
newData: SystemOptionEntity[];
|
|
809
|
+
}>;
|
|
810
|
+
|
|
811
|
+
export { ActualizarDataManoObra, ActualizarDataReserva, ActualizarDataResumenLiquidaciones, ActualizarDataResumenLiquidacionesColombia, ActualizarDataResumenValorizacionesAlemania, ActualizarDataTrabajos, AsignacionHelper, BuscarZonaContratista, CalcularResumenHPMOLiquidado, CalcularResumenLiquidaciones, CalcularResumenLiquidacionesColombia, CalcularResumenValorizacionesAlemania, CodigosMaterialDuctosAL02, CodigosMaterialDuctosAL04, CodigosMaterialSoplado, CodsMapeoMOMaterial, CodsMapeoMOMaterialNVT01, CodsMapeoMOMaterialSopladoClientes, CodsMapeoMOMaterialSopladoTroncal, CodsMapeoMO_Material_Arquertas, CompararFechas, CurrencyFormat, DocumentacionReplanteo, EstadoEspecialidad9612, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, MOCantidadNVT01, MOHijasAL04, MOHijasDEPTH, MapeoEspecialidades9612, MapeoMOBOMAL04, MapeoMatBOMAL04, type MatRetiradosType, type MatStockAlmacenType, type MatStockPersonalType$2 as MatStockPersonalType, type MatUtilizadosType$2 as MatUtilizadosType, type MoUoType$2 as MoUoType, ModelDataFlujosDocumentacionReplanteo, ObtenerMONoReservada, ObtenerPrecioContratistaVigente, ObtenerZonaAsignada, type ResumenLiquidacionesType, type ResumenLiquidacionesTypeChile, type ResumenLiquidacionesTypeColombia, SEGMENT_TY, type TARGET, UpdateNodosDocDP, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildReservaMOJobMajorProjectsAlemaniaAL02, buildReservaMOJobMajorProjectsAlemaniaAL04, buildTenantCollectionName, calcularTotalMaterialValorizacionPeru9112, checkAndBuildMaterialsFromStock, checkMaterialAvailability, codBalizaAL04, codClientes, codIssueByPeriodoAL02, codMOClientesAL02, codMOClientesAL02Asfaltado, codMOClientesAL02OC, codMOClientesAL02Soplado, codMOClientes_ReglaLiquidacion1, codMODROPAL04, codMODROPAL04OC, codMODROPAL04Soplado, codMOFTTFAL04, codMONoClientesAL02, codMONoClientesAL02Asfaltado, codMONoClientesAL02OC, codMONoClientesAL02Soplado, codMONoClientes_ReglaLiquidacion1, codMOOcultosAL04, codMOPublico, codMOTroncalAL02, codMOTroncalAL02Asfaltado, codMOTroncalAL02OC, codMOTroncalAL02Soplado, codMOTroncalAL04, codMOTroncalAL04Asfaltado, codMOTroncalAL04Issue, codMOTroncalAL04OC, codMOTroncalAL04Soplado, codMOTroncalHistoricoAL02, codMOTroncal_ReglaLiquidacion1, codNoCliente, codSopladoRD, codigosMOT1_F2, codigosMaterialDuctos, codigosMaterialUGG, collections, consumirStockPersonal, convertDates, dataFlujosHomePass, db_default, db_root, empresas, esCadenaFechaISOValida, esObjetoFecha, formatCurrencyV1, formatNumberSmart, formatNumberV1, formatPercentageV1, generateUniqueNumber, generateUniqueNumberArray, getChannelName, getContainerName, getDBName, getDateInTimeZone, getKeyRedisSortedSet, getModelDataAdicional, getNextID_Amap, getNextID_AsignacionValorizacion, getNextID_Valorizacion, getPrecioContratista, getPriceMaterial, getQueueName, getQueueNameSaveOneNotification, hashCode, isValidDate, isValidPartialEntity, logTiempoProceso, mapaDPContratoPrecioFullAL02, mapaEstadoObraFaseAL02, mapaMOMaterialAL02, mapaMOMaterialAL04, mapaReglaSopladoClientes, mapaReglaSopladoTroncal, mapeoZonasSimilares, newCodMOTroncalReglaLiquidacion1, obtenerDocumentacionClientes, obtenerDocumentacionNoClientes, obtenerPrecioContratistaMaterial, obtenerPrecioManoObraAL02, obtenerPrecioManoObraAL04, obtenerTipoYCodigoMO, paisMap, parseDuplicateKeyError, roundNumber, searchCurrentContractorSpecialtyPrice, setColModels, setContext, updatePriceContractorMOAL02, updatePriceContractorMOAL04, updatePriceMOAL02, updatePriceMOAL04, updatePricePBBudgetAlemaniaAL02, updatePricePBBudgetAlemaniaAL04, validateNoLookup };
|
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
SEGMENT_TY: () => SEGMENT_TY,
|
|
63
63
|
UpdateNodosDocDP: () => UpdateNodosDocDP,
|
|
64
64
|
ValorizacionHelper: () => ValorizacionHelper,
|
|
65
|
+
builSystemOption: () => builSystemOption,
|
|
65
66
|
buildDataMOFromMaterialRules: () => buildDataMOFromMaterialRules,
|
|
66
67
|
buildDataMaterialsRule: () => buildDataMaterialsRule,
|
|
67
68
|
buildKeyMO: () => buildKeyMO,
|
|
@@ -15800,11 +15801,11 @@ function obtenerPrecioContratistaMaterial(Codigo, priceContractorMaterial) {
|
|
|
15800
15801
|
__name(obtenerPrecioContratistaMaterial, "obtenerPrecioContratistaMaterial");
|
|
15801
15802
|
|
|
15802
15803
|
// src/Programados/Colombia/9612/MapaEspecialidadesColombia.ts
|
|
15803
|
-
var EstadoEspecialidad9612 = /* @__PURE__ */ function(EstadoEspecialidad96122) {
|
|
15804
|
+
var EstadoEspecialidad9612 = /* @__PURE__ */ (function(EstadoEspecialidad96122) {
|
|
15804
15805
|
EstadoEspecialidad96122["ACTIVO"] = "ACTIVO";
|
|
15805
15806
|
EstadoEspecialidad96122["INACTIVO"] = "INACTIVO";
|
|
15806
15807
|
return EstadoEspecialidad96122;
|
|
15807
|
-
}({});
|
|
15808
|
+
})({});
|
|
15808
15809
|
var MapeoEspecialidades9612 = [
|
|
15809
15810
|
{
|
|
15810
15811
|
OldSpecialty: "Gastos Reembolsables",
|
|
@@ -16847,6 +16848,52 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16847
16848
|
if (formattedFields.length === 0) return null;
|
|
16848
16849
|
return `Duplicado en ${formattedFields.join(", ")}`;
|
|
16849
16850
|
}, "parseDuplicateKeyError");
|
|
16851
|
+
|
|
16852
|
+
// src/v2/utils/buildSystemOption.ts
|
|
16853
|
+
var import_sigo_entities6 = require("sigo-entities");
|
|
16854
|
+
function separarPalabras(texto) {
|
|
16855
|
+
return texto.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2");
|
|
16856
|
+
}
|
|
16857
|
+
__name(separarPalabras, "separarPalabras");
|
|
16858
|
+
async function builSystemOption(params) {
|
|
16859
|
+
const { rootPath, prefix, dataDB, rawData, UnprocessableEntityException, root = false } = params;
|
|
16860
|
+
const dataDBSet = new Set(dataDB.map((e) => e.key));
|
|
16861
|
+
const mapaLocal = /* @__PURE__ */ new Set();
|
|
16862
|
+
const newData = [];
|
|
16863
|
+
for (const raw of rawData) {
|
|
16864
|
+
for (const endpoint of raw.endpoints) {
|
|
16865
|
+
const [method, pathParts] = endpoint.route.split(" ");
|
|
16866
|
+
const partsRoute = `${prefix}${pathParts}`.split("/");
|
|
16867
|
+
for (const [i, element] of partsRoute.entries()) {
|
|
16868
|
+
const father = partsRoute.slice(0, i).join("");
|
|
16869
|
+
const isLast = i === partsRoute.length - 1;
|
|
16870
|
+
const key = `${partsRoute.slice(0, i + 1).join("")}${isLast ? method : ""}`;
|
|
16871
|
+
if (mapaLocal.has(key)) continue;
|
|
16872
|
+
mapaLocal.add(key);
|
|
16873
|
+
if (!dataDBSet.has(key)) {
|
|
16874
|
+
const _newEntity = {
|
|
16875
|
+
father,
|
|
16876
|
+
name: separarPalabras(element),
|
|
16877
|
+
prefix,
|
|
16878
|
+
root,
|
|
16879
|
+
key,
|
|
16880
|
+
method: isLast ? method : "",
|
|
16881
|
+
route: isLast ? `${method} ${rootPath}${pathParts}` : "",
|
|
16882
|
+
_id: crypto.randomUUID()
|
|
16883
|
+
};
|
|
16884
|
+
const newItem = await (0, import_sigo_entities6.validateCustom)(_newEntity, import_sigo_entities6.SystemOptionEntity, UnprocessableEntityException);
|
|
16885
|
+
newData.push(newItem);
|
|
16886
|
+
}
|
|
16887
|
+
}
|
|
16888
|
+
}
|
|
16889
|
+
}
|
|
16890
|
+
const _ids = dataDB.filter((e) => !mapaLocal.has(e.key)).map((e) => e._id);
|
|
16891
|
+
return {
|
|
16892
|
+
_ids,
|
|
16893
|
+
newData
|
|
16894
|
+
};
|
|
16895
|
+
}
|
|
16896
|
+
__name(builSystemOption, "builSystemOption");
|
|
16850
16897
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16851
16898
|
0 && (module.exports = {
|
|
16852
16899
|
ActualizarDataManoObra,
|
|
@@ -16888,6 +16935,7 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16888
16935
|
SEGMENT_TY,
|
|
16889
16936
|
UpdateNodosDocDP,
|
|
16890
16937
|
ValorizacionHelper,
|
|
16938
|
+
builSystemOption,
|
|
16891
16939
|
buildDataMOFromMaterialRules,
|
|
16892
16940
|
buildDataMaterialsRule,
|
|
16893
16941
|
buildKeyMO,
|
package/dist/index.mjs
CHANGED
|
@@ -15635,11 +15635,11 @@ function obtenerPrecioContratistaMaterial(Codigo, priceContractorMaterial) {
|
|
|
15635
15635
|
__name(obtenerPrecioContratistaMaterial, "obtenerPrecioContratistaMaterial");
|
|
15636
15636
|
|
|
15637
15637
|
// src/Programados/Colombia/9612/MapaEspecialidadesColombia.ts
|
|
15638
|
-
var EstadoEspecialidad9612 = /* @__PURE__ */ function(EstadoEspecialidad96122) {
|
|
15638
|
+
var EstadoEspecialidad9612 = /* @__PURE__ */ (function(EstadoEspecialidad96122) {
|
|
15639
15639
|
EstadoEspecialidad96122["ACTIVO"] = "ACTIVO";
|
|
15640
15640
|
EstadoEspecialidad96122["INACTIVO"] = "INACTIVO";
|
|
15641
15641
|
return EstadoEspecialidad96122;
|
|
15642
|
-
}({});
|
|
15642
|
+
})({});
|
|
15643
15643
|
var MapeoEspecialidades9612 = [
|
|
15644
15644
|
{
|
|
15645
15645
|
OldSpecialty: "Gastos Reembolsables",
|
|
@@ -16682,6 +16682,52 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16682
16682
|
if (formattedFields.length === 0) return null;
|
|
16683
16683
|
return `Duplicado en ${formattedFields.join(", ")}`;
|
|
16684
16684
|
}, "parseDuplicateKeyError");
|
|
16685
|
+
|
|
16686
|
+
// src/v2/utils/buildSystemOption.ts
|
|
16687
|
+
import { SystemOptionEntity, validateCustom } from "sigo-entities";
|
|
16688
|
+
function separarPalabras(texto) {
|
|
16689
|
+
return texto.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2");
|
|
16690
|
+
}
|
|
16691
|
+
__name(separarPalabras, "separarPalabras");
|
|
16692
|
+
async function builSystemOption(params) {
|
|
16693
|
+
const { rootPath, prefix, dataDB, rawData, UnprocessableEntityException, root = false } = params;
|
|
16694
|
+
const dataDBSet = new Set(dataDB.map((e) => e.key));
|
|
16695
|
+
const mapaLocal = /* @__PURE__ */ new Set();
|
|
16696
|
+
const newData = [];
|
|
16697
|
+
for (const raw of rawData) {
|
|
16698
|
+
for (const endpoint of raw.endpoints) {
|
|
16699
|
+
const [method, pathParts] = endpoint.route.split(" ");
|
|
16700
|
+
const partsRoute = `${prefix}${pathParts}`.split("/");
|
|
16701
|
+
for (const [i, element] of partsRoute.entries()) {
|
|
16702
|
+
const father = partsRoute.slice(0, i).join("");
|
|
16703
|
+
const isLast = i === partsRoute.length - 1;
|
|
16704
|
+
const key = `${partsRoute.slice(0, i + 1).join("")}${isLast ? method : ""}`;
|
|
16705
|
+
if (mapaLocal.has(key)) continue;
|
|
16706
|
+
mapaLocal.add(key);
|
|
16707
|
+
if (!dataDBSet.has(key)) {
|
|
16708
|
+
const _newEntity = {
|
|
16709
|
+
father,
|
|
16710
|
+
name: separarPalabras(element),
|
|
16711
|
+
prefix,
|
|
16712
|
+
root,
|
|
16713
|
+
key,
|
|
16714
|
+
method: isLast ? method : "",
|
|
16715
|
+
route: isLast ? `${method} ${rootPath}${pathParts}` : "",
|
|
16716
|
+
_id: crypto.randomUUID()
|
|
16717
|
+
};
|
|
16718
|
+
const newItem = await validateCustom(_newEntity, SystemOptionEntity, UnprocessableEntityException);
|
|
16719
|
+
newData.push(newItem);
|
|
16720
|
+
}
|
|
16721
|
+
}
|
|
16722
|
+
}
|
|
16723
|
+
}
|
|
16724
|
+
const _ids = dataDB.filter((e) => !mapaLocal.has(e.key)).map((e) => e._id);
|
|
16725
|
+
return {
|
|
16726
|
+
_ids,
|
|
16727
|
+
newData
|
|
16728
|
+
};
|
|
16729
|
+
}
|
|
16730
|
+
__name(builSystemOption, "builSystemOption");
|
|
16685
16731
|
export {
|
|
16686
16732
|
ActualizarDataManoObra,
|
|
16687
16733
|
ActualizarDataReserva,
|
|
@@ -16722,6 +16768,7 @@ export {
|
|
|
16722
16768
|
SEGMENT_TY,
|
|
16723
16769
|
UpdateNodosDocDP,
|
|
16724
16770
|
ValorizacionHelper,
|
|
16771
|
+
builSystemOption,
|
|
16725
16772
|
buildDataMOFromMaterialRules,
|
|
16726
16773
|
buildDataMaterialsRule,
|
|
16727
16774
|
buildKeyMO,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigo-package",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.139",
|
|
4
4
|
"description": "Funciones compartidas sigo",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -17,10 +17,13 @@
|
|
|
17
17
|
"@types/express": "^5.0.1",
|
|
18
18
|
"@types/webpack-env": "^1.18.8",
|
|
19
19
|
"tsc-alias": "^1.8.15",
|
|
20
|
-
"tsup": "^8.
|
|
20
|
+
"tsup": "^8.5.1",
|
|
21
21
|
"typescript": "^5.7.3"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"sigo-entities": "^1.2.
|
|
24
|
+
"sigo-entities": "^1.2.383"
|
|
25
|
+
},
|
|
26
|
+
"overrides": {
|
|
27
|
+
"esbuild": "^0.28.0"
|
|
25
28
|
}
|
|
26
29
|
}
|