saasify-sdk
v1.20.0
Published
Client-side iframe embedding SDK for Saasify.
Downloads
36
Readme
saasify-sdk
Client-side iframe embedding SDK for Saasify.
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