ADempiere Web Store write in Javascript for a node service

Usage no npm install needed!

<script type="module">
  import adempiereGrpcWebStore from 'https://cdn.skypack.dev/@adempiere/grpc-web-store';


ADempiere Web Store backend API for gRPC

npm version License Downloads Dependencies

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


Using it

# installing via NPM
npm install @adempiere/grpc-web-store --save
# installing via Yarn
yarn add @adempiere/grpc-web-store

A Example

Declare Data

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

Declare Data with specific language

const Access = require('@adempiere/grpc-web-store');
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));



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));



Request Logout

//  Request Logout for User
//  SessionUuid
.then(session => {
  console.log('Object with Logout Session' + session);
.catch(err => console.log("Error: " + err.message));



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

cd ../../protos
yarn global add grpc-tools
grpc_tools_node_protoc --js_out=import_style=commonjs,binary:src/grpc --grpc_out=src/grpc --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` proto/helloworld.proto

protoc proto/access.proto \
--js_out=import_style=commonjs:src/grpc \

Or run:

sh generate-stub.sh

The result is generated on: src/grpc folder

  • access_grpc_web_pb.js
  • access_pb.js