salix/modules/travel/back/methods/travel/extraCommunityPdf.js

87 lines
2.3 KiB
JavaScript

module.exports = Self => {
Self.remoteMethodCtx('extraCommunityPdf', {
description: 'Returns the extra community pdf',
accessType: 'READ',
accepts: [
{
arg: 'recipientId',
type: 'number',
description: 'The recipient id',
required: false
},
{
arg: 'filter',
type: 'object',
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
},
{
arg: 'search',
type: 'string',
description: 'Searchs the travel by id'
},
{
arg: 'landedTo',
type: 'date'
},
{
arg: 'shippedFrom',
type: 'date'
},
{
arg: 'continent',
type: 'string'
},
{
arg: 'reference',
type: 'string'
},
{
arg: 'id',
type: 'number'
},
{
arg: 'agencyModeFk',
type: 'number'
},
{
arg: 'warehouseOutFk',
type: 'number'
},
{
arg: 'warehouseInFk',
type: 'number'
},
{
arg: 'totalEntries',
type: 'number'
},
{
arg: 'cargoSupplierFk',
type: 'number'
}
],
returns: [
{
arg: 'body',
type: 'file',
root: true
}, {
arg: 'Content-Type',
type: 'String',
http: {target: 'header'}
}, {
arg: 'Content-Disposition',
type: 'String',
http: {target: 'header'}
}
],
http: {
path: '/extra-community-pdf',
verb: 'GET'
},
accessScopes: ['DEFAULT', 'read:multimedia']
});
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
};