Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

hiro-sdk

Package Overview
Dependencies
Maintainers
3
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

hiro-sdk

HIRO Applications SDK.

unpublished
latest
Source
npmnpm
Version
1.2.7
Version published
Maintainers
3
Created
Source

HIRO SDK

SDK for HIRO applications.

ctx is instance of HiroGraphOrm. Documentation can be found at hiro-graph-orm docs.

API

Table of Contents

getState

Request application state from the HIRO Desktop

Returns Promise<Object>

getSuspendedApps

Ask HIRO Desktop to give list of suspended apps.

Returns Promise<Object>

getInstalledApps

Ask HIRO Desktop to give list of installed apps.

Returns Promise<Object>

saveState

Ask HIRO Desktop to save application state for later usage. Usually, this method is invoke during suspend process.

Parameters

  • state Object Application state to save

installApp

Ask HIRO Desktop to install application.

Parameters

  • appId string Application id to install

Returns Promise<Object>

uninstallApp

Ask HIRO Desktop to uninstall application.

Parameters

  • appId string Application id to uninstall

Returns Promise<Object>

runApp

Ask HIRO Desktop to open/run application.

Parameters

  • appId string Application id to run

Returns Promise<Object>

closeApp

Ask HIRO Desktop to close/stop application.

Parameters

  • appId string Application id to stop

Returns Promise<Object>

onClosing

Register callback for the CLOSING event

Parameters

Returns Function Function to unregister this callback

onSuspending

Register callback for the SUSPENDING event

Parameters

Returns Function Function to unregister this callback

onEnvironmentChanged

Register callback for the ENVIRONMENT_CHANGED event

Parameters

  • cb Function ENVIRONMENT_CHANGED event listener

Returns Function Function to unregister this callback

initSdk

Initialize HIRO SDK

Parameters

  • config Object SDK configuration (optional, default {})
    • config.mappings Array? ORM mappings There are some mappings provided by default.
    • config.servlets Object? ORM Servlets
    • config.createToken Function? Factory to create token. Default implementation is require('hiro-graph-client').Token But you may want use ReduxToken from the 'hiro-graph-redux'
    • config.authUrl String? Graph Auth URL for dev auth
    • config.graphUrl String? Graph URL for dev auth
    • config.redirectUrl String? Graph Auth Redirect URL for dev auth
    • config.clientId String? Client ID for dev auth
    • config.forceHttp Boolean Force HTTP connection instead of websocket (optional, default true)

Returns Promise<{ready: Function, orm: Context, config: Object, state: Object}> Promise will be resolved with next values:- ready: callback for HIRO Desktop, tells about ready status

  • orm: configured ORM
  • config: { graphUrl, token, user, org } from the HIRO Desktop
  • state: saved application state in case app was suspended

FAQs

Package last updated on 15 Apr 2019

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