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

@onehorizon/sdk-js

v0.0.5

Published

Node.js SDK for One Horizon

Readme

@onehorizon/sdk-js

npm version license

Node.js SDK for One Horizon. Provides fully-typed API clients for managing tasks, workspaces, and teams — generated from the One Horizon OpenAPI spec. Works in Node.js and in bundlers (Webpack, Browserify), with CommonJS and ES module support.

Install

npm install @onehorizon/sdk-js
yarn add @onehorizon/sdk-js
pnpm add @onehorizon/sdk-js

Quick start

import { Configuration, GatewayApi } from '@onehorizon/sdk-js'

const config = new Configuration({
  basePath: 'https://api.onehorizon.ai',
  accessToken: '<your-access-token>'
})

const gateway = new GatewayApi(config)

// List workspaces
const { workspaces } = await gateway.listWorkspaces()
const workspaceId = workspaces[0].workspaceId

// List your active tasks
const { tasks } = await gateway.listPlannedTasks({ workspaceId })

// Fetch a single task
const task = await gateway.fetchTask({ workspaceId, taskId: 'tsk_...' })

// Create a task
const created = await gateway.createTask({
  workspaceId,
  task: { title: 'New task', kind: 'task' }
})

// Update a task
await gateway.updateTask({
  workspaceId,
  taskId: created.taskId,
  task: { status: 'in_progress' }
})

Authentication

The accessToken in Configuration must be a valid One Horizon OAuth access token. Obtain one through the One Horizon auth flow — see the authentication docs for details.

Token refresh is the caller's responsibility. Pass an async function if you need dynamic token resolution:

const config = new Configuration({
  basePath: 'https://api.onehorizon.ai',
  accessToken: async () => await getAccessToken() // called per request
})

API reference

GatewayApi

Main API for tasks, workspaces, teams, and users.

| Method | Description | | --- | --- | | listWorkspaces() | List workspaces the authenticated user can access | | listTasks({ workspaceId, ... }) | List tasks with optional status, type, and team filters | | listPlannedTasks({ workspaceId }) | Active planned and in-progress tasks | | listBlockedTasks({ workspaceId }) | Blocked tasks | | listCompletedTasks({ workspaceId }) | Completed tasks in a date range | | fetchTask({ workspaceId, taskId }) | Fetch a single task by ID | | createTask({ workspaceId, task }) | Create a task | | updateTask({ workspaceId, taskId, task }) | Update a task | | deleteTask({ workspaceId, taskId }) | Delete a task | | fetchDocument({ workspaceId, documentId }) | Fetch a task's rich-text document body | | listTeams({ workspaceId }) | List teams in a workspace | | listWorkspaceUsers({ workspaceId }) | List users in a workspace | | listTeamUsers({ workspaceId, teamId }) | List users that are members of a team (includes role) | | fetchUserMe({ workspaceId }) | Get the current authenticated user | | updateUserMeSettings({ workspaceId, userSettingsPatch }) | Update current user settings |

AuthApi

import { Configuration, AuthApi } from '@onehorizon/sdk-js'

const auth = new AuthApi(config)
const user = await auth.getUser() // AuthUser — id, email, user metadata

| Method | Description | | --- | --- | | getUser() | Get the authenticated user from the auth service |

TypeScript

Types are bundled with the package — no separate @types package needed.

Key types:

import type {
  Task,
  TaskStatus,
  TaskKind,
  Workspace,
  Team,
  User,
  TeamRole,
  UserSettings,
  Pagination
} from '@onehorizon/sdk-js'

TaskStatus values: open · planned · in_progress · in_review · blocked · completed · cancelled · merged · idea

TaskKind values: task · bug · initiative

Requirements

  • Node.js 20 or newer

Links

License

MIT — see LICENSE