0.11.18 • Published 1 year ago

@onvo-ai/node v0.11.18

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@onvo-ai/node

The @onvo-ai/node package provides utilities to seamlessly communicate with the Onvo platform, allowing developers to integrate AI-powered dashboards into their products. This README provides an overview of the package's features, installation, and usage instructions.

Installation

You can install the package using npm:

npm install @onvo-ai/node

OR

yarn add @onvo-ai/node

OR

bun install @onvo-ai/node

Getting Started

To begin using the @onvo-ai/node package, you'll need to have an API key from the Onvo platform. Ensure that your API key is stored as an environment variable named API_KEY.

Usage

Here's an example of how to use the package to interact with the Onvo platform:

const { Onvo } = require("@onvo-ai/node");

// Initialize the Onvo class with your API key
const onvo = new Onvo("https://dashboard.onvo.ai", process.env.API_KEY);

// Identify a user
await onvo.upsertEmbedUser("123456", {
  name: "John Appleseed",
  email: "john@appleseed.com",
  metadata: {
    phone_number: "+1 234 5678",
    organisation_id: "87dfty9872ydq8tg",
  },
});

// Create a session
const sessionUrl = await onvo.upsertDashboardSession({
  dashboardId: "ebc7ab74-3fd2-47e6-90df-addaec3a029e",
  userId: "123456",
  parameters: {
    year: 2023,
    sort: "asc",
  },
});

API Reference

new Onvo(baseUrl, apiKey) This is the main class that initializes the connection to the Onvo platform.

  • baseUrl (string): The base URL to the Onvo platform or your self hosted endpoint.
  • apiKey (string): Your API key for authentication.

await onvo.upsertEmbedUser(userId, userData) Identify a user on the Onvo platform.

  • userId (string): Unique identifier for the user.
  • userData (object)
    • name (string): Name of the user
    • email (string): Email id of the user
    • metadata: (object): Optional Additional data used to fetch the right data source

await onvo.upsertDashboardSession(sessionData) Create a session on the Onvo platform.

  • sessionData (object)
    • dashboardId (string): The unique identifier of the dashboard
    • userId (string): The id of user that was identified in the previous step
    • parameters (string): Optional Additional parameters used to fetch the right data source

Support

For any issues, questions, or feedback, please contact our support team at info@onvo.ai.

License

This package is distributed under the MIT License.

Thank you for choosing the @onvo-ai/node package to integrate AI-powered dashboards from the Onvo platform into your product! We hope this package enhances your development experience and empowers your applications with advanced analytics capabilities.

0.11.8

1 year ago

0.11.9

1 year ago

0.11.6

1 year ago

0.11.7

1 year ago

0.11.10

1 year ago

0.11.15

1 year ago

0.11.16

1 year ago

0.11.17

1 year ago

0.11.18

1 year ago

0.11.11

1 year ago

0.11.12

1 year ago

0.11.13

1 year ago

0.11.14

1 year ago

0.11.1

1 year ago

0.11.2

1 year ago

0.11.3

1 year ago

0.11.4

1 year ago

0.11.5

1 year ago

0.11.0

2 years ago

0.10.3

2 years ago

0.10.1

2 years ago

0.10.0

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago