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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zlspace/z-auth

v1.0.7

Published

ZAuth is a authentication service for ZLS.NP

Readme

ZAuth

ZAuth is a authentication service for ZLS.

Installation

npm install @zlspace/z-auth

Usage

User Service

import { createConnection, UserService, RoleService, PermissionService } from "@zlspace/z-auth";
import type { I_Users } from "@zlspace/z-auth";

const zAuth = createConnection({
  baseURL: "https://z-auth-stage.zerologicspace.com/api",
  apiKey: "tenant-api-key",
  apiSecretKey: "tenant-api-secret-key",
});

const userService = new UserService(zAuth);

async function example1() {
    const users = await userService.getUserById("paradise-1704caa");
    console.log(users);
}

example1();

Output:

{
  id: 'paradise-86f98b7c5030',
  email: '[email protected]',
  isBlocked: false,
  isEmailVerified: true,
  emailVerificationToken: null,
  emailVerificationTokenExpiresAt: null,
  passwordResetToken: null,
  passwordResetTokenExpiresAt: null,
  tenantId: 5,
  refreshToken: null
} 
import { createConnection, UserService } from "@zlspace/z-auth";

const zAuth = createConnection({
  baseURL: "https://z-auth-stage.zerologicspace.com/api",
  apiKey: "tenant-api-key",
  apiSecretKey: "tenant-api-secret-key",
});

const userService = new UserService(zAuth);

async function example2() {
   const data: I_Users = {
        email: "[email protected]",
        password: "Asdf1234!",
        roleId: [2,5]
    }
    const users = await userService.createUser(data);
    console.log(users);
}

example2();

Output:
{ error: 'Must be valid email address.', status: 400 } 
{ error: 'User already exists', status: 400 } 

Usage Function

User Service

createUser(data: I_Users) // {data: email, password, contactNumber, recoveryEmail, recoveryNumber, roleId; all optional}
login(data: I_LoginRequest) // {data: email, password, contactNumber(optional)}
forgotPassword(data: I_ForgotPasswordRequest) // {data: email, contactNumber, recoveryEmail, recoveryNumber; all optional}
getUserById(id: string)
resetPassword(token: string, tenantId:number, data: I_ResetPassword) //{data: password, confirmPassword}
changePassword(id: string, data: I_ChangePassword) //{data: currentPassword, newPassword, confirmPassword}
deleteUserById(id: string)
logout(id: string)
sendVerificationEmail(email: string)
verifyEmail(token: string, tenantId:number)
updateUserById(userId: string, data: I_UpdateUserByIdRequest) //{data: email, contactNumber, recoveryEmail, recoveryNumber, isBlocked, roleId; all optional}
authLogin(token: string) //idtoken returned from google, role id optional
authRegister(token: string, roleId: number[]) //access_token returned from facebook, role id optional

Role Service

createRole(name:string, description?:string)
getAllRoles()
getRoleById (id: number)
updateRoleById (id:number, name:string, description?:string)
deleteRoleById (id : number)
getPermissionsByRoleId(id: number)
getAccessToken()
getRefreshToken()

Permissions Service

createPermission(module:string,access:string,description?:string)
getAllPermissions()
getPermissionById (id: number)
updatePermissionById (id:number, module:string,access:string,description?:string)
deletePermissionById (id : number)
setPermissionByRoleId (roleId: number, permissionId: number[])
setAllPermissions(roleId:number)