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

@or-sdk/users

v3.10.2

Published

OneReach SDK client for Users

Readme

@or-sdk/users

OneReach SDK client for Users.

When to use

  • Use this package when integrating with the Users capability on the OneReach platform.
  • Use its typed client and exported models instead of hand-writing requests to that service.

When not to use

  • Do not use it for a different platform capability; choose the dedicated @or-sdk/* package instead.
  • Do not use it for generic third-party HTTP calls.

Installation

$ npm i @or-sdk/users

Usage

import { Users } from '@or-sdk/users'

// with direct api url
const users = new Users({
  token: 'my-account-token-string',
  sdkUrl: 'http://example.sdk-api/endpoint',
  usersUrl: 'http://example.users/endpoint'
});

// with service discovery(slower)
const users = new Users({
  token: 'my-account-token-string',
  discoveryUrl: 'http://example.discovery/endpoint'
});

Configuration

  • Prefer sdkUrl when the service URL is known; it avoids a discovery request.
  • Use discoveryUrl only when the service URL is not available.
  • Provide token as a bearer-token string or getter where supported.

Common pitfalls

  • Keep the client token current when it can expire; a token getter is preferable where the constructor accepts one.
  • Treat the generated TypeScript types as the authoritative contract for optional parameters and response shapes.

Common workflows

const page = await users.listUsers({ from: 0, size: 50, orderProperty: 'email' });
const user = await users.getUserById('user-id', ['email', 'name']);
await users.disableUser(user.id);

Use getCurrentUser for the identity represented by the token. listAccounts is restricted to super administrators; cross-account operations require the corresponding SDK configuration and authorization.

Complete API reference

All public methods below are taken from the package source. Parameter and return types use the exported TypeScript names; import the corresponding types from this package when constructing requests.

| Method | Returns | Purpose | |---|---|---| | makeRequest(params: CalApiParams) | Promise<T> | See the exported TypeScript signature for behavior and constraints. | | listUsers(params = {} as ListUsersParams) | Promise<ListUsersResult> | List users in account | | getUserById(userId: GetUserByIdParams['userId'], projection: GetUserByIdParams['projection']) | Promise<User> | Get account user by Id | | getCurrentMultiUserProfile({ validate }: ValidateParams = { validate: true }) | Promise<CurrentMultiUserProfile> | Get multi-user profile using user token | | getAccountInfo() | Promise<AccountItem> | Get account info based on given token | | listAccountProfiles() | Promise<ListAccountProfilesResult> | List account multi-user profiles | | listProfiles(params: ListProfilesParams) | Promise<ListProfilesResult> | List profiles with ability for partial match by email, username or match by id. | | listUsersAdvanced(params: ListUsersAdvancedParams) | Promise<UserAdvanced[]> | List users with profile information | | getProfileByEmail(email: string) | Promise<AccountProfile> | Get profile by email | | getProfileById(profileId: string) | Promise<Profile> | Get multi-user profile by Id | | getProfile() | Promise<Profile> | Get profile | | attachProfile(params: AttachParams) | Promise<AttachResult> | Attach profile. | | listProfileUsers() | Promise<List<ProfileUserItem>> | List profiles users. | | getCurrentUser() | Promise<TokenData> | Get current user | | getUserEmail(userId?: string) | Promise<{ email: string; }> | Get profile email if exists or user email | | deleteUser(userId: string, accountId?: string) | Promise<void> | Delete a user from account | | updateUser(userId: string, user: UpdateUserParam, accountId?: string) | Promise<void> | Update user | | requestForceChangePassword(userId: string, multi?: boolean) | Promise<void> | Request force change password for user | | disableUser(userId: string, accountId?: string) | Promise<void> | Disable user | | enableUser(userId: string, accountId?: string) | Promise<void> | Enable user | | createUserWithMulti(userData: CreateUserWithMultData, accountId = this.targetAccountId) | Promise<CreateUserWithMultResult> | Initiate the creation of the multi-user | | userListProfileAccounts() | Promise<ProfileAccountItem[]> | List accounts by profile | | listAccounts(params: ListAccountsParams = {}) | Promise<ListAccountsResult> | List accounts (super admin only) | | upsertMultiUser(params: UpsertMultiUserParams) | Promise<UpsertMultiUserResult> | Upsert multi-user. |

More detail

Full signatures and exported types are available in src/ and dist/types/.

Exported utility reference

| Function | Returns | Purpose | |---|---|---| | okRes(data: JsonBodyType, status = 200) | unknown | Exported utility; see its TypeScript signature for behavior. | | errorRes(errorMessage: string, status = 500) | unknown | Exported utility; see its TypeScript signature for behavior. |