Package Exports
- @adempiere/grpc-api
- @adempiere/grpc-api/index.js
- @adempiere/grpc-api/src/grpc/proto/access_pb.js
- @adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js
- @adempiere/grpc-api/src/grpc/proto/business_pb.js
- @adempiere/grpc-api/src/grpc/proto/core_functionality_pb
- @adempiere/grpc-api/src/grpc/proto/core_functionality_pb.js
- @adempiere/grpc-api/src/grpc/proto/logs_pb.js
- @adempiere/grpc-api/src/grpc/proto/workflow_pb
- @adempiere/grpc-api/src/grpc/proto/workflow_pb.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@adempiere/grpc-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ADempiere gRPC-API library to Node.js
ADempiere node.js write in JavaScript for gRPC service, currently is used as library of proxy ADempiere service and is published as NPM
- ADempiere-gRPC-Server, docker image erpya/adempiere-grpc-all-in-one.
See also:
- ADempiere-Vue, docker image erpya/adempiere-vue. service, use it for connect with:
- Proxy-Adempiere-API, docker image erpya/proxy-adempiere-api.
Using it
# installing via NPM
npm install @adempiere/grpc-api --save# installing via Yarn
yarn add @adempiere/grpc-apiA Example
Here a example for it using from Proxy of ADempiere API: https://github.com/adempiere/proxy-adempiere-api/blob/master/src/modules/adempiere-api/index.ts#L17
Recreate proto stub class (only for contribute to project)
For recreate stub class you must have follow:
Generate Proto Stub:
Generate with npm (Recommended):
Via npm:
# install dependecies and dev dependencies
npm ci
# generate all stub
npm run stubVia yarn:
# install dependecies and dev dependencies
yarn ci
# generate all stub
yarn stubNote to generate specific proto definition:
- To access:
npm run stub:access - To base data type:
npm run stub:base_data_type - To business:
npm run stub:business - To client:
npm run stub:client - To core functionality:
npm run stub:core_functionality - To dictionary:
npm run stub:dictionary - To enrollment:
npm run stub:enrollment - To point of sales:
npm run stub:point_of_sales - To business partner:
npm run stub:business_partner - To in-out:
npm run stub:in_out - To invoice:
npm run stub:invoice - To order:
npm run stub:order - To payment:
npm run stub:payment - To payroll action notice:
npm run stub:payroll_action_notice - To product:
npm run stub:product - To workflow:
npm run stub:workflow
Generate directly with grpc-tools:
Generate all stub:
grpc_tools_node_protoc \
--js_out=import_style=commonjs,binary:src/grpc \
--grpc_out=src/grpc \
proto/access.proto proto/base_data_type.proto proto/business.proto proto/client.proto proto/core_functionality.proto proto/dictionary.proto proto/enrollment.proto proto/point_of_sales.proto
# --grpc-web_out=import_style=commonjs,mode=grpcwebtext:$OUT_DIR- To access:
# Generate stub to access.proto file
grpc_tools_node_protoc \
proto/access.proto \
--js_out=import_style=commonjs,binary:src/grpc/ \
--grpc_out=grpc_js:src/grpc/
# --grpc-web_out=import_style=commonjs,mode=grpcwebtext:$OUT_DIR- To base data type:
# Generate stub to base_data_type.proto file
grpc_tools_node_protoc \
proto/base_data_type.proto \
--js_out=import_style=commonjs,binary:src/grpc/ \
--grpc_out=grpc_js:src/grpc/
# --grpc-web_out=import_style=commonjs,mode=grpcwebtext:$OUT_DIR- To dictionary:
# Generate stub to access.proto file
grpc_tools_node_protoc \
proto/dictionary.proto \
--js_out=import_style=commonjs,binary:src/grpc/ \
--grpc_out=grpc_js:src/grpc/
# --grpc-web_out=import_style=commonjs,mode=grpcwebtext:$OUT_DIROutput proto stub
The result is generated on: src/grpc/proto/ folder
access_grpc_pb.jsaccess_pb.jsbase_data_type_grpc_pb.jsbase_data_type_pb.jsbusiness_grpc_pb.jsbusiness_pb.jsclient_grpc_pb.jsclient_pb.jscore_functionality_grpc_pb.jscore_functionality_pb.jsdictionary_grpc_pb.jsdictionary_pb.jsenrollment_grpc_pb.jsenrollment_pb.jspoint_of_sales_grpc_pb.jspoint_of_sales_pb.jsbusiness_partner_grpc_pb.jsbusiness_partner_pb.jsin_out_grpc_pb.jsin_out_pb.jsinvoice_grpc_pb.jsinvoice_pb.jsorder_grpc_pb.jsorder_pb.jspayment_grpc_pb.jspayment_pb.jspayroll_action_notice_grpc_pb.jspayroll_action_notice_pb.jsproduct_grpc_pb.jsproduct_pb.jsworkflow_grpc_pb.jsworkflow_pb.js
Sponsors
Become a sponsor and get your logo on our README on GitHub with a link to your site. Become a sponsor