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

neeramoy-sdk

v0.10.1

Published

A TypeScript SDK providing all backend functionality, including authentication, for the Neeramoy desktop application.

Downloads

234

Readme

TypeScript SDK for Neeramoy

A TypeScript/Node.js SDK for interacting with the Neeramoy Platform API.
This SDK provides resource classes and helper utilities for accessing clinics, doctors, appointments, dashboards, authentication, and user management.


Table of Contents


Features

  • TypeScript first: Full typings, interfaces, and inline docs.
  • Modular resources: Access clinics, doctors, appointments, dashboards, users, and authentication as separate modules.
  • Built-in authentication: AWS Cognito-based OTP login, plus helpers for session handling.
  • Central configuration: Set API URLs and authentication in one place.
  • Flexible: Override headers, endpoints, and options as needed per request.
  • Real-world examples: See the examples/ directory for ready-to-run usage.

Installation

npm install neeramoy-sdk
# or
yarn add neeramoy-sdk

Usage

Library Setup

import { Library, LibraryConfig } from 'neeramoy-sdk';

const sdkConfig: LibraryConfig = {
  baseUrl: 'https://your-api-base-url',
  chatUrl: 'https://your-chat-url',
  cloudFunctionUrl: 'https://your-cloud-function-url',
  auth: {
    userPoolId: 'your-cognito-user-pool-id',
    userPoolClientId: 'your-cognito-client-id',
    identityPoolId: 'your-cognito-identity-pool-id',
    region: 'your-aws-region'
  }
};

const sdk = new Library(sdkConfig);

Authentication

Authenticate a user using OTP (one-time password) via AWS Cognito:

import promptSync from 'prompt-sync';
const prompt = promptSync();

const username = prompt('Enter your phone number (with country code): ');
const signInResult = await sdk.auth.signInWithOtp({ username });
console.log("OTP Sign-In Response:", signInResult);

if (signInResult.nextStep) {
  const confirmationCode = prompt('Enter the OTP you received: ');
  const confirmResult = await sdk.auth.confirmOtp({ username, confirmationCode });
  console.log("Confirm OTP Response:", confirmResult);
}

const user = await sdk.auth.getCurrentUser();
console.log('Authenticated user:', user);

Resource Usage Examples

Clinic

import { ClinicResource } from './src/resources/clinic/ClinicResource';

const clinicResource = new ClinicResource(sdk);
const clinicId = 'your-clinic-id';

const clinic = await clinicResource.getClinicById(clinicId);
console.log('Clinic profile:', clinic);

Doctor

import { DoctorResource } from './src/resources/doctor/DoctorResource';

const doctorResource = new DoctorResource(sdk);

// Get doctor profile by ID
const profile = await doctorResource.getDoctorProfile('doctor-id');

// Search doctors
const params = { /* see DoctorSearchParams interface */ };
const searchResults = await doctorResource.searchDoctors(params);

// Get doctor settings at a specific clinic
const settings = await doctorResource.getDoctorClinicSettings('doctor-id', 'clinic-id');

Appointments

import { AppointmentResource } from './src/resources/appointment/AppointmentResource';

const appointmentResource = new AppointmentResource(sdk);
// Example: Get available appointments
const available = await appointmentResource.getAvailableAppointments('doctor-id', 'clinic-id');

Dashboard

import { DashboardResource } from './src/resources/dashboard/DashboardResource';

const dashboardResource = new DashboardResource(sdk);
const dashboard = await dashboardResource.getDashboardByClinicId('clinic-id', 'doctor-id', 'access-token');
console.log('Dashboard data:', dashboard);

User

Public search by username

import { UserResource } from './src/resources/user/UserResource';

const userResource = new UserResource(sdk);
const user = await userResource.getUserDetails('+8801xxxxxxxxxx'); // Replace with actual phone number
console.log(user);

Get current user details (requires access token)

const accessToken = 'your-access-token';
const currentUser = await userResource.getCurrentUserDetails({
  headers: { Authorization: `Bearer ${accessToken}` }
});
console.log(currentUser);

Project Structure

.
├── examples/                           # Example usage scripts
│   ├── getUserByUsername.ts
│   ├── getCurrentUserDetails.ts
│   ├── getClinicDetail.ts
│   ├── getDoctorProfile.ts
│   ├── searchDoctors.ts
│   ├── testOtpLogin.ts
│   └── ...
│
├── src/
│   ├── index.ts                        # Library class, SDK entry
│   ├── resources/
│   │   ├── appointment/
│   │   ├── auth/
│   │   ├── clinic/
│   │   ├── dashboard/
│   │   ├── doctor/
│   │   ├── user/
│   │   └── base.ts
│   └── types/                          # Shared types/interfaces (optional)
│
├── package.json
├── tsconfig.json
├── README.md
├── .env                                # For secrets in local development
└── ...

Testing

  • Run example scripts in the examples/ directory with Node.js.
  • Make sure to set up your .env file for any secrets or credentials required by the examples.
  • For unit/integration tests, consider using Jest or Mocha.
  • Follow best practices for security: never commit sensitive keys or credentials.

Contributing

  1. Fork this repository.
  2. Create your feature branch (git checkout -b feature/my-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/my-feature).
  5. Open a pull request.

Code Style:

  • Follow TypeScript best practices.
  • Use consistent naming and folder structure.
  • Write clear JSDoc comments.

Support

For questions, suggestions, or bugs, please open an issue.