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

helyosjs-sdk

v2.1.2

Published

Comunication with helyos postgress database using graphql interface

Downloads

222

Readme

About The Project

The helyosjs-sdk helps the development of javascript applications using the helyOS framework. This library contains all necessary methods and entity types to build a front-end using helyOS as backend system.

List of features

  • Log in as administrator or regular user.
  • List and edit automatons (agents).
  • Retrieve sensors data and work process status.
  • Create, schedule and handle work processes.
  • Manage and edit yards: set drivable areas, gates, obstacles, etc.

Built With

Getting Started

Installation

$ npm i helyosjs-sdk  --save

Usage

import { HelyosServices, H_Agents  } from 'helyosjs-sdk';

const helyosService = new HelyosServices('http://localhost', {socketPort:'5002', gqlPort:'5000'});

const username = '[email protected]';
const password = 'password';

 helyosService.login(username, password)
.then( response => helyosService.connect())
.then( connected => console.log(connected));;

function listAgents(conditions={}) {
    return helyosService.agents.list(conditions)
    .then((agents: H_Agent[]) => {
        console.log(agents);
    });
}

function editTool(patch: H_Agents) {
    return helyosService.agents.patch(patch)
    .then(agents => {
        console.log(agents);
    )}
}

Listening agent/agent sensors and work process status


helyosService.connect()
.then(() => {
            const socket = helyosService.socket;

            socket.on('new_agent_poses',(updates)=>{
                console.log(updates);  // Notifications from agent sensors.
            });

            socket.on('change_agent_status',(updates)=>{
                console.log(updates);  // Notifications from agents working status.
            });

            socket.on('change_work_processes',(updates)=>{
                console.log(updates);  // Notifications from work processes status.
            });
});

Command Reference

| Command | Description | | --- | --- | | helyosService.register(email,password,adminPassword): Promise | Register new user. | | helyosService.login(username, password): Promise | User login. | | helyosService.connect(): Promise | Establish websocket connection after logged. | | helyosService.logout(): Promise | User logout. | | helyosService.changePassword(user,password,newPassword): Promise | Change password. | | --- | --- | | EXAMPLE OF CRUD OPERATIONS | | | helyosService.workprocess | Work Processes services | | .list (condition: Partial<H_WorkProcess>): Promise<H_WorkProcess[]>| list all work processes filtered by condition. | | .create (data: H_WorkProcess): Promise<H_WorkProcess> | create work process. | | .get (workProcessId: number): Promise<H_WorkProcess> | get work process by ID. | | .patch (data:Partial<H_WorkProcess>): Promise<H_WorkProcess> | edit work process. | | --- | --- |

Most important models

| Model | Description | | --- | --- | | H_Agents | Tool represents a sensor or any movable device that can perform an action | | id: number | unique db identifcation number | | code: number | unique identifcation number | | name: string | agent name | | picture: string | base64 jpg | | yardId: number | to which yard this agent is associated.| | status: string | 'busy', 'free' | | picture: string | base64 jpg | | geometry: JSON | Description of the agent geometry | | heartbeat: Date | Last time agent contacted the yard base | | --- | --- | | H_Yard | Physical space enclosing agents in a drivable area. | | id: number | unique db identifcation number | | name: string | yard name | | picture: string | base64 jpg | | mapData: {origin: {lat?: number, lon?: number, zoomLevel?: number}} | base64 jpg | | --- | --- | | H_MapObject | Define objects in the yard map: areas or lines. | | id: number | unique db identifcation number. | | yardId: number | associated yard.| | deletedAt: Date | when shape was marked deleted. | | type: string | type of object: "obstacle", "parking-area", "gate", etc. | | data: Object | user-defined arbitrary data format | | dataFormat: string | name of the data format | | --- | --- | | H_WorkProcess | Group and serialize actions to be executed by the agents. | | id: number | unique db identifcation number. | | schedStartAt: date | date and time when the process is scheduled to start. | | schedEndAt: date | date and time when the process is predicted to end. | | startedAt: date | date and time of actual start. | | endedAt: date | date and time of actual end. | | status: string |status. | | processType: string |status. | | data: MoveToTargetDescriptor | MoveFreeDescription | Any JSON data that describes the actions. | | --- | --- |

Version Compatibility

| helyosjs-sdk Version | helyOS_core Version | |----------------------|---------------------| | 2.0.3 | 2.0.3, 2.0.4 | | 2.0.4 | 2.0.4 | | 2.0.5 | 2.0.4, 2.0.5 | | 2.0.6 | 2.0.5 | | 2.1.0 | 2.1.0 |

Contributing

Keep it simple. Keep it minimal. If you have any question, please write to our Discussion forum.

License

This project is licensed under the MIT License