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 🙏

© 2024 – Pkg Stats / Ryan Hefner

slotify-sdk

v1.0.3

Published

JavaScript SDK for Slotify scheduling API, providing easy-to-use endpoints for scheduling, booking, and managing appointments.

Downloads

20

Readme

Slotify Javascript SDK

The Slotify SDK is a TypeScript-based API client designed to simplify interactions with the Slotify scheduling app API. It provides a flexible and easy-to-use interface for making HTTP requests, managing configurations, and handling API responses, tailored specifically for Slotify's scheduling features.

Dependencies

The following libraries are bundled together with the SDK:

Features

  • Configurable Base URL and API Version: Easily set the base URL, API version, and other global configurations.
  • CRUD Operations: Perform Create, Read, Update, and Delete operations on Slotify resources like bookings.
  • Method Chaining: Chain methods for building complex queries with ease.
  • Include Related Data: Fetch related data (e.g., users, events) with a single request.
  • Built-in Axios Integration: Powered by Axios for handling HTTP requests.

Installation

The library is hosted on NPM, so you can simply run:


# using npm
npm install slotify-sdk

# using yarn
yarn add slotify-sdk

# using bun
bun add slotify-sdk

Module loading

Using api key, you can access app level data only. You can not use same key for multiple apps.

import SlotifyAPI from 'slotify-sdk';

const slotifyApi = new SlotifyAPI({
  apiKey: '8c99a81c-dcbb-4de3-b316-f43b8a902cae',
});

Usage (endpoints)

Documentation : https://slotify.ca/api

Endpoints/methods:

  // app endpoints
  slotifyApi.getApps(params: any): Promise<any>;

  // customer endpoints
  slotifyApi.getCustomers(): Promise<any>;
  slotifyApi.getCustomer(uuid: string): Promise<any>;
  slotifyApi.createCustomer(params: any): Promise<any>;
  slotifyApi.deleteCustomer(uuid: string): Promise<any>;
  slotifyApi.updateCustomer(uuid: string, params?: any): Promise<any>;

  // groups endpoints
  slotifyApi.getGroups(): Promise<any>;
  slotifyApi.getGroup(uuid: string): Promise<any>;
  slotifyApi.createGroup(params: any): Promise<any>;
  slotifyApi.deleteGroup(uuid: string): Promise<any>;
  slotifyApi.updateGroup(uuid: string, params?: any): Promise<any>;

  // resource endpoints
  slotifyApi.getResources(): Promise<any>;
  slotifyApi.getResource(uuid: string): Promise<any>;
  slotifyApi.createResource(params: any): Promise<any>;
  slotifyApi.deleteResource(uuid: string): Promise<any>;
  slotifyApi.updateResource(uuid: string, params?: any): Promise<any>;

  // scheduler endpoints
  slotifyApi.getSchedulers(): Promise<any>;
  slotifyApi.getScheduler(uuid: string): Promise<any>;
  slotifyApi.createScheduler(params: any): Promise<any>;
  slotifyApi.deleteScheduler(uuid: string): Promise<any>;
  slotifyApi.updateScheduler(uuid: string, params?: any): Promise<any>;

  // booking endpoints
  slotifyApi.getBookings(): Promise<any>;
  slotifyApi.getBooking(uuid: string): Promise<any>;
  slotifyApi.createBooking(params: any): Promise<any>;
  slotifyApi.deleteBooking(uuid: string): Promise<any>;
  slotifyApi.updateBooking(uuid: string, params?: any): Promise<any>;

  // booking actions endpoints
  slotifyApi.completeBooking(uuid: string): Promise<any>;
  slotifyApi.bookCustomer(uuid: string, params: any): Promise<any>;
  slotifyApi.confirmBooking(uuid: string, params: any): Promise<any>;
  slotifyApi.declineBooking(uuid: string, params: any): Promise<any>;
  slotifyApi.reassignBooking(uuid: string, params: any): Promise<any>;
  slotifyApi.cancelBookingByCustomer(uuid: string, params: any): Promise<any>;
  slotifyApi.cancelBookingByResource(uuid: string, params: any): Promise<any>;
  slotifyApi.rescheduleBookingByCustomer(uuid: string, params: any): Promise<any>;

  // event endpoints
  slotifyApi.getEvents(): Promise<any>;
  slotifyApi.getEvent(uuid: string): Promise<any>;
  slotifyApi.createEvent(params: any): Promise<any>;
  slotifyApi.deleteEvent(uuid: string): Promise<any>;
  slotifyApi.updateEvent(uuid: string, params?: any): Promise<any>;

  // service endpoints
  slotifyApi.getServices(): Promise<any>;
  slotifyApi.getService(uuid: string): Promise<any>;
  slotifyApi.createService(params: any): Promise<any>;
  slotifyApi.deleteService(uuid: string): Promise<any>;
  slotifyApi.updateService(uuid: string, params?: any): Promise<any>;

  // workflow endpoints
  slotifyApi.getWorkflows(): Promise<any>;
  slotifyApi.getWorkflow(uuid: string): Promise<any>;
  slotifyApi.createWorkflow(params: any): Promise<any>;
  slotifyApi.deleteWorkflow(uuid: string): Promise<any>;
  slotifyApi.updateWorkflow(uuid: string, params?: any): Promise<any>;

  // availability endpoints
  slotifyApi.getAvailability(params: any): Promise<any>;
  slotifyApi.getUnAvailability(params: any): Promise<any>;
  slotifyApi.getAvailabilityCount(params: any): Promise<any>;

Usage (dynamic includes)

Slotify supports dynamic includes

Example:

slotifyApi
  .include('customers', 'resources')
  .getBookings()
  .then(function (response) {
    console.log(response);
  });

Usage (query params)

If you want to use query params you can use it as below example. Check doc for more advance usage for search parameters.

Example:

slotifyApi
  .queryParams({
    limit: 10,
    search: 'name~:john',
  })
  .getCustomers()
  .then(function (response) {
    console.log(response);
  });