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

@25madisonhealth/careslate-scheduler

v0.1.3

Published

The official TypeScript SDK for interacting with the CareSlate Scheduler API. Provides convenient methods for accessing all API endpoints with TypeScript typings.

Readme

CareSlate Scheduler SDK

The official TypeScript SDK for interacting with the CareSlate Scheduler API.

This SDK provides convenient methods for accessing all API endpoints, along with TypeScript typings for requests and responses, and utility functions for common tasks.

Installation

You can install the SDK using npm, pnpm, or yarn:

npm:

npm install @25madisonhealth/careslate-scheduler

pnpm:

pnpm add @25madisonhealth/careslate-scheduler

yarn:

yarn add @25madisonhealth/careslate-scheduler

Getting Started

Initialization

First, import and instantiate the CareSlateApiClient, providing your API key. You can also optionally provide a custom baseUrl if you need to target a non-production environment (e.g., for local development or a staging server).

import { CareSlateApiClient } from '@25madisonhealth/careslate-scheduler';

const client = new CareSlateApiClient({
  apiKey: 'YOUR_API_KEY_HERE', // Replace with your actual API key
  // baseUrl: 'http://localhost:3001' // Optional: For local development
});

The client will automatically determine the correct base URL based on the process.env.ENVIRONMENT variable if baseUrl is not explicitly provided:

  • local: http://localhost:3001
  • dev: https://dev-303703761.us-central1.run.app
  • prod (or any other value/undefined): https://prod-303703761.us-central1.run.app

Making API Calls

The SDK methods are organized by resource. For example, to get account details:

import { CareSlateApiClient, Account, CareSlateApiError } from '@25madisonhealth/careslate-scheduler';

const client = new CareSlateApiClient({ apiKey: 'YOUR_API_KEY_HERE' });

async function main() {
  try {
    const myAccount: Account = await client.account.getAccount();
    console.log('My Account:', myAccount);

    // Example: Adding a user
    const newUser = await client.user.addUser({ name: 'Jane Doe' });
    console.log('New User:', newUser);
  } catch (error) {
    if (error instanceof CareSlateApiError) {
      console.error('API Error:', error.message, 'Status:', error.status, 'Data:', error.data);
    } else {
      console.error('Generic Error:', error);
    }
  }
}

main();

Using Utilities

The SDK also exports utility functions. For example, convertToLocalTime:

import { convertToLocalTime } from '@25madisonhealth/careslate-scheduler';

// Assuming you have an array of availability data from an API call
// This data structure should match what convertToLocalTime expects
const availabilityDataFromApi = [
  // ... your data from an endpoint like client.availability.getAllAvailability() ...
  // Example:
  // {
  //   userId: 'user123',
  //   availability: [
  //     {
  //       start: '2024-07-15T09:00:00.000Z', // UTC time from server
  //       end: '2024-07-15T17:00:00.000Z',   // UTC time from server
  //       timeZone: 'America/New_York',   // Original timezone
  //       offset: -240                    // Original offset in minutes for that specific time
  //     }
  //   ]
  // }
];

const localAvailability = convertToLocalTime(availabilityDataFromApi);
console.log('Availability in local time:', localAvailability);

Note: The convertToLocalTime function expects the input items to have timeZone and an offset (or originalItemOffset) property to correctly perform the "sticky" time conversion. Ensure your API responses used with this utility provide these fields.

API Documentation

For detailed information on all available SDK methods, parameters, and types, please refer to our TypeDoc API Documentation.

License

This SDK is MIT licensed.