generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem?
I would like to integrate the CLI to an existing nodejs backend , and instead of using something like the child_process module , or using the source code in javascript directly, would be nice to have a way to invoke the methods directly from nodejs just importing the reporting-cli package.
What solution would you like?
Allow the module to be imported in nodejs and executing calls, e.g:
const report = require("reporting-cli");
const createReport = async () => {
const reportData = await report.create({
from: "admin@page.com",
to: "user@domain.com",
smtp: {
host: "smtp.gmail.com",
port: 465,
secure: true,
username: "username",
password: "password",
},
url: "https://www.google.com",
auth: "basic",
credentials: {
username: "username",
password: "password",
},
format: "pdf",
fileName: "report.pdf",
subject: "Your report",
note: "Hello, attached see your report",
});
console.log(reportData);
};
createReport();
Is this something that can be done without you creating an additional package?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request