Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adempiere/grpc-access-client

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adempiere/grpc-access-client

ADempiere Access Client write in Javascript for gRPC service

  • 1.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

ADempiere Access Client for gRPC

npm version License Downloads Dependencies

ADempiere Access Client write in Javascript for gRPC service, use it for connect with ADempiere-gRPC-Server.

Requirements

Using it

# installing via NPM
npm install @adempiere/grpc-access-client --save
# installing via Yarn
yarn add @adempiere/grpc-access-client

A Example

Declare Data

const Access = require('@adempiere/grpc-access-client');
// URL, Version
let access = new Access(GRPC_HOST, 'Version Epale');

Declare Data with specific language

const Access = require('@adempiere/grpc-access-client');
let access = new Access(GRPC_HOST, 'Version Epale');

Request Roles for a user

//  Request User Roles
//  UserName, UserPass
access.requestUserRoles('SuperUser', 'System')
.then(userRoles => {
  console.log('Object with Role List' + userRoles);
})
.catch(err => console.log("Error: " + err.message));

Output

Hola

Request Login

//  Request Login for User
//  UserName, UserPass, Language
access.requestUserLogin('SuperUser', 'System', 'es_VE')
.then(session => {
  console.log('Object with Session values' + session);
})
.catch(err => console.log("Error: " + err.message));

Output

None

Request Logout

//  Request Logout for User
//  SessionUuid
access.requestUserLogout('8cc49692-fb40-11e8-a479-7a0060f0aa01')
.then(session => {
  console.log('Object with Logout Session' + session);
})
.catch(err => console.log("Error: " + err.message));

Output

None

Recreate proto stub class (only for contribute to project)

For recreate stub class you must have follow:

Note: You can also install protoc and protoc-gen-grpc-web by going to the repository directory and run the command:

sh install-protoc.sh

When installation is complete, check the version with

protoc --version

After installed it just go to source code folder an run it:

Run Access gRPC

protoc proto/access.proto \
--js_out=import_style=commonjs:src/grpc \
--grpc-web_out=import_style=commonjs,mode=grpcwebtext:src/grpc

Or run:

sh generate-stub.sh

The result is generated on: src/grpc folder

  • access_grpc_web_pb.js
  • access_pb.js

Keywords

FAQs

Package last updated on 18 Aug 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc