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

statotest-api-requests

v1.1.24

Published

Package that contains all necessary API calls for the each of the Statotest APIs.

Downloads

1,509

Readme

Statotest API requests

This library is mainly for restricted usage by company Statotest s.r.o.

It contains almost every API call for different Statotest's APIs - Output API, Input API, Notification API, GetImage API.

Everything is in Typescript => all necessary types of API responses are included.

Whenever you work on a JavaScript/TypeScript project where API requests are send to one of our API's => use this library, for better management of request in the future.

Installation

Standard node module installation.

npm install statotest-api-requests

Or if you are using Yarn

yarn add statotest-api-requests

Usage

Before using any of the requets => set API URLs and Tokens:

import { initAPIVariables } from 'statotest-api-requests/dist/helper'
initAPIVariables(OUTPUT_API_URL, optionalVariables = {});

OUTPUT_API_URL: string,

Object optionalVariables can have these optional values.

API_OUTPUT_EXPORT_TOKEN?: string - for using getExport

FUNCTION_GET_IMAGE?: string - for using getImage

Set method for retrieving authentication (Bearer) token

import { setMethodForRetrievingToken } from 'statotest-api-requests/lib/helper'
setMethodForRetrievingToken(getTokenMethod: () Promise<string> | string); 

getTokenMethod => returns Promise<string> or string

e.g. Browser => returns values stored in localStorage, Cookies...

e.g. Smartphone => retuns value stored in AsyncStorage...

List of self-explanatory methods for almost every endpoint of our API

OutputAPI

Account

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | Accounts/authenticate | authenticate | | GET | Accounts | getAccounts | | POST | Accounts | createAccount | | PUT | Accounts | putAccount | | POST | Accounts/forgot-password | forgotPassword (doesn't work) | | POST | Accounts/refresh-token | refreshToken (doesn't work) | | POST | Accounts/revoke-token | revokeToken (doesn't work) |

Company

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | Company/Get | getCompany | | POST | Company/Add | addCompany | | POST | Company/Upd | updateCompany | | PUT | Company/Rem | removeCompany |

Permissions Company

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | PermissionsCompany/getCompUsers | getCompanyPermissionsCompanyUsers | | POST | PermissionsCompany/addCompUser | addCompanyPermissionsUser | | POST | PermissionsCompany/UpdCompUser | updateCompanyPermissionsUser | | POST | PermissionsCompany/remCompUser | removeCompanyPermissionsUser |

Construction

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | Constructions/Get | getConstructions | | POST | Constructions/add | addConstruction | | POST | Constructions/rem | removeConstruction | | POST | Constructions/Upd | updateConstruction | | PUT | Constructions/Img/Add | addConstructionImages |

DataOutput

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | DataOutput/GetDataType | getDataTypes | | POST | DataOutput/GetMeasure | getMeasure | | POST | DataOutput/ExportData | getExport | | POST | DataOutput/getDataOutputData | updateConstruction |

DataOutput Types:

const dataOutputTypes = {
    0: "/DataOutput/getdevice",
    1: "/DataOutput/getaccelero",
    2: "/DataOutput/getinclino",
    3: "/DataOutput/getmeteo",
    4: "/DataOutput/getenvironment",
    5: "/DataOutput/getvoltage",
    6: "/DataOutput/getraw",
    7: "/DataOutput/getstate",
    8: "/DataOutput/GetStrain",
    9: "/DataOutput/GetCoordinateLocal",
    10: "/DataOutput/GetCoordinateJTSK",
    99: "/DataOutput/GetUnit",
    100: "/MP/Dev/get",
};

Device

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | MP/Dev/Get | getMeasurePointsDev | | POST | MP/Dev/add | addMeasurePointDev | | POST | MP/Dev/rem | removeMeasurePointDev | | POST | MP/Dev/GetAvailable | getCompanyAvailableDevices | | POST | Company/Dev/DashBoard | getDevicesDashboard | | POST | Company/Dev/Get | getCompanyDevices | | POST | Company/Dev/GetAvailabel | getAllCompaniesAvailableDevices | | POST | Company/Dev/Reg | registerDeviceToComp | | POST | Company/Dev/UnReg | unregisterDeviceFromComp | | POST | Device/Add | postCreateDevice |

Measurepoint

| Method | Endpoint | requestFunction | |--------|----------|-------------| | POST | MP/get | getMeasurePoints | | POST | MP/add | addMeasurePoint | | POST | MP/rem | removeMeasurePoint | | POST | MP/Upd | updateMeasurePoint | | POST | MP/Img/Add? | uploadMeasurePointImage |

Updates

Whenever change is needed => write me an email to [email protected]

License

Proprietary