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

@adempiere/grpc-api

Package Overview
Dependencies
Maintainers
4
Versions
405
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adempiere/grpc-api - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

58

index.js

@@ -240,7 +240,12 @@ /*************************************************************************************

resourceUuid,
language
language,
token
}, callback) {
const { GetResourceRequest } = require('./src/grpc/proto/business_pb.js')
const request = new GetResourceRequest()
request.setClientRequest(this.getClientContext())
if(token) {
request.setClientRequest(this.createClientRequest(token, language))
} else {
request.setClientRequest(this.getClientContext())
}
request.setResourceName(resourceName)

@@ -437,3 +442,3 @@ request.setResourceUuid(resourceUuid)

const request = new GetEntityRequest()
request.setRecordId(id)
request.setId(id)
request.setUuid(uuid)

@@ -453,3 +458,3 @@ request.setTableName(tableName)

const { CreateEntityRequest } = require('./src/grpc/proto/business_pb.js')
const { convertParameterToGRPC } = require('./src/convertValues.js');
const { convertParameterToGRPC } = require('./lib/convertValues.js');
const request = new CreateEntityRequest()

@@ -479,6 +484,6 @@ request.setTableName(tableName)

const { UpdateEntityRequest } = require('./src/grpc/proto/business_pb.js')
const { convertParameterToGRPC } = require('./src/convertValues.js');
const { convertParameterToGRPC } = require('./lib/convertValues.js');
const request = new UpdateEntityRequest()
request.setTableName(tableName)
request.setRecordId(id)
request.setId(id)
request.setUuid(uuid)

@@ -505,3 +510,3 @@ if(attributes) {

const { CreateEntityRequest } = require('./src/grpc/proto/business_pb.js')
const { convertParameterToGRPC } = require('./src/convertValues.js');
const { convertParameterToGRPC } = require('./lib/convertValues.js');
const request = new CreateEntityRequest()

@@ -523,3 +528,3 @@ request.setTableName(tableName)

// convertBusinessValuesFromGRPC(value) {
// const { convertValueFromGRPC } = require('./src/convertBaseDataType.js');
// const { convertValueFromGRPC } = require('./lib/convertBaseDataType.js');
// return convertValueFromGRPC(value)

@@ -538,3 +543,3 @@ // }

const request = new DeleteEntityRequest()
request.setRecordId(id)
request.setId(id)
request.setUuid(uuid)

@@ -565,3 +570,3 @@ request.setTableName(tableName)

const request = new ListEntitiesRequest()
const { convertCriteriaToGRPC } = require('./src/convertValues.js');
const { convertCriteriaToGRPC } = require('./lib/convertValues.js');
// TODO: Add support to all parameters

@@ -602,3 +607,3 @@ request.setCriteria(convertCriteriaToGRPC({

const { RunBusinessProcessRequest } = require('./src/grpc/proto/business_pb.js')
const { convertParameterToGRPC } = require('./src/convertValues.js');
const { convertParameterToGRPC } = require('./lib/convertValues.js');
const request = new RunBusinessProcessRequest()

@@ -626,3 +631,34 @@ request.setTableName(tableName)

}
// User Interface
// Get Attachment information
getAttachment({
token,
id,
uuid,
tableName,
language
}, callback) {
const { GetAttachmentRequest } = require('./src/grpc/proto/business_pb.js')
const request = new GetAttachmentRequest()
request.setId(id)
request.setUuid(uuid)
request.setTableName(tableName)
request.setClientRequest(this.createClientRequest(token, language))
this.getUIService().getAttachment(request, callback)
}
// Get Resource information
getResourceReference({
token,
imageId,
language
}, callback) {
const { GetResourceReferenceRequest } = require('./src/grpc/proto/business_pb.js')
const request = new GetResourceReferenceRequest()
request.setImageId(imageId)
request.setClientRequest(this.createClientRequest(token, language))
this.getUIService().getResourceReference(request, callback)
}
}
module.exports = Api;

2

package.json
{
"name": "@adempiere/grpc-api",
"version": "1.0.9",
"version": "1.1.0",
"description": "ADempiere Web Store write in Javascript for a node service",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,3 +24,3 @@ /*************************************************************************************

convertValueFromGRPC(value) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -450,6 +450,6 @@ const { isEmptyValue } = require('./convertValues.js');

return {
attachmentUuid: attachmentToConvert.getAttachmentuuid(),
attachment_uuid: attachmentToConvert.getAttachmentUuid(),
title: attachmentToConvert.getTitle(),
textMsg: attachmentToConvert.getTextmsg(),
resourceReferencesList: attachmentToConvert.getResourcereferencesList().map(itemResourceReference => {
text_msg: attachmentToConvert.getTextMsg(),
resource_references_list: attachmentToConvert.getResourceReferencesList().map(itemResourceReference => {
return convertBaseDataType.convertResourceReferenceFromGRPC(

@@ -467,10 +467,10 @@ itemResourceReference

return {
resourceUuid: resourceReferenceToConvert.getResourceuuid(),
fileName: resourceReferenceToConvert.getFilename(),
fileSize: convertBaseDataType.getDecimalFromGRPC(
resourceReferenceToConvert.getFilesize()
resource_uuid: resourceReferenceToConvert.getResourceUuid(),
file_name: resourceReferenceToConvert.getFileName(),
file_size: convertBaseDataType.getDecimalFromGRPC(
resourceReferenceToConvert.getFileSize()
),
description: resourceReferenceToConvert.getDescription(),
textMsg: resourceReferenceToConvert.getTextmsg(),
contentType: resourceReferenceToConvert.getContenttype()
text_msg: resourceReferenceToConvert.getTextMsg(),
content_type: resourceReferenceToConvert.getContentType()
}

@@ -477,0 +477,0 @@ }

@@ -168,3 +168,3 @@ /*************************************************************************************

if (productToConvert) {
const { getDecimalFromGRPC } = require('@adempiere/grpc-core-client/src/convertBaseDataType.js');
const { getDecimalFromGRPC } = require('./convertBaseDataType.js');

@@ -219,3 +219,3 @@ return {

if (taxRateToConvert) {
const { getDecimalFromGRPC } = require('@adempiere/grpc-core-client/src/convertBaseDataType.js');
const { getDecimalFromGRPC } = require('./convertBaseDataType.js');

@@ -236,3 +236,3 @@ return {

if (productPriceToConvert) {
const { getDecimalFromGRPC } = require('@adempiere/grpc-core-client/src/convertBaseDataType.js');
const { getDecimalFromGRPC } = require('./convertBaseDataType.js');

@@ -314,3 +314,3 @@ return {

if (bankAccountToConvert) {
const { getDecimalFromGRPC } = require('@adempiere/grpc-core-client/src/convertBaseDataType.js');
const { getDecimalFromGRPC } = require('./convertBaseDataType.js');
const { getBankAccount_BankAccountType } = require('./convertEnums.js');

@@ -350,3 +350,3 @@

if (conversionRateToConvert) {
const { getDecimalFromGRPC } = require('@adempiere/grpc-core-client/src/convertBaseDataType.js');
const { getDecimalFromGRPC } = require('./convertBaseDataType.js');

@@ -353,0 +353,0 @@ return {

@@ -48,3 +48,3 @@ /*************************************************************************************

getValue_ValueType({ key, value }) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -79,3 +79,3 @@

getCondition_Operator({ key, value }) {
const { Condition } = require('./grpc/proto/base_data_type_pb.js');
const { Condition } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { Operator } = Condition;

@@ -98,3 +98,3 @@

getOrderByProperty_OrderType({ key, value }) {
const { OrderByProperty } = require('./grpc/proto/base_data_type_pb.js');
const { OrderByProperty } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { OrderType } = OrderByProperty;

@@ -119,3 +119,3 @@

getRecordLog_EventType({ key, value }) {
const { RecordLog } = require('./grpc/proto/base_data_type_pb.js');
const { RecordLog } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { EventType } = RecordLog;

@@ -136,3 +136,3 @@

getBankAccount_BankAccountType({ key, value }) {
const { BankAccount } = require('./grpc/proto/core_functionality_pb');
const { BankAccount } = require('@adempiere/grpc-api/src/grpc/proto/core_functionality_pb');
const { BankAccountType } = BankAccount;

@@ -139,0 +139,0 @@

@@ -138,3 +138,3 @@ /*************************************************************************************

convertValueToGRPCWithValueType({ value, valueType }) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -178,3 +178,3 @@ let convertedValue;

getValueFromInteger(value) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -200,3 +200,3 @@ let convertedValue = new Value();

getValueFromString(value) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -218,3 +218,3 @@ const convertedValue = new Value();

getValueFromBoolean(value) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -240,3 +240,3 @@ const convertedValue = new Value();

getValueFromDate(value) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -259,3 +259,3 @@ const convertedValue = new Value();

getValueFromDecimal(value) {
const { Value } = require('./grpc/proto/base_data_type_pb.js');
const { Value } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { ValueType } = Value;

@@ -278,3 +278,3 @@ const convertedValue = new Value();

getDecimalFromNumber(numberValue) {
const { Decimal } = require('./grpc/proto/base_data_type_pb.js');
const { Decimal } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const convertedDecimalValue = new Decimal();

@@ -317,3 +317,3 @@

convertParameterToGRPC({ columnName, value, valueType }) {
const { KeyValue } = require('./grpc/proto/base_data_type_pb.js');
const { KeyValue } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const keyValue = new KeyValue();

@@ -339,3 +339,3 @@ keyValue.setKey(columnName);

convertSelectionToGRPC({ selectionId, selectionUuid, selectionValues = [] }) {
const { KeyValueSelection } = require('./grpc/proto/base_data_type_pb.js');
const { KeyValueSelection } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const selectionInstance = new KeyValueSelection();

@@ -406,3 +406,3 @@

convertConditionToGRPC({ columnName, value, valueTo, values = [], operator = 'EQUAL' }) {
const { Condition } = require('./grpc/proto/base_data_type_pb.js');
const { Condition } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { Operator } = Condition;

@@ -450,3 +450,3 @@ const conditionInstance = new Condition();

convertOrderByPropertyToGRPC({ columnName, orderType }) {
const { OrderByProperty } = require('./grpc/proto/base_data_type_pb.js');
const { OrderByProperty } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js');
const { OrderType } = OrderByProperty;

@@ -489,3 +489,3 @@ const orderByInstance = new OrderByProperty;

}) {
const { Criteria } = require('./grpc/proto/base_data_type_pb.js')
const { Criteria } = require('@adempiere/grpc-api/src/grpc/proto/base_data_type_pb.js')
const criteria = new Criteria()

@@ -492,0 +492,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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