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

@adempiere/grpc-api

Package Overview
Dependencies
Maintainers
5
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 4.5.8 to 4.5.9

35

lib/convertBaseDataType.js

@@ -289,37 +289,2 @@ /*************************************************************************************

return resourceToConvert.getData();
},
convertAttachmentFromGRPC(attachmentToConvert) {
if (!attachmentToConvert) {
return undefined;
}
return {
attachment_uuid: attachmentToConvert.getAttachmentUuid(),
title: attachmentToConvert.getTitle(),
text_msg: attachmentToConvert.getTextMsg(),
resource_references_list: attachmentToConvert.getResourceReferencesList().map(itemResourceReference => {
return convertBaseDataType.convertResourceReferenceFromGRPC(
itemResourceReference
);
})
};
},
convertResourceReferenceFromGRPC(resourceReferenceToConvert) {
if (!resourceReferenceToConvert) {
return undefined;
}
const { getDecimalFromGRPC } = require('@adempiere/grpc-api/src/utils/baseDataTypeFromGRPC.js');
return {
resource_uuid: resourceReferenceToConvert.getResourceUuid(),
file_name: resourceReferenceToConvert.getFileName(),
file_size: getDecimalFromGRPC(
resourceReferenceToConvert.getFileSize()
),
description: resourceReferenceToConvert.getDescription(),
text_msg: resourceReferenceToConvert.getTextMsg(),
content_type: resourceReferenceToConvert.getContentType()
};
}

@@ -326,0 +291,0 @@

8

lib/convertPointOfSales.js

@@ -316,6 +316,6 @@ /*************************************************************************************

if (key) {
const { getDecimalFromGRPC } = require('@adempiere/grpc-api/src/utils/baseDataTypeFromGRPC.js');
const {
convertResourceReferenceFromGRPC
} = require('./convertBaseDataType.js');
getDecimalFromGRPC,
getResourceReferenceFromGRPC
} = require('@adempiere/grpc-api/src/utils/baseDataTypeFromGRPC.js');

@@ -336,3 +336,3 @@ return {

),
resource_reference: convertResourceReferenceFromGRPC(
resource_reference: getResourceReferenceFromGRPC(
key.getResourceReference()

@@ -339,0 +339,0 @@ )

{
"name": "@adempiere/grpc-api",
"version": "4.5.8",
"version": "4.5.9",
"description": "ADempiere Web write in Javascript for a node service",

@@ -5,0 +5,0 @@ "author": "Yamel Senih",

@@ -73,3 +73,2 @@ ADempiere gRPC-API library to Node.js

* To business partner: `npm run stub:business_partner`
* To client: `npm run stub:client`
* To core functionality: `npm run stub:core_functionality`

@@ -84,4 +83,7 @@ * To dashboarding: `npm run stub:dashboarding`

* To general ledger: `npm run stub:general_ledger`
* To import file loader: `npm run stub:import_file_loader`
* To in-out: `npm run stub:in_out`
* To invoice: `npm run stub:invoice`
* To issue management: `npm run stub:issue_management`
* To logs: `npm run stub:logs`
* To match po receipt invoice: `npm run stub:match_po_receipt_invoice`

@@ -92,2 +94,3 @@ * To material management: `npm run stub:material_management`

* To payment allocation: `npm run stub:payment_allocation`
* To payment print export: `npm run stub:payment_print_export`
* To payroll action notice: `npm run stub:payroll_action_notice`

@@ -99,2 +102,3 @@ * To point of sales: `npm run stub:point_of_sales`

* To time record: `npm run stub:time_record`
* To user customization: `npm run stub:user_customization`
* To workflow: `npm run stub:workflow`

@@ -153,4 +157,2 @@

- `business_partner_pb.js`
- `client_grpc_pb.js`
- `client_pb.js`
- `core_functionality_grpc_pb.js`

@@ -170,4 +172,8 @@ - `core_functionality_pb.js`

- `express_shipment_pb.js`
- `file_management_pb.js`
- `file_management_grpc_pb.js`
- `general_ledger_pb.js`
- `general_ledger_grpc_pb.js`
- `import_file_loader_pb.js`
- `import_file_loader_grpc_pb.js`
- `in_out_grpc_pb.js`

@@ -177,8 +183,18 @@ - `in_out_pb.js`

- `invoice_pb.js`
- `issue_management_grpc_pb.js`
- `issue_management_pb.js`
- `logs_grpc_pb.js`
- `logs_pb.js`
- `match_po_receipt_invoice_grpc_pb.js`
- `match_po_receipt_invoice_pb.js`
- `material_management_grpc_pb.js`
- `material_management_pb.js`
- `order_grpc_pb.js`
- `order_pb.js`
- `payment_allocation_grpc_pb.js`
- `payment_allocation_pb.js`
- `payment_grpc_pb.js`
- `payment_pb.js`
- `payment_allocation_grpc_pb.js`
- `payment_allocation_pb.js`
- `payment_print_export_grpc_pb.js`
- `payment_print_export_pb.js`
- `payroll_action_notice_grpc_pb.js`

@@ -196,2 +212,4 @@ - `payroll_action_notice_pb.js`

- `time_record_pb.js`
- `user_customization_grpc_pb.js`
- `user_customization_pb.js`
- `workflow_grpc_pb.js`

@@ -198,0 +216,0 @@ - `workflow_pb.js`

@@ -5,3 +5,3 @@ // GENERATED CODE -- DO NOT EDIT!

// ***********************************************************************************
// Copyright (C) 2012-2022 E.R.P. Consultores y Asociados, C.A. *
// Copyright (C) 2018-2023 E.R.P. Consultores y Asociados, C.A. *
// Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com *

@@ -8,0 +8,0 @@ // This program is free software: you can redistribute it and/or modify *

@@ -79,2 +79,13 @@ // GENERATED CODE -- DO NOT EDIT!

function serialize_import_file_loader_ListClientImportFormatsRequest(arg) {
if (!(arg instanceof proto_import_file_loader_pb.ListClientImportFormatsRequest)) {
throw new Error('Expected argument of type import_file_loader.ListClientImportFormatsRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_import_file_loader_ListClientImportFormatsRequest(buffer_arg) {
return proto_import_file_loader_pb.ListClientImportFormatsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_import_file_loader_ListFilePreviewRequest(arg) {

@@ -102,5 +113,5 @@ if (!(arg instanceof proto_import_file_loader_pb.ListFilePreviewRequest)) {

function serialize_import_file_loader_LoadImportFileRequest(arg) {
if (!(arg instanceof proto_import_file_loader_pb.LoadImportFileRequest)) {
throw new Error('Expected argument of type import_file_loader.LoadImportFileRequest');
function serialize_import_file_loader_ListImportProcessesRequest(arg) {
if (!(arg instanceof proto_import_file_loader_pb.ListImportProcessesRequest)) {
throw new Error('Expected argument of type import_file_loader.ListImportProcessesRequest');
}

@@ -110,6 +121,28 @@ return Buffer.from(arg.serializeBinary());

function deserialize_import_file_loader_LoadImportFileRequest(buffer_arg) {
return proto_import_file_loader_pb.LoadImportFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
function deserialize_import_file_loader_ListImportProcessesRequest(buffer_arg) {
return proto_import_file_loader_pb.ListImportProcessesRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_import_file_loader_ListImportTablesRequest(arg) {
if (!(arg instanceof proto_import_file_loader_pb.ListImportTablesRequest)) {
throw new Error('Expected argument of type import_file_loader.ListImportTablesRequest');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_import_file_loader_ListImportTablesRequest(buffer_arg) {
return proto_import_file_loader_pb.ListImportTablesRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_import_file_loader_ListImportTablesResponse(arg) {
if (!(arg instanceof proto_import_file_loader_pb.ListImportTablesResponse)) {
throw new Error('Expected argument of type import_file_loader.ListImportTablesResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_import_file_loader_ListImportTablesResponse(buffer_arg) {
return proto_import_file_loader_pb.ListImportTablesResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_import_file_loader_ProcessImportRequest(arg) {

@@ -137,5 +170,5 @@ if (!(arg instanceof proto_import_file_loader_pb.ProcessImportRequest)) {

function serialize_import_file_loader_ResourceReference(arg) {
if (!(arg instanceof proto_import_file_loader_pb.ResourceReference)) {
throw new Error('Expected argument of type import_file_loader.ResourceReference');
function serialize_import_file_loader_SaveRecordsRequest(arg) {
if (!(arg instanceof proto_import_file_loader_pb.SaveRecordsRequest)) {
throw new Error('Expected argument of type import_file_loader.SaveRecordsRequest');
}

@@ -145,7 +178,18 @@ return Buffer.from(arg.serializeBinary());

function deserialize_import_file_loader_ResourceReference(buffer_arg) {
return proto_import_file_loader_pb.ResourceReference.deserializeBinary(new Uint8Array(buffer_arg));
function deserialize_import_file_loader_SaveRecordsRequest(buffer_arg) {
return proto_import_file_loader_pb.SaveRecordsRequest.deserializeBinary(new Uint8Array(buffer_arg));
}
function serialize_import_file_loader_SaveRecordsResponse(arg) {
if (!(arg instanceof proto_import_file_loader_pb.SaveRecordsResponse)) {
throw new Error('Expected argument of type import_file_loader.SaveRecordsResponse');
}
return Buffer.from(arg.serializeBinary());
}
function deserialize_import_file_loader_SaveRecordsResponse(buffer_arg) {
return proto_import_file_loader_pb.SaveRecordsResponse.deserializeBinary(new Uint8Array(buffer_arg));
}
var ImportFileLoaderService = exports.ImportFileLoaderService = {

@@ -163,2 +207,13 @@ listCharsets: {

},
listImportTables: {
path: '/import_file_loader.ImportFileLoader/ListImportTables',
requestStream: false,
responseStream: false,
requestType: proto_import_file_loader_pb.ListImportTablesRequest,
responseType: proto_import_file_loader_pb.ListImportTablesResponse,
requestSerialize: serialize_import_file_loader_ListImportTablesRequest,
requestDeserialize: deserialize_import_file_loader_ListImportTablesRequest,
responseSerialize: serialize_import_file_loader_ListImportTablesResponse,
responseDeserialize: deserialize_import_file_loader_ListImportTablesResponse,
},
listImportFormats: {

@@ -175,2 +230,13 @@ path: '/import_file_loader.ImportFileLoader/ListImportFormats',

},
listClientImportFormats: {
path: '/import_file_loader.ImportFileLoader/ListClientImportFormats',
requestStream: false,
responseStream: false,
requestType: proto_import_file_loader_pb.ListClientImportFormatsRequest,
responseType: proto_business_pb.ListLookupItemsResponse,
requestSerialize: serialize_import_file_loader_ListClientImportFormatsRequest,
requestDeserialize: deserialize_import_file_loader_ListClientImportFormatsRequest,
responseSerialize: serialize_data_ListLookupItemsResponse,
responseDeserialize: deserialize_data_ListLookupItemsResponse,
},
getImportFromat: {

@@ -187,12 +253,13 @@ path: '/import_file_loader.ImportFileLoader/GetImportFromat',

},
loadImportFile: {
path: '/import_file_loader.ImportFileLoader/LoadImportFile',
requestStream: true,
// Manage File
saveRecords: {
path: '/import_file_loader.ImportFileLoader/SaveRecords',
requestStream: false,
responseStream: false,
requestType: proto_import_file_loader_pb.LoadImportFileRequest,
responseType: proto_import_file_loader_pb.ResourceReference,
requestSerialize: serialize_import_file_loader_LoadImportFileRequest,
requestDeserialize: deserialize_import_file_loader_LoadImportFileRequest,
responseSerialize: serialize_import_file_loader_ResourceReference,
responseDeserialize: deserialize_import_file_loader_ResourceReference,
requestType: proto_import_file_loader_pb.SaveRecordsRequest,
responseType: proto_import_file_loader_pb.SaveRecordsResponse,
requestSerialize: serialize_import_file_loader_SaveRecordsRequest,
requestDeserialize: deserialize_import_file_loader_SaveRecordsRequest,
responseSerialize: serialize_import_file_loader_SaveRecordsResponse,
responseDeserialize: deserialize_import_file_loader_SaveRecordsResponse,
},

@@ -210,2 +277,14 @@ listFilePreview: {

},
// Process
listImportProcesses: {
path: '/import_file_loader.ImportFileLoader/ListImportProcesses',
requestStream: false,
responseStream: false,
requestType: proto_import_file_loader_pb.ListImportProcessesRequest,
responseType: proto_business_pb.ListLookupItemsResponse,
requestSerialize: serialize_import_file_loader_ListImportProcessesRequest,
requestDeserialize: deserialize_import_file_loader_ListImportProcessesRequest,
responseSerialize: serialize_data_ListLookupItemsResponse,
responseDeserialize: deserialize_data_ListLookupItemsResponse,
},
processImport: {

@@ -212,0 +291,0 @@ path: '/import_file_loader.ImportFileLoader/ProcessImport',

@@ -18,3 +18,3 @@ /*************************************************************************************

const { getMetadata } = require('@adempiere/grpc-api/src/utils/metadata.js');
const { getValidId } = require('@adempiere/grpc-api/src/utils/valueUtils.js');
const { getValidInteger } = require('@adempiere/grpc-api/src/utils/valueUtils.js');

@@ -81,3 +81,3 @@ class FileManagement {

request.setRecordId(
getValidId(recordId)
getValidInteger(recordId)
);

@@ -106,4 +106,4 @@ request.setRecordUuid(recordUuid);

tableName,
id,
uuid
recordId,
recordUuid
}, callback) {

@@ -114,6 +114,6 @@ const { GetAttachmentRequest } = this.stubFile;

request.setTableName(tableName);
request.setId(
getValidId(id)
request.setRecordId(
getValidInteger(recordId)
);
request.setUuid(uuid);
request.setRecordUuid(recordUuid);

@@ -138,4 +138,5 @@ const metadata = getMetadata({

getResource({
resourceId,
resourceUuid,
resourceName,
resourceUuid,
token

@@ -146,4 +147,7 @@ }, callback) {

request.setResourceId(
getValidInteger(resourceId)
)
request.setResourceUuid(resourceUuid);
request.setResourceName(resourceName);
request.setResourceUuid(resourceUuid);

@@ -221,3 +225,3 @@ const metadata = getMetadata({

request.setRecordId(
getValidId(recordId)
getValidInteger(recordId)
);

@@ -252,3 +256,4 @@ request.setRecordUuid(recordUuid);

token,
imageId
imageId,
imageUuid,
}, callback) {

@@ -259,4 +264,5 @@ const { GetResourceReferenceRequest } = this.stubFile;

request.setImageId(
getValidId(imageId)
getValidInteger(imageId)
);
request.setImageUuid(imageUuid);

@@ -291,7 +297,7 @@ const metadata = getMetadata({

request.setResourceName(resourceName);
request.setResourceUuid(resourceUuid);
request.setResourceId(
getValidId(resourceId)
getValidInteger(resourceId)
);
request.setResourceUuid(resourceUuid);
request.setResourceName(resourceName);

@@ -298,0 +304,0 @@ const metadata = getMetadata({

@@ -63,3 +63,3 @@ /*************************************************************************************

/**
* Get List Business Partners
* Get List Charsets
* @param {string} token

@@ -98,2 +98,39 @@ * @param {string} searchValue

/**
* Get List Import Tables
* @param {string} token
* @param {string} searchValue
* @param {number} pageSize
* @param {string} pageToken
*/
listImportTables({
token,
// DSL
searchValue,
// Page Data
pageSize,
pageToken
}, callback) {
const { ListImportTablesRequest } = this.stubFile;
const request = new ListImportTablesRequest();
request.setSearchValue(searchValue);
request.setPageSize(
getValidInteger(pageSize)
);
request.setPageToken(pageToken);
const metadata = getMetadata({
token
});
this.getImportFileLoaderService().listImportTables(
request,
metadata,
callback
);
}
listImportFormats({

@@ -127,2 +164,30 @@ token,

listClientImportFormats({
token,
// DSL
searchValue,
// Page Data
pageSize,
pageToken
}, callback) {
const { ListClientImportFormatsRequest } = this.stubFile;
const request = new ListClientImportFormatsRequest();
request.setSearchValue(searchValue);
request.setPageSize(
getValidInteger(pageSize)
);
request.setPageToken(pageToken);
const metadata = getMetadata({
token
});
this.getImportFileLoaderService().listClientImportFormats(
request,
metadata,
callback
);
}
getImportFromat({

@@ -151,20 +216,19 @@ token,

loadImportFile({
saveRecords({
token,
// DSL
data,
resourceUuid,
fileSize
importFormatId,
resourceId
}, callback) {
const { LoadImportFileRequest } = this.stubFile;
const request = new LoadImportFileRequest();
const { SaveRecordsRequest } = this.stubFile;
const request = new SaveRecordsRequest();
request.setFileSize(
getValidInteger(fileSize)
request.setImportFormatId(
getValidInteger(importFormatId)
);
request.setResourceId(
getValidInteger(resourceId)
);
request.setData(data);
request.setResourceUuid(resourceUuid);
const metadata = getMetadata({

@@ -174,3 +238,3 @@ token

this.getImportFileLoaderService().getImportFromat(
this.getImportFileLoaderService().saveRecords(
request,

@@ -187,3 +251,3 @@ metadata,

importFormatId,
resourceReferenceId,
resourceId,
// Page Data

@@ -193,4 +257,4 @@ pageSize,

}, callback) {
const { ListCharsetsRequest } = this.stubFile;
const request = new ListCharsetsRequest();
const { ListFilePreviewRequest } = this.stubFile;
const request = new ListFilePreviewRequest();

@@ -203,5 +267,9 @@ request.setSearchValue(searchValue);

request.setImportFormatId(importFormatId);
request.setImportFormatId(
getValidInteger(importFormatId)
);
request.setResourceReferenceId(resourceReferenceId);
request.setResourceId(
getValidInteger(resourceId)
);

@@ -212,3 +280,3 @@ const metadata = getMetadata({

this.getImportFileLoaderService().listCharsets(
this.getImportFileLoaderService().listFilePreview(
request,

@@ -220,2 +288,38 @@ metadata,

listImportProcesses({
token,
// DSL
searchValue,
tableId,
tableName,
// Page Data
pageSize,
pageToken
}, callback) {
const { ListImportProcessesRequest } = this.stubFile;
const request = new ListImportProcessesRequest();
request.setSearchValue(searchValue);
request.setPageSize(
getValidInteger(pageSize)
);
request.setPageToken(pageToken);
request.setTableId(
getValidInteger(tableId)
);
request.setTableName(tableName);
const metadata = getMetadata({
token
});
this.getImportFileLoaderService().listImportProcesses(
request,
metadata,
callback
);
}
processImport({

@@ -222,0 +326,0 @@ token,

@@ -256,2 +256,38 @@ /*************************************************************************************

function getResourceReferenceFromGRPC(resourceReferenceToConvert) {
if (!resourceReferenceToConvert) {
return undefined;
}
return {
id: resourceReferenceToConvert.getId(),
uuid: resourceReferenceToConvert.getUuid(),
resource_uuid: resourceReferenceToConvert.getUuid(), // TODO: Remove when add support to uuid attribute
file_name: resourceReferenceToConvert.getFileName(),
file_size: getDecimalFromGRPC(
resourceReferenceToConvert.getFileSize()
),
description: resourceReferenceToConvert.getDescription(),
text_msg: resourceReferenceToConvert.getTextMsg(),
content_type: resourceReferenceToConvert.getContentType()
};
}
function getAttachmentFromGRPC(attachmentToConvert) {
if (!attachmentToConvert) {
return undefined;
}
return {
id: attachmentToConvert.getId(),
uuid: attachmentToConvert.getUuid(),
attachment_uuid: attachmentToConvert.getUuid(), // TODO: Remove when add support to uuid attribute
title: attachmentToConvert.getTitle(),
text_msg: attachmentToConvert.getTextMsg(),
resource_references_list: attachmentToConvert.getResourceReferencesList().map(itemResourceReference => {
return getResourceReferenceFromGRPC(
itemResourceReference
);
})
};
}
module.exports = {

@@ -267,2 +303,4 @@ getBooleanValueFromGRPC,

getRecordReferenceInfoFromGRPC,
getAttachmentFromGRPC,
getResourceReferenceFromGRPC,
getOperator,

@@ -269,0 +307,0 @@ getBusinessPartnerFromGRPC,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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