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

@odecloud/sdk

v0.2.0

Published

Official Node.js SDK for the OdeCloud API

Downloads

19

Readme

@odecloud/sdk

Official Node.js/TypeScript SDK for the OdeCloud API.

Installation

npm install @odecloud/sdk

Quick Start

import { OdeCloud } from '@odecloud/sdk';

const client = new OdeCloud({
  apiKey: 'ode_live_...',
});

// Get your profile
const profile = await client.profile.get();
console.log(`Hello, ${profile.firstName}!`);

// List projects
const projects = await client.projects.list();
for (const project of projects.data) {
  console.log(project.title);
}

// Find tasks for a project
const tasks = await client.projects.listTasks(projects.data[0]._id);
const task = tasks.data[0];

// Log time against a task
const now = Date.now();
const entry = await client.timeEntries.create({
  taskId: task._id,
  times: [{ startedAt: now - 3600000, endedAt: now }],
  billable: true,
  notes: 'Worked on feature implementation',
});

Configuration

const client = new OdeCloud({
  apiKey: 'ode_live_...',                                        // Required
  baseUrl: 'https://server.odecloud.app/api/v1/public',         // Optional (default shown)
  timeout: 30000,                                                 // Optional (ms, default: 30000)
  maxRetries: 3,                                                  // Optional (default: 3)
});

Time Entries

// List time entries with filters
const entries = await client.timeEntries.list({
  projectId: 'project-id',
  taskId: 'task-id',
  startDate: '2026-01-01',
  endDate: '2026-01-31',
  billable: true,
  page: 1,
  pageSize: 50,
});

// Get a single entry
const entry = await client.timeEntries.get('entry-id');

// Create a time entry
const newEntry = await client.timeEntries.create({
  taskId: 'task-id',
  times: [
    { startedAt: 1706360400000, endedAt: 1706364000000 },
  ],
  billable: true,
  notes: 'Implemented new feature',
});

// Update a time entry
const updated = await client.timeEntries.update('entry-id', {
  notes: 'Updated notes',
  billable: false,
});

// Delete a time entry
await client.timeEntries.delete('entry-id');

// Get summary for a date range
const summary = await client.timeEntries.summary({
  startDate: '2026-01-01',
  endDate: '2026-01-31',
  projectId: 'project-id', // optional
});

console.log(`Total: ${summary.totalTimeHours}h`);
console.log(`Billable: ${summary.billableTimeHours}h`);
console.log(`Entries: ${summary.entryCount}`);

Projects

// List projects
const projects = await client.projects.list({
  search: 'JVCKenwood',
  page: 1,
  pageSize: 50,
});

// Get project details (includes members)
const project = await client.projects.get('project-id');
console.log(`${project.title} — ${project.members.length} members`);

// List tasks for a project
const tasks = await client.projects.listTasks('project-id', {
  status: 'active',
});

for (const task of tasks.data) {
  const hours = (task.currentTime / 3600000).toFixed(1);
  console.log(`${task.title}: ${hours}h tracked`);
}

Profile

// Get your profile
const profile = await client.profile.get();
console.log(profile.firstName, profile.lastName);
console.log(profile.email);

// Update your profile
await client.profile.update({
  tagline: 'Senior Developer',
  location: 'New York, NY',
  socialLinks: {
    linkedin: 'https://linkedin.com/in/johndoe',
    github: 'https://github.com/johndoe',
  },
});

Pagination

// Manual pagination
const page1 = await client.timeEntries.list({ page: 1, pageSize: 100 });
console.log(`Page 1: ${page1.data.length} entries, hasNext: ${page1.hasNextPage}`);

// Auto-pagination (recommended)
for await (const entry of client.timeEntries.listAutoPaginate()) {
  console.log(entry.notes);
}

// Collect all items into an array
import { collectAll } from '@odecloud/sdk';

const allEntries = await collectAll(client.timeEntries.listAutoPaginate());
console.log(`Total entries: ${allEntries.length}`);

Error Handling

import {
  OdeCloud,
  OdeCloudError,
  AuthenticationError,
  NotFoundError,
  RateLimitError,
} from '@odecloud/sdk';

try {
  await client.timeEntries.get('invalid-id');
} catch (error) {
  if (error instanceof AuthenticationError) {
    console.error('Invalid API key');
  } else if (error instanceof NotFoundError) {
    console.error('Entry not found');
  } else if (error instanceof RateLimitError) {
    console.error(`Rate limited. Retry after ${error.retryAfter}s`);
  } else if (error instanceof OdeCloudError) {
    console.error(`API error [${error.statusCode}]: ${error.message}`);
  }
}

API Scopes

| Scope | Description | |-------|-------------| | time:read | Read time entries and summaries | | time:write | Create, update, delete time entries | | projects:read | Read projects and tasks | | clients:read | Read organizations/clients | | profile:read | Read your profile | | profile:write | Update your profile |

Requirements

  • Node.js 18+
  • TypeScript 4.7+ (if using TypeScript)

License

MIT