saasify-sdk

1.20.0 • Public • Published

Saasify Logo

saasify-sdk

Client-side iframe embedding SDK for Saasify.

NPM Build Status JavaScript Style Guide

Note: this package is meant exclusively for embedding custom UI in your SaaS client's authenticated dashboard via an iFrame.

Install

npm install --save saasify-sdk

Usage

Initialize the SDK within your project's iframe. The SDK will connect to the parent SaaS client window and expose all the information you need to build custom UI on top of your Saasify API for your authenticated users.

const SaasifySDK = require('saasify-sdk')
 
const sdk = new SaasifySDK({ projectId: 'dev/hello-world' })
await sdk.ready
 
console.log(sdk.deployment)
console.log(sdk.project)
console.log(sdk.consumer)
 
// call authenticated methods on your project's API
const { body } = await sdk.api.call({ url: '/endpoint', method: 'GET' })

License

MIT © Saasify

Package Sidebar

Install

npm i saasify-sdk

Weekly Downloads

5

Version

1.20.0

License

MIT

Unpacked Size

7.06 kB

Total Files

5

Last publish

Collaborators

  • chrisvxd
  • fisch0920