elarian
v0.5.6
Published
Elarian JavaScript SDK
Downloads
15
Readme
Elarian
A framework that helps you build scalable, personalized customer engagement applications.
Install
You can install the package from npm by running:
$ npm install elarian@latest
Usage
const { initializeClient } = require('elarian');
// ...
const elarian = await initializeClient({
token: 'YOUR_TOKEN',
appId: 'YOUR_APP_ID',
});
elarian.on('consentDenied', (userId) => {
// ...
});
elarian.on('consentGranted', (userId, data) => {
// ...
});
const { state } = await elarian.fetchAppState();
await elarian.updateAppState(Buffer.from('abc'));
await elarian.sendMessage('Hello test');
await elarian.collectPayment({ amount: 10, currency: 'UGX' });
Documentation
For detailed info on this SDK, see the reference.
Development
Run all tests:
$ npm install
$ npm test
See SDK Spec for reference.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Read the contribution guide for more information.
Issues
If you find a bug, please file an issue on our issue tracker on GitHub.
Known Issues
- Missing partial state updates
- Missing consent event notifications
- Missing sendMessage() and collectPayment() implementations