sigo-package 1.2.138 → 1.2.140
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 +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +55 -2
- package/dist/index.mjs +53 -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",
|
|
@@ -779,6 +780,8 @@ declare const collections: Readonly<{
|
|
|
779
780
|
declare const db_root = "sigo_db";
|
|
780
781
|
declare const db_default = "default_db";
|
|
781
782
|
|
|
783
|
+
declare const uuidRegex: RegExp;
|
|
784
|
+
|
|
782
785
|
declare function getDBName({ pais, delegacion }: {
|
|
783
786
|
pais: CodigoNombreDTO;
|
|
784
787
|
delegacion: CodigoNombreDTO;
|
|
@@ -786,4 +789,25 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
786
789
|
|
|
787
790
|
declare const parseDuplicateKeyError: (message: string) => string | null;
|
|
788
791
|
|
|
789
|
-
|
|
792
|
+
interface RouteDetails {
|
|
793
|
+
args?: string[];
|
|
794
|
+
route: string;
|
|
795
|
+
}
|
|
796
|
+
interface RouteInfo {
|
|
797
|
+
controller: string;
|
|
798
|
+
endpoints: RouteDetails[];
|
|
799
|
+
}
|
|
800
|
+
interface IParams {
|
|
801
|
+
rootPath: string;
|
|
802
|
+
prefix: string;
|
|
803
|
+
dataDB: SystemOptionEntity[];
|
|
804
|
+
rawData: RouteInfo[];
|
|
805
|
+
UnprocessableEntityException: ClassConstructor<Error>;
|
|
806
|
+
root?: boolean;
|
|
807
|
+
}
|
|
808
|
+
declare function builSystemOption(params: IParams): Promise<{
|
|
809
|
+
_ids: string[];
|
|
810
|
+
newData: SystemOptionEntity[];
|
|
811
|
+
}>;
|
|
812
|
+
|
|
813
|
+
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, uuidRegex, 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",
|
|
@@ -779,6 +780,8 @@ declare const collections: Readonly<{
|
|
|
779
780
|
declare const db_root = "sigo_db";
|
|
780
781
|
declare const db_default = "default_db";
|
|
781
782
|
|
|
783
|
+
declare const uuidRegex: RegExp;
|
|
784
|
+
|
|
782
785
|
declare function getDBName({ pais, delegacion }: {
|
|
783
786
|
pais: CodigoNombreDTO;
|
|
784
787
|
delegacion: CodigoNombreDTO;
|
|
@@ -786,4 +789,25 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
786
789
|
|
|
787
790
|
declare const parseDuplicateKeyError: (message: string) => string | null;
|
|
788
791
|
|
|
789
|
-
|
|
792
|
+
interface RouteDetails {
|
|
793
|
+
args?: string[];
|
|
794
|
+
route: string;
|
|
795
|
+
}
|
|
796
|
+
interface RouteInfo {
|
|
797
|
+
controller: string;
|
|
798
|
+
endpoints: RouteDetails[];
|
|
799
|
+
}
|
|
800
|
+
interface IParams {
|
|
801
|
+
rootPath: string;
|
|
802
|
+
prefix: string;
|
|
803
|
+
dataDB: SystemOptionEntity[];
|
|
804
|
+
rawData: RouteInfo[];
|
|
805
|
+
UnprocessableEntityException: ClassConstructor<Error>;
|
|
806
|
+
root?: boolean;
|
|
807
|
+
}
|
|
808
|
+
declare function builSystemOption(params: IParams): Promise<{
|
|
809
|
+
_ids: string[];
|
|
810
|
+
newData: SystemOptionEntity[];
|
|
811
|
+
}>;
|
|
812
|
+
|
|
813
|
+
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, uuidRegex, 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,
|
|
@@ -164,6 +165,7 @@ __export(index_exports, {
|
|
|
164
165
|
updatePriceMOAL04: () => updatePriceMOAL04,
|
|
165
166
|
updatePricePBBudgetAlemaniaAL02: () => updatePricePBBudgetAlemaniaAL02,
|
|
166
167
|
updatePricePBBudgetAlemaniaAL04: () => updatePricePBBudgetAlemaniaAL04,
|
|
168
|
+
uuidRegex: () => uuidRegex,
|
|
167
169
|
validateNoLookup: () => validateNoLookup
|
|
168
170
|
});
|
|
169
171
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -15800,11 +15802,11 @@ function obtenerPrecioContratistaMaterial(Codigo, priceContractorMaterial) {
|
|
|
15800
15802
|
__name(obtenerPrecioContratistaMaterial, "obtenerPrecioContratistaMaterial");
|
|
15801
15803
|
|
|
15802
15804
|
// src/Programados/Colombia/9612/MapaEspecialidadesColombia.ts
|
|
15803
|
-
var EstadoEspecialidad9612 = /* @__PURE__ */ function(EstadoEspecialidad96122) {
|
|
15805
|
+
var EstadoEspecialidad9612 = /* @__PURE__ */ (function(EstadoEspecialidad96122) {
|
|
15804
15806
|
EstadoEspecialidad96122["ACTIVO"] = "ACTIVO";
|
|
15805
15807
|
EstadoEspecialidad96122["INACTIVO"] = "INACTIVO";
|
|
15806
15808
|
return EstadoEspecialidad96122;
|
|
15807
|
-
}({});
|
|
15809
|
+
})({});
|
|
15808
15810
|
var MapeoEspecialidades9612 = [
|
|
15809
15811
|
{
|
|
15810
15812
|
OldSpecialty: "Gastos Reembolsables",
|
|
@@ -16820,6 +16822,9 @@ var collections = Object.freeze({
|
|
|
16820
16822
|
var db_root = "sigo_db";
|
|
16821
16823
|
var db_default = "default_db";
|
|
16822
16824
|
|
|
16825
|
+
// src/v2/constants/regex.ts
|
|
16826
|
+
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
16827
|
+
|
|
16823
16828
|
// src/v2/utils/getDBName.ts
|
|
16824
16829
|
function getDBName({ pais, delegacion }) {
|
|
16825
16830
|
return `${process.env.NODE_ENV}.${pais.Codigo}_${delegacion.Codigo}_db`.toLowerCase();
|
|
@@ -16847,6 +16852,52 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16847
16852
|
if (formattedFields.length === 0) return null;
|
|
16848
16853
|
return `Duplicado en ${formattedFields.join(", ")}`;
|
|
16849
16854
|
}, "parseDuplicateKeyError");
|
|
16855
|
+
|
|
16856
|
+
// src/v2/utils/buildSystemOption.ts
|
|
16857
|
+
var import_sigo_entities6 = require("sigo-entities");
|
|
16858
|
+
function separarPalabras(texto) {
|
|
16859
|
+
return texto.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2");
|
|
16860
|
+
}
|
|
16861
|
+
__name(separarPalabras, "separarPalabras");
|
|
16862
|
+
async function builSystemOption(params) {
|
|
16863
|
+
const { rootPath, prefix, dataDB, rawData, UnprocessableEntityException, root = false } = params;
|
|
16864
|
+
const dataDBSet = new Set(dataDB.map((e) => e.key));
|
|
16865
|
+
const mapaLocal = /* @__PURE__ */ new Set();
|
|
16866
|
+
const newData = [];
|
|
16867
|
+
for (const raw of rawData) {
|
|
16868
|
+
for (const endpoint of raw.endpoints) {
|
|
16869
|
+
const [method, pathParts] = endpoint.route.split(" ");
|
|
16870
|
+
const partsRoute = `${prefix}${pathParts}`.split("/");
|
|
16871
|
+
for (const [i, element] of partsRoute.entries()) {
|
|
16872
|
+
const father = partsRoute.slice(0, i).join("");
|
|
16873
|
+
const isLast = i === partsRoute.length - 1;
|
|
16874
|
+
const key = `${partsRoute.slice(0, i + 1).join("")}${isLast ? method : ""}`;
|
|
16875
|
+
if (mapaLocal.has(key)) continue;
|
|
16876
|
+
mapaLocal.add(key);
|
|
16877
|
+
if (!dataDBSet.has(key)) {
|
|
16878
|
+
const _newEntity = {
|
|
16879
|
+
father,
|
|
16880
|
+
name: separarPalabras(element),
|
|
16881
|
+
prefix,
|
|
16882
|
+
root,
|
|
16883
|
+
key,
|
|
16884
|
+
method: isLast ? method : "",
|
|
16885
|
+
route: isLast ? `${method} ${rootPath}${pathParts}` : "",
|
|
16886
|
+
_id: crypto.randomUUID()
|
|
16887
|
+
};
|
|
16888
|
+
const newItem = await (0, import_sigo_entities6.validateCustom)(_newEntity, import_sigo_entities6.SystemOptionEntity, UnprocessableEntityException);
|
|
16889
|
+
newData.push(newItem);
|
|
16890
|
+
}
|
|
16891
|
+
}
|
|
16892
|
+
}
|
|
16893
|
+
}
|
|
16894
|
+
const _ids = dataDB.filter((e) => !mapaLocal.has(e.key)).map((e) => e._id);
|
|
16895
|
+
return {
|
|
16896
|
+
_ids,
|
|
16897
|
+
newData
|
|
16898
|
+
};
|
|
16899
|
+
}
|
|
16900
|
+
__name(builSystemOption, "builSystemOption");
|
|
16850
16901
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16851
16902
|
0 && (module.exports = {
|
|
16852
16903
|
ActualizarDataManoObra,
|
|
@@ -16888,6 +16939,7 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16888
16939
|
SEGMENT_TY,
|
|
16889
16940
|
UpdateNodosDocDP,
|
|
16890
16941
|
ValorizacionHelper,
|
|
16942
|
+
builSystemOption,
|
|
16891
16943
|
buildDataMOFromMaterialRules,
|
|
16892
16944
|
buildDataMaterialsRule,
|
|
16893
16945
|
buildKeyMO,
|
|
@@ -16990,5 +17042,6 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16990
17042
|
updatePriceMOAL04,
|
|
16991
17043
|
updatePricePBBudgetAlemaniaAL02,
|
|
16992
17044
|
updatePricePBBudgetAlemaniaAL04,
|
|
17045
|
+
uuidRegex,
|
|
16993
17046
|
validateNoLookup
|
|
16994
17047
|
});
|
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",
|
|
@@ -16655,6 +16655,9 @@ var collections = Object.freeze({
|
|
|
16655
16655
|
var db_root = "sigo_db";
|
|
16656
16656
|
var db_default = "default_db";
|
|
16657
16657
|
|
|
16658
|
+
// src/v2/constants/regex.ts
|
|
16659
|
+
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
16660
|
+
|
|
16658
16661
|
// src/v2/utils/getDBName.ts
|
|
16659
16662
|
function getDBName({ pais, delegacion }) {
|
|
16660
16663
|
return `${process.env.NODE_ENV}.${pais.Codigo}_${delegacion.Codigo}_db`.toLowerCase();
|
|
@@ -16682,6 +16685,52 @@ var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
|
16682
16685
|
if (formattedFields.length === 0) return null;
|
|
16683
16686
|
return `Duplicado en ${formattedFields.join(", ")}`;
|
|
16684
16687
|
}, "parseDuplicateKeyError");
|
|
16688
|
+
|
|
16689
|
+
// src/v2/utils/buildSystemOption.ts
|
|
16690
|
+
import { SystemOptionEntity, validateCustom } from "sigo-entities";
|
|
16691
|
+
function separarPalabras(texto) {
|
|
16692
|
+
return texto.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([A-Z])([A-Z][a-z])/g, "$1 $2");
|
|
16693
|
+
}
|
|
16694
|
+
__name(separarPalabras, "separarPalabras");
|
|
16695
|
+
async function builSystemOption(params) {
|
|
16696
|
+
const { rootPath, prefix, dataDB, rawData, UnprocessableEntityException, root = false } = params;
|
|
16697
|
+
const dataDBSet = new Set(dataDB.map((e) => e.key));
|
|
16698
|
+
const mapaLocal = /* @__PURE__ */ new Set();
|
|
16699
|
+
const newData = [];
|
|
16700
|
+
for (const raw of rawData) {
|
|
16701
|
+
for (const endpoint of raw.endpoints) {
|
|
16702
|
+
const [method, pathParts] = endpoint.route.split(" ");
|
|
16703
|
+
const partsRoute = `${prefix}${pathParts}`.split("/");
|
|
16704
|
+
for (const [i, element] of partsRoute.entries()) {
|
|
16705
|
+
const father = partsRoute.slice(0, i).join("");
|
|
16706
|
+
const isLast = i === partsRoute.length - 1;
|
|
16707
|
+
const key = `${partsRoute.slice(0, i + 1).join("")}${isLast ? method : ""}`;
|
|
16708
|
+
if (mapaLocal.has(key)) continue;
|
|
16709
|
+
mapaLocal.add(key);
|
|
16710
|
+
if (!dataDBSet.has(key)) {
|
|
16711
|
+
const _newEntity = {
|
|
16712
|
+
father,
|
|
16713
|
+
name: separarPalabras(element),
|
|
16714
|
+
prefix,
|
|
16715
|
+
root,
|
|
16716
|
+
key,
|
|
16717
|
+
method: isLast ? method : "",
|
|
16718
|
+
route: isLast ? `${method} ${rootPath}${pathParts}` : "",
|
|
16719
|
+
_id: crypto.randomUUID()
|
|
16720
|
+
};
|
|
16721
|
+
const newItem = await validateCustom(_newEntity, SystemOptionEntity, UnprocessableEntityException);
|
|
16722
|
+
newData.push(newItem);
|
|
16723
|
+
}
|
|
16724
|
+
}
|
|
16725
|
+
}
|
|
16726
|
+
}
|
|
16727
|
+
const _ids = dataDB.filter((e) => !mapaLocal.has(e.key)).map((e) => e._id);
|
|
16728
|
+
return {
|
|
16729
|
+
_ids,
|
|
16730
|
+
newData
|
|
16731
|
+
};
|
|
16732
|
+
}
|
|
16733
|
+
__name(builSystemOption, "builSystemOption");
|
|
16685
16734
|
export {
|
|
16686
16735
|
ActualizarDataManoObra,
|
|
16687
16736
|
ActualizarDataReserva,
|
|
@@ -16722,6 +16771,7 @@ export {
|
|
|
16722
16771
|
SEGMENT_TY,
|
|
16723
16772
|
UpdateNodosDocDP,
|
|
16724
16773
|
ValorizacionHelper,
|
|
16774
|
+
builSystemOption,
|
|
16725
16775
|
buildDataMOFromMaterialRules,
|
|
16726
16776
|
buildDataMaterialsRule,
|
|
16727
16777
|
buildKeyMO,
|
|
@@ -16824,5 +16874,6 @@ export {
|
|
|
16824
16874
|
updatePriceMOAL04,
|
|
16825
16875
|
updatePricePBBudgetAlemaniaAL02,
|
|
16826
16876
|
updatePricePBBudgetAlemaniaAL04,
|
|
16877
|
+
uuidRegex,
|
|
16827
16878
|
validateNoLookup
|
|
16828
16879
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigo-package",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.140",
|
|
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
|
}
|