npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@airinstitute/deepint-js-sdk

v1.0.35

Published

Deep Intelligence API calls

Downloads

16

Readme

Deep Intelligence Javascript SDK

This is a Node.js module available through the npm registry for connect with the Deep Intelligence's API.

This module lets you connect the platform Deep Intelligence,using their functions, to your projects. It encapsulates by means of functions the different calls to the API in order to obtain the required data from it.


✅ Install


npm i @airinstitute/deepint-js-sdk

🚩 Usage


You can import this package using the classic Javascript require or with import in the case you use Typescript as shown on the following examples:

Example Javascript 🔻


const deepint = require('@airinstitute/deepint-js-sdk');
deepint.getWorkspaces()
    .then(workspaces => {
        console.log(workspaces);
    })
    .catch(err => {
        console.log(err);
    });

Example Typescript 🔻


import * as deepint from '@airinstitute/deepint-js-sdk';
deepint.getWorkspaces()
    .then(workspaces => {
        console.log(workspaces);
    })
    .catch(err => {
        console.log(err);
    });

OR using desestructuring to get only the requested function

import {getWorkspaces} from '@airinstitute/deepint-js-sdk';
getWorkspaces()
    .then(workspaces => {
        console.log(workspaces);
    })
    .catch(err => {
        console.log(err);
    });

Functions 🔻


The module contains all API functions with a characteristic function name: 'methodAPI'+'groupAsociated'+'groupFunctions'+'informationFunction'. Eg: get+Workspace+Visualization+ById = getWorkspaceVisualizationById(params);.

Here there is a list of functions you can use:

  • Authentication

    • postLoginToken
    • postRevokeToken
  • Account

    • getProfile
    • getSession
  • Workspaces

    • getWorkspaces
    • postWorkspaces
    • postWorkspacesImport
    • getWorkspaceById
    • postWorkspaceById
    • deleteWorkspaceById
    • postIframe
    • postWorkspace
    • postWorkspaceClone
  • Tasks

    • getWorkspaceTasks
    • getWorkspaceTaskById
    • deleteWorkspaceTaskById
  • Sources

    • getWorkspaceSources
    • postWorkspaceSource
    • postSourceClone
    • postSourceDerived
    • postSourceExternal
    • postSourceOther
    • getWorkspaceSourceById
    • postWorkspaceSourceById
    • deleteWorkspaceSourceById
    • getConnectionSourceById
    • postConnectionSourceById
    • getAutoUpdateSourceById
    • postAutoUpdateSourceById
    • postTransformFeaturesSourcesById
    • getSourceInstances
    • postSourceInstances
    • deleteSourceInstances
    • postExternalSources
  • Models

    • getWorkspaceModels
    • postWorkspaceModels
    • getWorkspaceModelById
    • postWorkspaceModelById
    • deleteWorkspaceModelById
    • getModelEvaluation
    • getModelPredict
    • postModelBatchPredict
    • postModelPredict1d
  • Alerts

    • getWorkspaceAlerts
    • postWorkspaceAlerts
    • getWorkspaceAlertById
    • postWorkspaceAlertById
    • deleteWorkspaceAlertById
    • getWorkspaceAlertInstances
  • Emails

    • getWorkspaceEmails
    • postWorkspaceEmails
    • deleteWorkspaceEmailById
  • Visualizations

    • getWorkspaceVisualizations
    • postWorkspaceVisualizations
    • getWorkspaceVisualizationById
    • postWorkspaceVisualizationById
    • deleteWorkspaceVisualizationById
    • postCloneVisualizationById
  • Dashboards

    • getWorkspaces
    • postWorkspaces
    • postWorkspacesImport
    • getWorkspaceById
    • postWorkspaceById
    • deleteWorkspaceById
    • postIframe
    • postWorkspace
    • postWorkspaceClone

These functions work asynchronously, so they return a promise.

Configuration 🔻


To configure the module, set the following environment variables:

| Variable Name | Description | |---|---| | X_AUTH_TOKEN |Token Authorization to connect to the API | | X_DEEPINT_ORGANIZATION | Organization Token | | DEEPINT_API_URL | Deep Intelligence API URL, default is https://app.deepint.net/api/v1/ |

In case you can not set environment variable and still want to use this SDK you can set this parameters directly on your code, like this:

const deepint = require('@airinstitute/deepint-js-sdk');
// If you did not setted X_AUTH_TOKEN && X_DEEPINT_ORGANIZATION env variables in order to be able to use the SDK you can set this variables on code in the next way

deepint.Config.getInstance().setToken("<Your Deep Intelligence user token>");
deepint.Config.getInstance().setOrganization("<Your Deep Intelligence organization ID>");

// This method it is only for development use in production please set the envionment variables

Even this method is available and working its highly recomended to set this variables through environment variables due it's more safety and this last method if used with text plain can expose your Deep Intelligence credentials.

For source configuration, set the following variables:

| Variable Name | Description | |---|---| | SOURCE_PUB_KEY | Public key of the external source | | | SOURCE_SECRET_KEY | External source secret key | |


⌨️ Development Commands


Module repository for more information: https://github.com/deepintdev/deepint-node-connector

Start by running npm install inside the module folder. npm run tsc to build the module, npm run start to build the module, npm run pre to run it in development mode.

To get the documentation of the module functions: npx typedoc --out docs .


🌐 Built With


This project has been developed with TypeScript, Node Js and Express languages and technologies.

TypeScript Node


🙏 Acknowledgments


To express our gratitude to the following people involved in this project:

  • Miguel Chaveinte García: https://github.com/miguelchaveinte
  • Pablo Chamoso Santos: https://github.com/chamoso
  • Francisco Pinto Santos: https://github.com/GandalFran
  • Raúl López Blanco: https://github.com/raullb34
  • Ángel Martín Domínguez: https://github.com/amartdom
  • Alberto Galante Melero: https://github.com/Galazord