sigo-package 1.2.168 → 1.2.169

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 CHANGED
@@ -1,5 +1,5 @@
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, DocumentRequirementDto, CodigoNombreDTO, SystemOptionEntity, MenuDto } 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, DocumentRequirementDto, AltasNVTOrderENTITY, CodigoNombreDTO, SystemOptionEntity, MenuDto, FilesDocDTO } from 'sigo-entities';
3
3
  import { ClassConstructor } from 'class-transformer';
4
4
  import { Request, Response, NextFunction } from 'express';
5
5
 
@@ -688,6 +688,8 @@ declare const mapeoZonasSimilares: Record<string, string[]>;
688
688
 
689
689
  declare const documentRequirement: DocumentRequirementDto[];
690
690
 
691
+ declare function verifyInventoryFinalize(docs: AltasNVTOrderENTITY[], UnprocessableEntityException?: ClassConstructor<Error>): void;
692
+
691
693
  declare enum Position {
692
694
  left = "left",
693
695
  right = "right"
@@ -854,6 +856,8 @@ declare function builSystemOption(params: IParams): Promise<{
854
856
  type TranslateFn = (key: string) => string;
855
857
  declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto[];
856
858
 
859
+ declare function verifyFiles(documentation: FilesDocDTO[], documentRequirement: DocumentRequirementDto[], BadRequestException?: ClassConstructor<Error>): void;
860
+
857
861
  declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
858
862
 
859
- 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, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, 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, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, 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, documentRequirement, 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, validateUUIDv4Param };
863
+ 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, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, 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, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, 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, documentRequirement, 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, validateUUIDv4Param, verifyFiles, verifyInventoryFinalize };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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, DocumentRequirementDto, CodigoNombreDTO, SystemOptionEntity, MenuDto } 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, DocumentRequirementDto, AltasNVTOrderENTITY, CodigoNombreDTO, SystemOptionEntity, MenuDto, FilesDocDTO } from 'sigo-entities';
3
3
  import { ClassConstructor } from 'class-transformer';
4
4
  import { Request, Response, NextFunction } from 'express';
5
5
 
@@ -688,6 +688,8 @@ declare const mapeoZonasSimilares: Record<string, string[]>;
688
688
 
689
689
  declare const documentRequirement: DocumentRequirementDto[];
690
690
 
691
+ declare function verifyInventoryFinalize(docs: AltasNVTOrderENTITY[], UnprocessableEntityException?: ClassConstructor<Error>): void;
692
+
691
693
  declare enum Position {
692
694
  left = "left",
693
695
  right = "right"
@@ -854,6 +856,8 @@ declare function builSystemOption(params: IParams): Promise<{
854
856
  type TranslateFn = (key: string) => string;
855
857
  declare const buildMenu: (data: SystemOptionEntity[], t: TranslateFn) => MenuDto[];
856
858
 
859
+ declare function verifyFiles(documentation: FilesDocDTO[], documentRequirement: DocumentRequirementDto[], BadRequestException?: ClassConstructor<Error>): void;
860
+
857
861
  declare function validateUUIDv4Param(BadRequestException: ClassConstructor<Error>, req: Request<any>, _res: Response, next: NextFunction): Promise<void>;
858
862
 
859
- 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, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, 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, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, 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, documentRequirement, 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, validateUUIDv4Param };
863
+ 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, FormatearErrorValidacionMOHijas, GemeindeChangeNomenclatura, GetCodigoFechaActual, type IDPContrato, type IDocumentacion, type ILineaValidacion, type IMOAndMaterialsRules, type IMORules, type IMateriales, type IResultadoValidacionMOHijas, 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, ValidarRelacionMOHijasAL04, ValorizacionHelper, builSystemOption, buildDataMOFromMaterialRules, buildDataMaterialsRule, buildKeyMO, buildMenu, 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, documentRequirement, 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, validateUUIDv4Param, verifyFiles, verifyInventoryFinalize };
package/dist/index.js CHANGED
@@ -3,7 +3,6 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
7
  var __export = (target, all) => {
9
8
  for (var name in all)
@@ -18,7 +17,6 @@ var __copyProps = (to, from, except, desc) => {
18
17
  return to;
19
18
  };
20
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
20
 
23
21
  // src/index.ts
24
22
  var index_exports = {};
@@ -171,7 +169,9 @@ __export(index_exports, {
171
169
  updatePricePBBudgetAlemaniaAL04: () => updatePricePBBudgetAlemaniaAL04,
172
170
  uuidRegex: () => uuidRegex,
173
171
  validateNoLookup: () => validateNoLookup,
174
- validateUUIDv4Param: () => validateUUIDv4Param
172
+ validateUUIDv4Param: () => validateUUIDv4Param,
173
+ verifyFiles: () => verifyFiles,
174
+ verifyInventoryFinalize: () => verifyInventoryFinalize
175
175
  });
176
176
  module.exports = __toCommonJS(index_exports);
177
177
 
@@ -16295,17 +16295,17 @@ var GetCodigoFechaActual = /* @__PURE__ */ __name((fecha) => {
16295
16295
  }, "GetCodigoFechaActual");
16296
16296
 
16297
16297
  // src/shared/Utils/CurrencyFormat.ts
16298
- var _a;
16299
- var Params = (_a = class {
16300
- constructor() {
16301
- __publicField(this, "symbolCoin", "");
16302
- __publicField(this, "symbolCoinPosition", "left");
16303
- __publicField(this, "isPorcent", false);
16304
- __publicField(this, "decimal", 2);
16305
- __publicField(this, "codeCountry", "");
16306
- __publicField(this, "currency", "");
16298
+ var Params = class Params2 {
16299
+ static {
16300
+ __name(this, "Params");
16307
16301
  }
16308
- }, __name(_a, "Params"), _a);
16302
+ symbolCoin = "";
16303
+ symbolCoinPosition = "left";
16304
+ isPorcent = false;
16305
+ decimal = 2;
16306
+ codeCountry = "";
16307
+ currency = "";
16308
+ };
16309
16309
  function CurrencyFormat(value = 0, options = new Params()) {
16310
16310
  try {
16311
16311
  let _value = structuredClone(value);
@@ -16697,13 +16697,16 @@ function buildKeyMO(mo) {
16697
16697
  __name(buildKeyMO, "buildKeyMO");
16698
16698
 
16699
16699
  // src/Programados/calcularMOAsignada.ts
16700
- var _AsignacionHelper = class _AsignacionHelper {
16700
+ var AsignacionHelper = class {
16701
+ static {
16702
+ __name(this, "AsignacionHelper");
16703
+ }
16704
+ valorizacionMap;
16701
16705
  /**
16702
16706
  * Inicializa el helper y construye el índice de asignaciones.
16703
16707
  * @param trabajos Lista de trabajos con asignaciones
16704
16708
  */
16705
16709
  constructor(trabajos) {
16706
- __publicField(this, "valorizacionMap");
16707
16710
  this.valorizacionMap = this.buildValorizacionMap(trabajos);
16708
16711
  }
16709
16712
  /**
@@ -16738,23 +16741,24 @@ var _AsignacionHelper = class _AsignacionHelper {
16738
16741
  };
16739
16742
  }
16740
16743
  };
16741
- __name(_AsignacionHelper, "AsignacionHelper");
16742
- var AsignacionHelper = _AsignacionHelper;
16743
16744
 
16744
16745
  // src/Programados/calcularMOValorizada.ts
16745
- var _ValorizacionHelper = class _ValorizacionHelper {
16746
+ var ValorizacionHelper = class {
16747
+ static {
16748
+ __name(this, "ValorizacionHelper");
16749
+ }
16750
+ valorizacionMap;
16751
+ estadosPermitidos = /* @__PURE__ */ new Set([
16752
+ "PRODUCCION",
16753
+ "CERTIFICADA",
16754
+ "PRELIQUIDADA",
16755
+ "LIQUIDADA"
16756
+ ]);
16746
16757
  /**
16747
16758
  * Inicializa el helper y construye el índice de valorizaciones.
16748
16759
  * @param trabajos Lista de trabajos con valorizaciones
16749
16760
  */
16750
16761
  constructor(trabajos) {
16751
- __publicField(this, "valorizacionMap");
16752
- __publicField(this, "estadosPermitidos", /* @__PURE__ */ new Set([
16753
- "PRODUCCION",
16754
- "CERTIFICADA",
16755
- "PRELIQUIDADA",
16756
- "LIQUIDADA"
16757
- ]));
16758
16762
  this.valorizacionMap = this.buildValorizacionMap(trabajos);
16759
16763
  }
16760
16764
  /**
@@ -16791,8 +16795,6 @@ var _ValorizacionHelper = class _ValorizacionHelper {
16791
16795
  };
16792
16796
  }
16793
16797
  };
16794
- __name(_ValorizacionHelper, "ValorizacionHelper");
16795
- var ValorizacionHelper = _ValorizacionHelper;
16796
16798
 
16797
16799
  // src/Programados/getPriceMaterial.ts
16798
16800
  function getPriceMaterial(CodigoItem, dataPriceMaterial) {
@@ -16975,6 +16977,33 @@ var documentRequirement = [
16975
16977
  }
16976
16978
  ];
16977
16979
 
16980
+ // src/Operativa/AltasNVT/verifyInventoryFinalize.ts
16981
+ function verifyInventoryFinalize(docs, UnprocessableEntityException) {
16982
+ const codigo = "40928145";
16983
+ const orders = docs.filter((e) => e.inventory.some((inv) => inv.codigo === codigo));
16984
+ if (orders.length === 0) {
16985
+ const msg = `No se puede finalizar la orden, la orden no tiene el material ${codigo}`;
16986
+ if (UnprocessableEntityException) {
16987
+ throw new UnprocessableEntityException(msg, true);
16988
+ } else {
16989
+ throw new Error(msg, {
16990
+ cause: "USER_MESSAGE"
16991
+ });
16992
+ }
16993
+ }
16994
+ if (orders.length > 1) {
16995
+ const msg = `No se puede finalizar la orden, existen ordenes con el material ${codigo}`;
16996
+ if (UnprocessableEntityException) {
16997
+ throw new UnprocessableEntityException(msg, true);
16998
+ } else {
16999
+ throw new Error(msg, {
17000
+ cause: "USER_MESSAGE"
17001
+ });
17002
+ }
17003
+ }
17004
+ }
17005
+ __name(verifyInventoryFinalize, "verifyInventoryFinalize");
17006
+
16978
17007
  // src/constants/collections.ts
16979
17008
  var collections = Object.freeze({
16980
17009
  PERU_9112_ToaOrder: "PERU_9112_ToaOrder",
@@ -17141,6 +17170,54 @@ var buildMenu = /* @__PURE__ */ __name((data, t) => {
17141
17170
  return rootItems;
17142
17171
  }, "buildMenu");
17143
17172
 
17173
+ // src/v2/utils/verifyFiles.ts
17174
+ function verifyFiles(documentation, documentRequirement2, BadRequestException) {
17175
+ const verifyRequirements = /* @__PURE__ */ __name((requirements) => {
17176
+ requirements.forEach((requirement) => {
17177
+ if (requirement.children.length > 0) {
17178
+ verifyRequirements(requirement.children);
17179
+ return;
17180
+ }
17181
+ const files = documentation.filter((file) => file.CodigoNodo === requirement.id);
17182
+ if (files.length < requirement.minFiles) {
17183
+ const msg = `El requisito "${requirement.label}" requiere al menos ${requirement.minFiles} archivo(s)`;
17184
+ if (BadRequestException) {
17185
+ throw new BadRequestException(msg, true);
17186
+ } else {
17187
+ throw new Error(msg, {
17188
+ cause: "USER_MESSAGE"
17189
+ });
17190
+ }
17191
+ }
17192
+ if (files.length > requirement.maxFiles) {
17193
+ const msg = `El requisito "${requirement.label}" permite como m\xE1ximo ${requirement.maxFiles} archivo(s)`;
17194
+ if (BadRequestException) {
17195
+ throw new BadRequestException(msg, true);
17196
+ } else {
17197
+ throw new Error(msg, {
17198
+ cause: "USER_MESSAGE"
17199
+ });
17200
+ }
17201
+ }
17202
+ files.forEach((file) => {
17203
+ const extension = `.${file.Extension.toLowerCase()}`;
17204
+ if (!requirement.acceptedFileExtensions.includes(extension)) {
17205
+ const msg = `El archivo "${file.NameOriginal}" no tiene una extensi\xF3n v\xE1lida para "${requirement.label}"`;
17206
+ if (BadRequestException) {
17207
+ throw new BadRequestException(msg, true);
17208
+ } else {
17209
+ throw new Error(msg, {
17210
+ cause: "USER_MESSAGE"
17211
+ });
17212
+ }
17213
+ }
17214
+ });
17215
+ });
17216
+ }, "verifyRequirements");
17217
+ verifyRequirements(documentRequirement2);
17218
+ }
17219
+ __name(verifyFiles, "verifyFiles");
17220
+
17144
17221
  // src/v2/middlewares/validateUUIDv4Param.ts
17145
17222
  async function validateUUIDv4Param(BadRequestException, req, _res, next) {
17146
17223
  try {
@@ -17306,5 +17383,7 @@ __name(validateUUIDv4Param, "validateUUIDv4Param");
17306
17383
  updatePricePBBudgetAlemaniaAL04,
17307
17384
  uuidRegex,
17308
17385
  validateNoLookup,
17309
- validateUUIDv4Param
17386
+ validateUUIDv4Param,
17387
+ verifyFiles,
17388
+ verifyInventoryFinalize
17310
17389
  });
package/dist/index.mjs CHANGED
@@ -1,7 +1,5 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
3
 
6
4
  // src/Programados/ActualizarDataManoObra.ts
7
5
  var ActualizarDataManoObra = /* @__PURE__ */ __name(({ manoObra, ContratoOT, envSIGO, obra }) => {
@@ -16123,17 +16121,17 @@ var GetCodigoFechaActual = /* @__PURE__ */ __name((fecha) => {
16123
16121
  }, "GetCodigoFechaActual");
16124
16122
 
16125
16123
  // src/shared/Utils/CurrencyFormat.ts
16126
- var _a;
16127
- var Params = (_a = class {
16128
- constructor() {
16129
- __publicField(this, "symbolCoin", "");
16130
- __publicField(this, "symbolCoinPosition", "left");
16131
- __publicField(this, "isPorcent", false);
16132
- __publicField(this, "decimal", 2);
16133
- __publicField(this, "codeCountry", "");
16134
- __publicField(this, "currency", "");
16124
+ var Params = class Params2 {
16125
+ static {
16126
+ __name(this, "Params");
16135
16127
  }
16136
- }, __name(_a, "Params"), _a);
16128
+ symbolCoin = "";
16129
+ symbolCoinPosition = "left";
16130
+ isPorcent = false;
16131
+ decimal = 2;
16132
+ codeCountry = "";
16133
+ currency = "";
16134
+ };
16137
16135
  function CurrencyFormat(value = 0, options = new Params()) {
16138
16136
  try {
16139
16137
  let _value = structuredClone(value);
@@ -16525,13 +16523,16 @@ function buildKeyMO(mo) {
16525
16523
  __name(buildKeyMO, "buildKeyMO");
16526
16524
 
16527
16525
  // src/Programados/calcularMOAsignada.ts
16528
- var _AsignacionHelper = class _AsignacionHelper {
16526
+ var AsignacionHelper = class {
16527
+ static {
16528
+ __name(this, "AsignacionHelper");
16529
+ }
16530
+ valorizacionMap;
16529
16531
  /**
16530
16532
  * Inicializa el helper y construye el índice de asignaciones.
16531
16533
  * @param trabajos Lista de trabajos con asignaciones
16532
16534
  */
16533
16535
  constructor(trabajos) {
16534
- __publicField(this, "valorizacionMap");
16535
16536
  this.valorizacionMap = this.buildValorizacionMap(trabajos);
16536
16537
  }
16537
16538
  /**
@@ -16566,23 +16567,24 @@ var _AsignacionHelper = class _AsignacionHelper {
16566
16567
  };
16567
16568
  }
16568
16569
  };
16569
- __name(_AsignacionHelper, "AsignacionHelper");
16570
- var AsignacionHelper = _AsignacionHelper;
16571
16570
 
16572
16571
  // src/Programados/calcularMOValorizada.ts
16573
- var _ValorizacionHelper = class _ValorizacionHelper {
16572
+ var ValorizacionHelper = class {
16573
+ static {
16574
+ __name(this, "ValorizacionHelper");
16575
+ }
16576
+ valorizacionMap;
16577
+ estadosPermitidos = /* @__PURE__ */ new Set([
16578
+ "PRODUCCION",
16579
+ "CERTIFICADA",
16580
+ "PRELIQUIDADA",
16581
+ "LIQUIDADA"
16582
+ ]);
16574
16583
  /**
16575
16584
  * Inicializa el helper y construye el índice de valorizaciones.
16576
16585
  * @param trabajos Lista de trabajos con valorizaciones
16577
16586
  */
16578
16587
  constructor(trabajos) {
16579
- __publicField(this, "valorizacionMap");
16580
- __publicField(this, "estadosPermitidos", /* @__PURE__ */ new Set([
16581
- "PRODUCCION",
16582
- "CERTIFICADA",
16583
- "PRELIQUIDADA",
16584
- "LIQUIDADA"
16585
- ]));
16586
16588
  this.valorizacionMap = this.buildValorizacionMap(trabajos);
16587
16589
  }
16588
16590
  /**
@@ -16619,8 +16621,6 @@ var _ValorizacionHelper = class _ValorizacionHelper {
16619
16621
  };
16620
16622
  }
16621
16623
  };
16622
- __name(_ValorizacionHelper, "ValorizacionHelper");
16623
- var ValorizacionHelper = _ValorizacionHelper;
16624
16624
 
16625
16625
  // src/Programados/getPriceMaterial.ts
16626
16626
  function getPriceMaterial(CodigoItem, dataPriceMaterial) {
@@ -16803,6 +16803,33 @@ var documentRequirement = [
16803
16803
  }
16804
16804
  ];
16805
16805
 
16806
+ // src/Operativa/AltasNVT/verifyInventoryFinalize.ts
16807
+ function verifyInventoryFinalize(docs, UnprocessableEntityException) {
16808
+ const codigo = "40928145";
16809
+ const orders = docs.filter((e) => e.inventory.some((inv) => inv.codigo === codigo));
16810
+ if (orders.length === 0) {
16811
+ const msg = `No se puede finalizar la orden, la orden no tiene el material ${codigo}`;
16812
+ if (UnprocessableEntityException) {
16813
+ throw new UnprocessableEntityException(msg, true);
16814
+ } else {
16815
+ throw new Error(msg, {
16816
+ cause: "USER_MESSAGE"
16817
+ });
16818
+ }
16819
+ }
16820
+ if (orders.length > 1) {
16821
+ const msg = `No se puede finalizar la orden, existen ordenes con el material ${codigo}`;
16822
+ if (UnprocessableEntityException) {
16823
+ throw new UnprocessableEntityException(msg, true);
16824
+ } else {
16825
+ throw new Error(msg, {
16826
+ cause: "USER_MESSAGE"
16827
+ });
16828
+ }
16829
+ }
16830
+ }
16831
+ __name(verifyInventoryFinalize, "verifyInventoryFinalize");
16832
+
16806
16833
  // src/constants/collections.ts
16807
16834
  var collections = Object.freeze({
16808
16835
  PERU_9112_ToaOrder: "PERU_9112_ToaOrder",
@@ -16969,6 +16996,54 @@ var buildMenu = /* @__PURE__ */ __name((data, t) => {
16969
16996
  return rootItems;
16970
16997
  }, "buildMenu");
16971
16998
 
16999
+ // src/v2/utils/verifyFiles.ts
17000
+ function verifyFiles(documentation, documentRequirement2, BadRequestException) {
17001
+ const verifyRequirements = /* @__PURE__ */ __name((requirements) => {
17002
+ requirements.forEach((requirement) => {
17003
+ if (requirement.children.length > 0) {
17004
+ verifyRequirements(requirement.children);
17005
+ return;
17006
+ }
17007
+ const files = documentation.filter((file) => file.CodigoNodo === requirement.id);
17008
+ if (files.length < requirement.minFiles) {
17009
+ const msg = `El requisito "${requirement.label}" requiere al menos ${requirement.minFiles} archivo(s)`;
17010
+ if (BadRequestException) {
17011
+ throw new BadRequestException(msg, true);
17012
+ } else {
17013
+ throw new Error(msg, {
17014
+ cause: "USER_MESSAGE"
17015
+ });
17016
+ }
17017
+ }
17018
+ if (files.length > requirement.maxFiles) {
17019
+ const msg = `El requisito "${requirement.label}" permite como m\xE1ximo ${requirement.maxFiles} archivo(s)`;
17020
+ if (BadRequestException) {
17021
+ throw new BadRequestException(msg, true);
17022
+ } else {
17023
+ throw new Error(msg, {
17024
+ cause: "USER_MESSAGE"
17025
+ });
17026
+ }
17027
+ }
17028
+ files.forEach((file) => {
17029
+ const extension = `.${file.Extension.toLowerCase()}`;
17030
+ if (!requirement.acceptedFileExtensions.includes(extension)) {
17031
+ const msg = `El archivo "${file.NameOriginal}" no tiene una extensi\xF3n v\xE1lida para "${requirement.label}"`;
17032
+ if (BadRequestException) {
17033
+ throw new BadRequestException(msg, true);
17034
+ } else {
17035
+ throw new Error(msg, {
17036
+ cause: "USER_MESSAGE"
17037
+ });
17038
+ }
17039
+ }
17040
+ });
17041
+ });
17042
+ }, "verifyRequirements");
17043
+ verifyRequirements(documentRequirement2);
17044
+ }
17045
+ __name(verifyFiles, "verifyFiles");
17046
+
16972
17047
  // src/v2/middlewares/validateUUIDv4Param.ts
16973
17048
  async function validateUUIDv4Param(BadRequestException, req, _res, next) {
16974
17049
  try {
@@ -17133,5 +17208,7 @@ export {
17133
17208
  updatePricePBBudgetAlemaniaAL04,
17134
17209
  uuidRegex,
17135
17210
  validateNoLookup,
17136
- validateUUIDv4Param
17211
+ validateUUIDv4Param,
17212
+ verifyFiles,
17213
+ verifyInventoryFinalize
17137
17214
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigo-package",
3
- "version": "1.2.168",
3
+ "version": "1.2.169",
4
4
  "description": "Funciones compartidas sigo",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",