salix/modules/client/back/methods/client/campaignMetricsPdf.js

54 lines
1.4 KiB
JavaScript
Raw Normal View History

2022-09-22 06:48:29 +00:00
module.exports = Self => {
Self.remoteMethodCtx('campaignMetricsPdf', {
2022-09-26 06:07:45 +00:00
description: 'Returns the campaign metrics pdf',
2022-09-30 11:54:20 +00:00
accessType: 'READ',
2022-09-22 06:48:29 +00:00
accepts: [
{
arg: 'id',
type: 'number',
required: true,
description: 'The client id',
http: {source: 'path'}
},
{
arg: 'recipientId',
type: 'number',
description: 'The recipient id',
required: false
},
{
arg: 'from',
type: 'string',
required: true
},
{
arg: 'to',
type: 'string',
required: true
}
],
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: '/:id/campaign-metrics-pdf',
verb: 'GET'
2024-03-26 13:59:19 +00:00
},
accessScopes: ['DEFAULT', 'read:multimedia']
2022-09-22 06:48:29 +00:00
});
2023-03-14 07:17:46 +00:00
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
2022-09-22 06:48:29 +00:00
};