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

@bambulabs/node-simpra

v0.0.5

Published

Node.js wrapper for Simpra API

Downloads

2

Readme

NPM version

node-simpra

Simple Node.js wrapper for Simpra API.

Getting Started

Installation


npm install node-simpra

Setup

Basically require node-simpra and create a new instance with new NodeSimpra().

If you have all of your credentials, you can use new NodeSimpra(token) initialization to access all functions.

If you already have your token, then you can create instance using new NodeSimpra(token) OR you can set token using simpra.setToken(token).

Example


const NodeSimpra = require("node-simpra");
..
const simpra = new NodeSimpra(token);
// OR
const simpra = new NodeSimpra();
simpra.setToken(token);

Filtering

You can find more information about allowed filters in detail pages. For LIST functions, you can pass a filter object for filtering.

Example

const menu_items = await simpra.menu_items.list({
  page: 1,
  per_page_50,
  status: "active"
});

Available Functions

| Endpoint | Function | Usage | Detail | | -------------------- | -------- | -------------------------------------------------------------- | ----------------------------------------------------------- | | Checks | LIST | checks.list() | https://developers.simpra.app/#checks | | Checks | GET | checks.get(id) | https://developers.simpra.app/#checks | | Checks | CREATE | checks.create() | https://developers.simpra.app/#checks-create | | Check Item | CREATE | check_item.create(check_id, payload) | https://developers.simpra.app/#checks-create-item | | Check Payment | CREATE | check_payment.create(check_id, payload) | https://developers.simpra.app/#checks-add-payment | | Check Item | CANCEL | check_item.cancel(check_id, check_item_id, payload) | https://developers.simpra.app/#checks-cancel-item | | Check Discount | CREATE | check_discount.create(check_id, payload) | https://developers.simpra.app/#checks-add-discount | | Check Discount | DELETE | check_discount.delete(check_id, check_discount_id) | https://developers.simpra.app/#checks-remove-discount | | Check Service Charge | CREATE | check_service_charge.create(check_id, payload) | https://developers.simpra.app/#checks-add-service-charge | | Check Service Charge | DELETE | check_service_charge.delete(check_id, check_service_charge_id) | https://developers.simpra.app/#checks-remove-service-charge | | Menu Items | LIST | menu_items.list() | https://developers.simpra.app/#menu-items | | Menu Item Groups | LIST | menu_item_groups.list() | https://developers.simpra.app/#get-menu-item-groups | | Condiments | LIST | condiments.list() | https://developers.simpra.app/#condiment-groups | | Condiment Groups | LIST | condiment_groups.list() | https://developers.simpra.app/#condiment-groups | | Sales Channels | LIST | sales_channels.list() | https://developers.simpra.app/#get-sales-channels | | Revenue Centers | LIST | revenue_centers.list() | https://developers.simpra.app/#revenue-centers | | Tables | LIST | tables.list() | https://developers.simpra.app/#tables | | Employees | LIST | employees.list() | https://developers.simpra.app/#employees | | Discounts | LIST | discounts.list() | https://developers.simpra.app/#discounts | | Service Charges | LIST | service_charges.list() | https://developers.simpra.app/#service-charges | | Taxes | LIST | taxes.list() | https://developers.simpra.app/#taxes | | Payment Types | LIST | payment_types.list() | https://developers.simpra.app/#payment-types | | Currencies | LIST | currencies.list() | https://developers.simpra.app/#currencies | | Customers | LIST | customers.list() | https://developers.simpra.app/#customers |

Contributing

License

This project is licensed under the MIT License - see the LICENSE.md file for details.