npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tepuilabsdev/enlamano

v2.0.0

Published

Pequeña librería para consumir los servicios de la financiera enlamano.com.uy

Downloads

15

Readme

enlamano.js

NPM version NPM downloads NPM GitHub issues GitHub forks GitHub stars

instalación

npm install @tepuilabsdev/enlamano
// o con yarn
yarn add @tepuilabsdev/enlamano

como usar

import enlamano from '@tepuilabsdev/enlamano';

const mano = enlamano(
    "<usuario>",
    "<paswword>",
    "<URL_ENTORNO>"
);

// tomar en cuenta que los parámetros deben ir con la primera
// letra en mayúsculas
let params = {
    Documento: "11111111",
    TipoDocumento: "IDE",
    DatosEntrada: {
        Salario: 24000,
        Sexo: 1,
        Region: 1,
        Edad: 42,
    },
};

const r = mano.request(params);

r
.then((data) => console.log(data))
.catch((error) => console.error(error));

datos de entrada

  • Salario - double
  • Sexo - int (1 - Mujer, 2 - Hombre)
  • Region - int (1 - Montevideo, 2 - Interior)
  • Edad - int

ejemplo de respuestas

{
  accion: 'SIN OFERTA PARA ESTE CLIENTE',
  oferta: '',
  tasaMenosDe12: '',
  tasa12OMas: '',
  financiacion: [],
  documento: '11111111',
  tipoDocumento: 'IDE'
}
{
  accion: 'CALCULAR OFERTA',
  oferta: '18000',
  tasaMenosDe12: '156',
  tasa12OMas: '163',
  financiacion: [
    { coutas: 6, oferta: 6000, valorCuota: 1389 },
    { coutas: 6, oferta: 8000, valorCuota: 1846 },
    { coutas: 8, oferta: 8000, valorCuota: 1506 },
    { coutas: 10, oferta: 8000, valorCuota: 1306 },
    { coutas: 6, oferta: 10000, valorCuota: 2303 },
    { coutas: 8, oferta: 10000, valorCuota: 1878 },
    { coutas: 10, oferta: 10000, valorCuota: 1629 },
    { coutas: 12, oferta: 10000, valorCuota: 1467 },
    { coutas: 6, oferta: 12000, valorCuota: 2749 },
    { coutas: 8, oferta: 12000, valorCuota: 2239 },
    { coutas: 10, oferta: 12000, valorCuota: 1940 },
    { coutas: 12, oferta: 12000, valorCuota: 1746 },
    { coutas: 15, oferta: 12000, valorCuota: 1620 },
    { coutas: 8, oferta: 15000, valorCuota: 2795 },
    { coutas: 10, oferta: 15000, valorCuota: 2422 },
    { coutas: 12, oferta: 15000, valorCuota: 2180 },
    { coutas: 15, oferta: 15000, valorCuota: 2021 },
    { coutas: 10, oferta: 18000, valorCuota: 2903 },
    { coutas: 12, oferta: 18000, valorCuota: 2613 },
    { coutas: 18, oferta: 18000, valorCuota: 2252 }
  ],
  documento: '11111111',
  tipoDocumento: 'IDE'
}

errores

{
    errores: [
        {
            codigo: "Documento",
            mensaje: "El documento es requerido.",
        },
    ];
}

hay otro tipo de errores que se controlan por códigos http

  • 401: Unauthorized ​-​ Error de credenciales
  • 403: Unauthorized ​-​ Request rechazado por temas de seguridad
  • 404: Not found ​-​ URL incorrecta
  • 415: Unsupported media type ​-​ (si no se envía un json)
  • 412: Unprocessable entity ​-​ Generalmente asociado a un modelo incorrecto500: Internal server error ​-​ Asociado al error de ejecución mencionado en el body
  • 503: Service unavailable ​-​ El servidor no está respondiendo