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

@voicify/voicify-sdk-cms

v3.4.0

Published

Generated client for the Voicify CMS

Downloads

48

Readme

Introduction

This project includes the models and API methods for interacting with the Voicify CMS API for JavaScript and TypeScript.

Getting Started

You can install the package from npm:

npm i -s @voicify/voicify-sdk-cms

If you're using TypeScript, all the types are included, so you don't need to install any additional packages.

Each service has its own API class, factory, or functional composer to use in order to make requests against it.

Authentication

Currently, you'll need to authenticate an API user against your Voicify organization to get an Access token to start making requests against the API.

To do this, you can create a new AuthenticationApi client and then send a request to authenticate your API account:

var authClient = new AuthenticationApi({basePath: "https://cms.voicify.com"});

var tokenInfo = await authClient.authenticate("your-organization-id", "your-organization-secret", "password", "your-api-user-name", "your-api-user-password");
var accessToken = tokenInfo.accessToken;

// you can also refresh your token
var refreshedTokenInfo = await authClient.authenticate("your-organization-id", "your-organization-secret", "refresh_token", "your-api-user-name", null, "your-refresh-token");
var newAccessToken = refreshedTokenInfo.accessToken;

// these access tokens are used on subsequent requests to the API

Making Requests

Once you have an access token, you can start to make requests against your organization and the apps within it. For example, we can use the previous accessToken variable to authenticate and create a new welcome message.

var welcomeMessageClient = new WelcomeMessageApi({
    basePath = "https://cms.voicify.com",
    apiKey = `Bearer ${accessToken}` 
    }
});
const newWelcomeMessage = await welcomeMessageClient.createFullContentItem({
    title: "New welcome message",
    applicationId: "an-app-id",
    applicationFeatureId: "an-app-feature-id",
    content: "Welcome to my app! I made this from the Voicify SDK!"
});

Voicify Partners and Customers can also check out the extended documentation and details at https://support.voicify.com

Contributing

The Voicify core development team owns this repo and NuGet package, but all Voicify developers are welcome to contribute changes. Before contributing, please create an issue that you can track your PRs against and be sure there is not already a PR open for it.

Build and Test

There are some steps to autogenerate the TypeScript models from the swagger API models that Voicify outputs.

Generate Models from Swagger

Sample:

java -jar swagger-codegen-cli.jar generate -i http://cms.voicify.com/swagger/v1/swagger.json -l typescript-fetch -c ../typescript-options.json -o ../../src/generated

Build output

Navigate to the generated folder where the package.json is and run:

npm install

then

npm run build