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

aloux-sdk

v0.0.41

Published

Aloux SDK for APIs

Downloads

43

Readme

Aloux SDK

Uso de esta librearía para administración de menus, privilegios, funciones, usuarios y envio de notificaciones por medio de correos y mensajes de texto

Installation

$ npm install aloux-sdk --save

Usage

En archivo init.js

// Importación
const { IAMRouter, IAMSwagger } = require('aloux-sdk')

// uso
app.use(IAMRouter)

// uso swagger
app.use(
    "/aloux-sdk",
    swaggerUI.serveFiles(IAMswagger, {}), 
    swaggerUI.setup(IAMswagger)
    )

// URL Swagger
// [BASE_URL]/docs-iam/#/default/

En archivo router.js

// Importación
const { IAMAuth } = require('aloux-sdk')

// uso (ejemplo)
router.post('/customer', IAMAuth, customer.create)

Variables de entorno

Requiere las siguientes variables de entorno (.env)

| Variable | Description | | ----------------------|---------------| | AUTH_SECRET | Required, para cifrar la contraseña | | AWS_SECRET_ACCESS_KEY | Required, para acceso a S3 y SES AWS. | | AWS_ACCESS_KEY_ID | Required, para acceso a S3 y SES AWS. | | AWS_REGION | Required, para acceso a S3 y SES AWS. | | AWS_BUCKET | Required, para guardar la foto de perfil en AWS. | | AWS_EMAIL_SENDER | Required, para mandar el correo de recuperación de contraseña | | DEBUG | Required, para validar si el ambiente es dev o PROD | | MASTER_PWD | Optional, para utilizar contraseña maestra de usuarios en desarrollo | | BASE_URL | Optional, para swagger |

Endpoints disponibles

Endpoints user self (no auth)

| Method | Endpoint | Description | | --------- | --------------------------|---------------| | POST | iam/user/email | Validar correo | | POST | iam/user/login | Iniciar sesión | | POST | iam/user/forgot/password | Enviar código a correo | | POST | iam/user/validate/code | Verificar código | | POST | iam/user/reset/password | Reestablecer contraseña |

Endpoints user self

| Method | Endpoint | Description | | --------- | --------------------------|---------------| | GET | iam/user/me | Obtener información de usuario autenticado | | PUT | iam/user/profile | Actualizar perfil | | PUT | iam/user/profile/pictura | Actualizar solo la foto de perfil | | PUT | iam/user/reset/password | Actualizar contraseña | | GET | iam/user/logout | Cerrar sesión |

Endpoints user

| Method | Endpoint | Description | | --------- | ------------------------------|----------------| | POST | iam/user | Crear usuario | | GET | iam/user | Obtener todos los usuario | | GET | iam/user/:USER_ID | Obtener detalle de usuario | | PUT | iam/user/:USER_ID | Actualizar usuario | | PUT | iam/user/active/:USER_ID | Activar o desactivar usuario | | PUT | iam/user/password/:USER_ID | Actualizar la constraseña de un usuario | | DELETE | iam/user/:USER_ID | Eliminar usuario | | GET | iam/user/count | Obtiene el número de usuarios |

Endpoints funtions

| Method | Endpoint | Description | | --------- | --------------------------------------|----------------| | POST | iam/functions | Crear función | | PUT | iam/functions/:FUNCTION_ID | Actualizar función | | PUT | iam/functions/active/:FUNCTION_ID | Activar o desactivar función | | GET | iam/functions | Obtener todas las funciones | | GET | iam/functions/:FUNCTION_ID | Obtener detalle de la función | | DELETE | iam/functions/:FUNCTION_ID | Eliminar función | | GET | iam/functions/count | Obtiene el número de funciones |

Endpoints permission

| Method | Endpoint | Description | | --------- | ------------------------------------------|---------------| | POST | iam/permission | Crear permiso | PUT | iam/permission/:PERMISSION_ID | Actualizar permiso | | PUT | iam/permission/active/:PERMISSION_ID | Activar o desactivar permiso | | GET | iam/permission | Obtener todas los permisos | | GET | iam/permission/:PERMISSION_ID | Obtener detalle de la permiso | | DELETE | iam/permission/:PERMISSION_ID | Eliminar permiso | | GET | iam/permission/count | Obtiene el número de permisos |

Endpoints menu

| Method | Endpoint | Description | | --------- | --------------------------|---------------| | POST | /iam/menu | Crea un elemento de menú | | PUT | /iam/menu/:id | Actualiza un elemento de menú | | PUT | /iam/menu/active/:id | Activa o desactiva un menú | | GET | /iam/menu | Obtiene todos los elementos de menú | | GET | /iam/menu/:id | Obtiene el detalle de un elemento de menú | | DETELE | /iam/menu/:id | Elimina un elemento de menú | | POST | /iam/menu/order | Ordena los elementos de menú | | GET | iam/menu/count | Obtiene el número de menús |