sigo-package 1.2.133 → 1.2.135
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 +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +26 -1
- package/dist/index.mjs +25 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -771,6 +771,7 @@ declare const collections: {
|
|
|
771
771
|
readonly PERU_9112_MiFibraOrderStock: "PERU_9112_MiFibraOrderStock";
|
|
772
772
|
readonly PERU_9112_BantelOrder: "PERU_9112_BantelOrder";
|
|
773
773
|
readonly PERU_9112_BantelOrderStock: "PERU_9112_BantelOrderStock";
|
|
774
|
+
readonly user: "Usuarios";
|
|
774
775
|
};
|
|
775
776
|
|
|
776
777
|
declare const db_root = "sigo_db";
|
|
@@ -785,4 +786,6 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
785
786
|
delegacion: CodigoNombreDTO;
|
|
786
787
|
}): string;
|
|
787
788
|
|
|
788
|
-
|
|
789
|
+
declare const parseDuplicateKeyError: (message: string) => string | null;
|
|
790
|
+
|
|
791
|
+
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, 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, colecciones, 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
|
@@ -771,6 +771,7 @@ declare const collections: {
|
|
|
771
771
|
readonly PERU_9112_MiFibraOrderStock: "PERU_9112_MiFibraOrderStock";
|
|
772
772
|
readonly PERU_9112_BantelOrder: "PERU_9112_BantelOrder";
|
|
773
773
|
readonly PERU_9112_BantelOrderStock: "PERU_9112_BantelOrderStock";
|
|
774
|
+
readonly user: "Usuarios";
|
|
774
775
|
};
|
|
775
776
|
|
|
776
777
|
declare const db_root = "sigo_db";
|
|
@@ -785,4 +786,6 @@ declare function getDBName({ pais, delegacion }: {
|
|
|
785
786
|
delegacion: CodigoNombreDTO;
|
|
786
787
|
}): string;
|
|
787
788
|
|
|
788
|
-
|
|
789
|
+
declare const parseDuplicateKeyError: (message: string) => string | null;
|
|
790
|
+
|
|
791
|
+
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, 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, colecciones, 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
|
@@ -154,6 +154,7 @@ __export(index_exports, {
|
|
|
154
154
|
obtenerPrecioManoObraAL04: () => obtenerPrecioManoObraAL04,
|
|
155
155
|
obtenerTipoYCodigoMO: () => obtenerTipoYCodigoMO,
|
|
156
156
|
paisMap: () => paisMap,
|
|
157
|
+
parseDuplicateKeyError: () => parseDuplicateKeyError,
|
|
157
158
|
roundNumber: () => roundNumber,
|
|
158
159
|
searchCurrentContractorSpecialtyPrice: () => searchCurrentContractorSpecialtyPrice,
|
|
159
160
|
setColModels: () => setColModels,
|
|
@@ -16810,7 +16811,8 @@ var collections = {
|
|
|
16810
16811
|
PERU_9112_MiFibraOrder: "PERU_9112_MiFibraOrder",
|
|
16811
16812
|
PERU_9112_MiFibraOrderStock: "PERU_9112_MiFibraOrderStock",
|
|
16812
16813
|
PERU_9112_BantelOrder: "PERU_9112_BantelOrder",
|
|
16813
|
-
PERU_9112_BantelOrderStock: "PERU_9112_BantelOrderStock"
|
|
16814
|
+
PERU_9112_BantelOrderStock: "PERU_9112_BantelOrderStock",
|
|
16815
|
+
user: "Usuarios"
|
|
16814
16816
|
};
|
|
16815
16817
|
|
|
16816
16818
|
// src/v2/constants/db.ts
|
|
@@ -16827,6 +16829,28 @@ function getDBName({ pais, delegacion }) {
|
|
|
16827
16829
|
return `${process.env.NODE_ENV}.${pais.Codigo}_${delegacion.Codigo}_db`.toLowerCase();
|
|
16828
16830
|
}
|
|
16829
16831
|
__name(getDBName, "getDBName");
|
|
16832
|
+
|
|
16833
|
+
// src/v2/utils/parseDuplicateKeyError.ts
|
|
16834
|
+
var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
16835
|
+
const match = message.match(/dup key:\s*\{([^}]+)\}/);
|
|
16836
|
+
if (!match) return null;
|
|
16837
|
+
const fieldsString = match[1];
|
|
16838
|
+
const pairs = fieldsString.split(",").map((p) => p.trim());
|
|
16839
|
+
const excludeKeys = [
|
|
16840
|
+
"_id"
|
|
16841
|
+
];
|
|
16842
|
+
const formattedFields = pairs.map((pair) => {
|
|
16843
|
+
const [rawKey, rawValue] = pair.split(":").map((s) => s.trim());
|
|
16844
|
+
const key = rawKey.replace(/["']/g, "");
|
|
16845
|
+
const value = rawValue?.replace(/["']/g, "");
|
|
16846
|
+
return {
|
|
16847
|
+
key,
|
|
16848
|
+
value
|
|
16849
|
+
};
|
|
16850
|
+
}).filter(({ key }) => !excludeKeys.includes(key)).map(({ key, value }) => `${key} = ${value}`);
|
|
16851
|
+
if (formattedFields.length === 0) return null;
|
|
16852
|
+
return `Duplicado en ${formattedFields.join(", ")}`;
|
|
16853
|
+
}, "parseDuplicateKeyError");
|
|
16830
16854
|
// Annotate the CommonJS export names for ESM import in node:
|
|
16831
16855
|
0 && (module.exports = {
|
|
16832
16856
|
ActualizarDataManoObra,
|
|
@@ -16960,6 +16984,7 @@ __name(getDBName, "getDBName");
|
|
|
16960
16984
|
obtenerPrecioManoObraAL04,
|
|
16961
16985
|
obtenerTipoYCodigoMO,
|
|
16962
16986
|
paisMap,
|
|
16987
|
+
parseDuplicateKeyError,
|
|
16963
16988
|
roundNumber,
|
|
16964
16989
|
searchCurrentContractorSpecialtyPrice,
|
|
16965
16990
|
setColModels,
|
package/dist/index.mjs
CHANGED
|
@@ -16645,7 +16645,8 @@ var collections = {
|
|
|
16645
16645
|
PERU_9112_MiFibraOrder: "PERU_9112_MiFibraOrder",
|
|
16646
16646
|
PERU_9112_MiFibraOrderStock: "PERU_9112_MiFibraOrderStock",
|
|
16647
16647
|
PERU_9112_BantelOrder: "PERU_9112_BantelOrder",
|
|
16648
|
-
PERU_9112_BantelOrderStock: "PERU_9112_BantelOrderStock"
|
|
16648
|
+
PERU_9112_BantelOrderStock: "PERU_9112_BantelOrderStock",
|
|
16649
|
+
user: "Usuarios"
|
|
16649
16650
|
};
|
|
16650
16651
|
|
|
16651
16652
|
// src/v2/constants/db.ts
|
|
@@ -16662,6 +16663,28 @@ function getDBName({ pais, delegacion }) {
|
|
|
16662
16663
|
return `${process.env.NODE_ENV}.${pais.Codigo}_${delegacion.Codigo}_db`.toLowerCase();
|
|
16663
16664
|
}
|
|
16664
16665
|
__name(getDBName, "getDBName");
|
|
16666
|
+
|
|
16667
|
+
// src/v2/utils/parseDuplicateKeyError.ts
|
|
16668
|
+
var parseDuplicateKeyError = /* @__PURE__ */ __name((message) => {
|
|
16669
|
+
const match = message.match(/dup key:\s*\{([^}]+)\}/);
|
|
16670
|
+
if (!match) return null;
|
|
16671
|
+
const fieldsString = match[1];
|
|
16672
|
+
const pairs = fieldsString.split(",").map((p) => p.trim());
|
|
16673
|
+
const excludeKeys = [
|
|
16674
|
+
"_id"
|
|
16675
|
+
];
|
|
16676
|
+
const formattedFields = pairs.map((pair) => {
|
|
16677
|
+
const [rawKey, rawValue] = pair.split(":").map((s) => s.trim());
|
|
16678
|
+
const key = rawKey.replace(/["']/g, "");
|
|
16679
|
+
const value = rawValue?.replace(/["']/g, "");
|
|
16680
|
+
return {
|
|
16681
|
+
key,
|
|
16682
|
+
value
|
|
16683
|
+
};
|
|
16684
|
+
}).filter(({ key }) => !excludeKeys.includes(key)).map(({ key, value }) => `${key} = ${value}`);
|
|
16685
|
+
if (formattedFields.length === 0) return null;
|
|
16686
|
+
return `Duplicado en ${formattedFields.join(", ")}`;
|
|
16687
|
+
}, "parseDuplicateKeyError");
|
|
16665
16688
|
export {
|
|
16666
16689
|
ActualizarDataManoObra,
|
|
16667
16690
|
ActualizarDataReserva,
|
|
@@ -16794,6 +16817,7 @@ export {
|
|
|
16794
16817
|
obtenerPrecioManoObraAL04,
|
|
16795
16818
|
obtenerTipoYCodigoMO,
|
|
16796
16819
|
paisMap,
|
|
16820
|
+
parseDuplicateKeyError,
|
|
16797
16821
|
roundNumber,
|
|
16798
16822
|
searchCurrentContractorSpecialtyPrice,
|
|
16799
16823
|
setColModels,
|