@adempiere/grpc-api
Advanced tools
Comparing version 1.7.3 to 1.7.4
@@ -64,2 +64,5 @@ /************************************************************************************* | ||
), | ||
refund_reference_currency: convertCurrencyFromGRPC( | ||
pointOfSales.getRefundReferenceCurrency() | ||
), | ||
conversion_type_uuid: pointOfSales.getConversionTypeUuid(), | ||
@@ -212,3 +215,6 @@ key_layout_uuid: pointOfSales.getKeyLayoutUuid(), | ||
availableTenderType.getMaximumDailyRefundAllowed() | ||
) | ||
), | ||
refund_reference_currency: convertCurrencyFromGRPC( | ||
availableTenderType.getRefundReferenceCurrency() | ||
), | ||
} | ||
@@ -346,2 +352,26 @@ } | ||
convertAvailableRefundGRPC(availableRefund) { | ||
if (availableRefund) { | ||
const { | ||
getDecimalFromGRPC | ||
} = require('./convertBaseDataType.js'); | ||
return { | ||
refund: getDecimalFromGRPC( | ||
availableRefund.getQuantity() | ||
), | ||
tender_type_refunds: availableRefund.getTenderTypeRefundsList() | ||
.map(tenderTypeRefund => { | ||
return { | ||
tender_type: tenderTypeRefund.getTenderType(), | ||
refund: getDecimalFromGRPC( | ||
tenderTypeRefund.getQuantity() | ||
) | ||
} | ||
}) | ||
}; | ||
} | ||
return undefined; | ||
}, | ||
convertKeyFromGRPC(key) { | ||
@@ -348,0 +378,0 @@ if (key) { |
{ | ||
"name": "@adempiere/grpc-api", | ||
"version": "1.7.3", | ||
"version": "1.7.4", | ||
"description": "ADempiere Web Store write in Javascript for a node service", | ||
@@ -35,7 +35,7 @@ "author": "Yamel Senih", | ||
"dependencies": { | ||
"@grpc/grpc-js": "^1.2.12", | ||
"google-protobuf": "^3.15.6" | ||
"@grpc/grpc-js": "1.3.7", | ||
"google-protobuf": "3.17.3" | ||
}, | ||
"devDependencies": { | ||
"grpc-tools": "^1.11.1" | ||
"grpc-tools": "1.11.2" | ||
}, | ||
@@ -42,0 +42,0 @@ "engines": { |
@@ -12,3 +12,2 @@ ADempiere gRPC-API library to Node.js | ||
[![Downloads](https://img.shields.io/npm/dm/@adempiere/grpc-api.svg)](https://www.npmjs.com/package/@adempiere/grpc-api) | ||
[![Dependencies](https://img.shields.io/librariesio/github/@adempiere/grpc-api.svg)](https://www.npmjs.com/package/@adempiere/grpc-api) | ||
@@ -15,0 +14,0 @@ ADempiere node.js write in JavaScript for gRPC service, currently is used as library of proxy ADempiere service and is published as NPM |
@@ -25,2 +25,13 @@ // GENERATED CODE -- DO NOT EDIT! | ||
function serialize_data_AvailableRefund(arg) { | ||
if (!(arg instanceof proto_point_of_sales_pb.AvailableRefund)) { | ||
throw new Error('Expected argument of type data.AvailableRefund'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_data_AvailableRefund(buffer_arg) { | ||
return proto_point_of_sales_pb.AvailableRefund.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_data_CreateCustomerRequest(arg) { | ||
@@ -125,2 +136,13 @@ if (!(arg instanceof proto_point_of_sales_pb.CreateCustomerRequest)) { | ||
function serialize_data_GetAvailableRefundRequest(arg) { | ||
if (!(arg instanceof proto_point_of_sales_pb.GetAvailableRefundRequest)) { | ||
throw new Error('Expected argument of type data.GetAvailableRefundRequest'); | ||
} | ||
return Buffer.from(arg.serializeBinary()); | ||
} | ||
function deserialize_data_GetAvailableRefundRequest(buffer_arg) { | ||
return proto_point_of_sales_pb.GetAvailableRefundRequest.deserializeBinary(new Uint8Array(buffer_arg)); | ||
} | ||
function serialize_data_GetCustomerRequest(arg) { | ||
@@ -874,4 +896,16 @@ if (!(arg instanceof proto_point_of_sales_pb.GetCustomerRequest)) { | ||
}, | ||
// Get Daily Refund | ||
getAvailableRefund: { | ||
path: '/data.Store/GetAvailableRefund', | ||
requestStream: false, | ||
responseStream: false, | ||
requestType: proto_point_of_sales_pb.GetAvailableRefundRequest, | ||
responseType: proto_point_of_sales_pb.AvailableRefund, | ||
requestSerialize: serialize_data_GetAvailableRefundRequest, | ||
requestDeserialize: deserialize_data_GetAvailableRefundRequest, | ||
responseSerialize: serialize_data_AvailableRefund, | ||
responseDeserialize: deserialize_data_AvailableRefund, | ||
}, | ||
}; | ||
exports.StoreClient = grpc.makeGenericClientConstructor(StoreService); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2736335
36
80012
256
+ Added@grpc/grpc-js@1.3.7(transitive)
+ Addedgoogle-protobuf@3.17.3(transitive)
- Removed@grpc/grpc-js@1.12.2(transitive)
- Removed@grpc/proto-loader@0.7.13(transitive)
- Removed@js-sdsl/ordered-map@4.4.2(transitive)
- Removed@protobufjs/aspromise@1.1.2(transitive)
- Removed@protobufjs/base64@1.1.2(transitive)
- Removed@protobufjs/codegen@2.0.4(transitive)
- Removed@protobufjs/eventemitter@1.1.0(transitive)
- Removed@protobufjs/fetch@1.1.0(transitive)
- Removed@protobufjs/float@1.0.2(transitive)
- Removed@protobufjs/inquire@1.1.0(transitive)
- Removed@protobufjs/path@1.1.2(transitive)
- Removed@protobufjs/pool@1.1.0(transitive)
- Removed@protobufjs/utf8@1.1.0(transitive)
- Removedansi-regex@5.0.1(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedcliui@8.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedescalade@3.2.0(transitive)
- Removedget-caller-file@2.0.5(transitive)
- Removedgoogle-protobuf@3.21.4(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedlodash.camelcase@4.3.0(transitive)
- Removedlong@5.2.3(transitive)
- Removedprotobufjs@7.4.0(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedstrip-ansi@6.0.1(transitive)
- Removedwrap-ansi@7.0.0(transitive)
- Removedy18n@5.0.8(transitive)
- Removedyargs@17.7.2(transitive)
- Removedyargs-parser@21.1.1(transitive)
Updated@grpc/grpc-js@1.3.7
Updatedgoogle-protobuf@3.17.3