A framework that helps you build scalable, personalized customer engagement applications.
You can install the package from npm by running:
$ npm install elarian@latest
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' });
For detailed info on this SDK, see the reference.
Run all tests:
$ npm install
$ npm test
See SDK Spec for reference.
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.
If you find a bug, please file an issue on our issue tracker on GitHub.
- Missing partial state updates
- Missing consent event notifications
- Missing sendMessage() and collectPayment() implementations