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

@releai/rb-node-sdk

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@releai/rb-node-sdk

RELE.AI Node SDK provides a simple interface to manage integrated applications

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
3
Weekly downloads
 
Created
Source

RELE.AI Node SDK

RELE.AI Node SDK provides an easy interface to manage, create, and integrate applications to Clara.

Create Application

Please visit: https://github.com/rele-ai/cli

Client Usage Examples

const { RBC } = require("@releai/rb-node-sdk")

// Initiate new releai bot client.
const rbc = new RBC({
    appId,
    appHash,
    host,
    port,
})

// send notification to endpoint
const response = await rbc.notify(
    // send the operation key
    "new_contact",

    // send the payload
    {
        "foo": {
            "bar": 1
        }
    },

    // send additional headers
    {
        "example-header-key": "value"
    }
)

// handle output - JSON
console.log(response)

REST Formatter Example

const { format } = require("@releai/rb-node-sdk")

// format payload to gRPC struct format
const payload = format({
    // payload
})

Server Usage Example

const { RBS } = require("@releai/rb-node-sdk")

// initiate the bot server
const rbs = new RBS({
    appId,
    appHash,
})

// Register operation handler for a given operation
rbs.registerOperation("record_note", async (req, res) => {
    // do some logic here...

    // reply with the payload data
    res.send(200, {
        // response payload
    })
})

// run server
rbs.listen(50003)

Keywords

FAQs

Package last updated on 05 Aug 2021

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