Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

elarian

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elarian

Elarian JavaScript SDK

  • 0.2.22
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by133.33%
Maintainers
2
Weekly downloads
 
Created
Source

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


// on node
const { Elarian }  = require('elarian');
/*
or in the browser
<script src="web.js"></script>
// or import { Elarian } from 'elarian/web'
*/

// ...

const elarian = new Elarian({
    apiKey: 'YOUR_API_KEY', // or authToken: 'YOUR_AUTH_TOKEN'
    orgId: 'YOUR_ORG_ID',
    appId: 'YOUR_APP_ID',
});

elarian
    .on('connected', async () => {
        console.log('App is running!');
        const customer = new elarian.Customer({ number: '+XXXXXXXXXXXX', provider: 'cellular' });
        
        const state = await customer.getState();
        console.log(state);

        await customer.updateMetadata({ name: 'alice', age: 25 });
        const { name } = await customer.getMetadata();
        
        await customer.sendMessage({ number: 'MyAPP', channel: 'sms' }, { body: { text: `Hi ${name}, how are you?` }});
    })
    .on('error', (error) => {
        console.error(error);
    })
    .connect();

See example for a full sample app.

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.

Issues

If you find a bug, please file an issue on our issue tracker on GitHub.

Known Issues

  • resumable connection options prevents app from connecting

Keywords

FAQs

Package last updated on 12 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc