1.0.16 • Published 2 years ago

@airinstitute/deepint-connector v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Deep Intelligence Node connector

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-connector

🚩 Usage


Example 🔻


const deepint = require('@airinstitute/deepint-connector');
deepint.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 NameDescription
X_AUTH_TOKENToken Authorization to connect to the API
X_DEEPINT_ORGANIZATIONOrganization Token
DEEPINT_API_URLDeep Intelligence API URL, default is https://app.deepint.net/api/v1/

For source configuration, set the following variables:

Variable NameDescription
SOURCE_PUB_KEYPublic key of the external source
SOURCE_SECRET_KEYExternal 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: