Home

Elarian

NPM

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();
const data = JSON.parse(state.toString());
await elarian.updateAppState(Buffer.from(JSON.stringify({ ...data, status: 'good boy' })));

Documentation

Take a look at the product 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