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

@saysimple/node-sdk

v0.0.17

Published

The official SaySimple Node SDK. Want to use our awesome customer conversations platform? Please visit: https://saysimple.com

Downloads

155

Readme

SaySimple SDK for JavaScript

We’re Saysimple — the Messaging Platform Pioneer — and we’re on a mission to change customer service centers into commercial profit centers. We’re turning social messaging channels that are used for personal communication into powerful communication channels for any kind of business, providing conversational excellence with unrivaled ease.

And this, is our SDK for JavaScript for you.

Installation

For NPM

npm i @saysimple/node-sdk

For Yarn

yarn add @saysimple/node-sdk

Usage

API Documentation 📑

The SDK is a one-on-one translation of the native REST API, which can be found here.
You can get a more in-depth knowledge of the API and the possible parameters if you read the API documentation.

Intelligence V1 👩🏻‍🔬

Initialization

const SaySimpleClient = require("@saysimple/node-sdk");
const Intelligence = SaySimpleClient.Intelligence.V1("[API TOKEN]", "[SECRET KEY]");
// Or:
const Intelligence = SaySimpleClient.Intelligence.Latest("[API TOKEN]", "[SECRET KEY]");  

If you omit a secret key, the SDK will assume you put a valid access token directly on the first parameter.

Functions

| Function | Parameters | |----------|------------| | addMessage | See Add A Message in the API Docs | | getMessagesSummed | See Total Messages Summed in the API Docs | | getActiveContactsSummed | See Total Active Contacts in the API Docs | | getActiveContactsDistribution| See Total Active Contacts Distribution in the API Docs | | getSendPaidTemplatesSummed | See Total Paid Templates Sent in the API Docs | | getAgents | See List all Agents in the API Docs | | getChannels | See List all Channels in the API Docs | | getTags| See List all Tags in the API Docs | | getTeams | See List all Teams in the API Docs | | getMessageDistribution | See Message Distribution in the API Docs | | getConversationsResolved | See Total Resolved Conversations in the API Docs | | getConversationsResolveTimesAverage | See Get Conversations Resolve Times (Average) in the API Docs | | getConversationsResolveTimesMedian | See Get Conversations Resolve Times (Median) in the API Docs | | resolveConversation | See Resolve a Conversation in the API Docs | | getConversationsFirstReplyTimesAverage | See Get Conversations Reply Times (Average) in the API Docs | | getConversationsFirstReplyTimesMedian | See Get Conversations Reply Times (Median) in the API Docs | | getConversationsFirstReplyTimesBusinessHoursAverage | See Get Conversations Reply Times During Business Hours (Average) in the API Docs | | getConversationsFirstReplyTimesBusinessHoursMedian | See Get Conversations Reply Times During Business Hours (Median) in the API Docs | | getConversationsMessagesAverage | See Average Messages per Conversation in the API Docs | | getConversationsTagsUsed | See Conversations Tags Used in the API Docs | | getMessagesResponseTimesAverage | See Response Times (Average) in the API Docs |

To get all messages summed you can run the following code

const SaySimpleClient = require("@saysimple/node-sdk");
const Intelligence = SaySimpleClient.Intelligence.V1("[API TOKEN]", "[SECRET KEY]");

(async () => {
    const messagesSummed = await Intelligence.getMessagesSummed({
        agent: "[email protected]"
    });

    console.log(messagesSummed);
})();

That's it! 🚀

Messaging V1 💌

Will be implemented as soon as possible.
For now please refer to the API documentation.

Showcasing 🎭

We are really keen to know what you build with SaySimple, so please do let us know when your project is up-and-running!

TypeScript support ⌨️

This package exports type declarations, thus it can be used in TypeScript projects without requiring extra dependencies.

Support 🧞

We tried to make the API and SDK as easy as possible, but maybe we didn't succeed on every aspect of it. Please don't hesitate to contact us if something is not working or is unclear.

You can reach us at: [email protected].

Raising an issue 🤕

If you encounter a bug in this software we'd love to hear about it. So we can work on improving our SDK, and your developer experience.

Please be sure you've searched for the same problem in the tickets opened already. Also, it would be helpful if you can provide as many details as possible. Like the versions of the SDK and Node.js and how your (environment) set up is.

License 🕵🏽‍♀️

This software is distributed under the Apache License 2.0 license. See LICENSE.txt.

Copyright 2019 - 2021 Just Internet B.V. or its affiliates. All Rights Reserved.