Skip to content

[FEATURE] nodejs package #36

Description

@llermaly

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions